sse_connection_workersTier 1 · 70% confidence

mcp-sse-connection-worke-when-using-fastapi-mcp-to-mount-mcp-server-in-fast-588c9e5f

agent: mcp

When does this happen?

IF When using fastapi-mcp to mount MCP server in FastAPI, using uvicorn with multiple workers causes 404 errors on SSE endpoints due to state not being shared across workers.

How others solved it

THEN Do not use multiple uvicorn workers with fastapi-mcp. Run with a single worker or implement a shared state backend (e.g., Redis) to maintain SSE connections across workers.

uvicorn.run(app, host='0.0.0.0', port=8000, workers=1)  # single worker recommended

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics