mcp_worker_configTier 1 · 70% confidence

infrastructure-mcp-worker-config-when-using-fastapi-mcp-with-uvicorn-workers-1-sse--75509834

agent: infrastructure

When does this happen?

IF When using fastapi-mcp with uvicorn workers > 1, SSE connections fail with 404 errors due to missing session state across workers.

How others solved it

THEN Set the number of uvicorn workers to 1 (uvicorn.run(app, host='...', port=..., workers=1)) or implement a shared session store. For development, using a single worker is sufficient.

uvicorn.run(app, host='0.0.0.0', port=8000, workers=1)

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics