Install & Compatibility
Where this runs
tested against v2026.8.18 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.9
✕ build_error
✕ build_error
77MB installed
● package 77MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
serve
✓ from mcp_server_fetch import serve
✗ from mcp_server_fetch.server import create_app
main
✓ from mcp_server_fetch import main
server
✓ from mcp_server_fetch import server
This quickstart demonstrates how to programmatically start the MCP Server Fetch application using `uvicorn`. It first configures essential environment variables (like CORS) which are critical for its operation, then creates the FastAPI app instance, and finally runs it using `uvicorn.run`. For interaction with the running server, install and use the separate `mcp-client` library.
import uvicorn
from mcp_server_fetch.server import create_app
import os
import asyncio
# Configure necessary environment variables, e.g., for CORS or debug mode
os.environ['CORS_ORIGINS'] = 'http://localhost:3000,http://127.0.0.1:3000'
os.environ['MCP_DEBUG'] = 'true'
# Create the FastAPI application instance
app = create_app()
async def run_server():
print("Starting MCP Server Fetch on http://127.0.0.1:8000")
print("Use Ctrl+C to stop the server.")
config = uvicorn.Config(app, host="127.0.0.1", port=8000, log_level="info")
server = uvicorn.Server(config)
await server.serve()
if __name__ == "__main__":
# This demonstrates programmatic startup. More commonly, you'd run from CLI:
# uvicorn mcp_server_fetch.server:app --host 127.0.0.1 --port 8000
try:
asyncio.run(run_server())
except KeyboardInterrupt:
print("\nServer stopped.")
mcp-server-fetch --version
Debug
Known issues
gotchaIt is crucial to understand that `mcp-server-fetch` provides the server application itself, while programmatic interaction with a running server (e.g., fetching URLs) requires the separate `mcp-client` library. Do not attempt to import client-side utilities like `MCPClient` from `mcp-server-fetch`.fixFor client-side operations, `pip install mcp-client` and import from `mcp_client`.
affects: All versions
gotchaThe server's behavior and accessibility (e.g., CORS, debug settings, API keys) are heavily reliant on environment variables. Failing to set these correctly can lead to unexpected errors or security vulnerabilities.fixConsult the official documentation for a comprehensive list of environment variables and set them appropriately before starting the server. Examples include `CORS_ORIGINS`, `MCP_DEBUG`, etc.
affects: All versions
breakingDue to its rapid development cycle (monthly releases) and its position within an evolving protocol ecosystem, API stability between major monthly versions (e.g., from `2025.3.x` to `2025.4.x`) may not be strictly guaranteed. Breaking changes, while not always explicitly detailed in changelogs, can occur.fixPin your dependency to a specific `YYYY.M.patch` version (e.g., `mcp-server-fetch==2025.4.7`) and thoroughly test when upgrading across month boundaries.
affects: All versions (specifically between `YYYY.M` increments)
gotchaRunning the server programmatically as shown in the quickstart requires `uvicorn` to be installed. While `mcp-server-fetch` lists `uvicorn` as an optional dependency (via `[all]` extra), it's a runtime necessity for most deployments.fixEnsure `uvicorn` is installed in your environment, either directly (`pip install uvicorn`) or by using the `[all]` extra during `mcp-server-fetch` installation (`pip install 'mcp-server-fetch[all]'`).
affects: All versions
Upgrade
Version history
2026.8.18latest on PyPI · released Aug 18, 2026
Audit
Dependencies
pythonrequiredRequired Python version for execution.
uvicornrequiredRequired to run the MCP Server Fetch application as an ASGI server.