- Symptom
- 400 Bad Request on calls after a successful initialize404 Not Found for an Mcp-Session-Id after a deploy or restartWorks locally on one process, fails behind a load balancer or on serverless
- Cause
- In protocol versions 2025-03-26 to 2025-11-25, a stateful server keeps the session in process memory, so a request routed to another instance has no session. Servers answer a missing id with 400 and an ended one with 404, after which the client must initialize again.
- Fix
- Run the server stateless (no session id generator), pin sessions to an instance, or keep session state in a shared store. The 2026-07-28 protocol removes sessions and the Mcp-Session-Id header entirely.
- Apply
new StreamableHTTPServerTransport({ sessionIdGenerator: undefined }) // stateless: any instance can answer- Affected
- MCP protocol 2025-03-26 through 2025-11-25 servers on multi-instance or serverless hosting; sessions removed in 2026-07-28
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders