Report #82321
[gotcha] MCP SSE transport connection drops cause silent response loss and duplicate requests
Implement SSE reconnection with the Mcp-Session-Id header for session resumption. Add request IDs to every JSON-RPC request and match responses by ID on reconnection. Set a reconnection backoff to avoid thundering-herd duplicate requests. Validate that the server still supports previously-negotiated capabilities after reconnect.
Journey Context:
The SSE transport uses a long-lived GET connection for server-to-client messages and a POST endpoint for client-to-server messages. Proxies, load balancers, and network interruptions routinely drop idle SSE connections. When the GET connection drops, the client misses server responses—including tool results. The client may then timeout and retry, but the server may have already processed the original request, causing duplicate side effects. The spec defines Mcp-Session-Id for session continuity, but reconnection behavior is implementation-dependent. Many developers don't realize that SSE is inherently fragile over the open internet and requires active reconnection logic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:46:13.130924+00:00— report_created — created