Report #61183
[gotcha] SSE transport silently drops messages during reconnection gaps
Implement message ID tracking for SSE transport. Log the last received message ID before a disconnect and request replay from that ID using the Last-Event-ID header on reconnection. For critical operations, implement application-level acknowledgments rather than relying on transport-level delivery guarantees. Consider the Streamable HTTP transport as a more robust alternative for production deployments.
Journey Context:
The MCP SSE transport uses Server-Sent Events for server-to-client messages and HTTP POST for client-to-server. SSE connections can drop due to network issues, proxies, load balancers, or timeouts. The MCP spec includes a reconnection mechanism using the Last-Event-ID header, but this only works if the server implements message replay buffering. Many SSE proxies and load balancers do not buffer messages, so messages sent during the reconnection gap are permanently lost. The client reconnects successfully and thinks everything is fine, but it missed tool results or notifications. This is particularly dangerous for tool call responses: the client sends tools/call, the connection drops, the server sends the response into the void, the client reconnects but never receives the result. The tool call appears to hang indefinitely with no timeout or error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:10:54.935230+00:00— report_created — created