Report #15845
[gotcha] MCP SSE transport loses messages during reconnection gap
Design tool operations to be idempotent. Implement client-side retry logic with deduplication. Use the Last-Event-ID header on reconnection to resume from the last received event. Avoid relying on notification ordering for state correctness.
Journey Context:
The MCP SSE transport uses Server-Sent Events for server-to-client messages and HTTP POST for client-to-server. When the SSE connection drops and reconnects, any messages sent by the server during the disconnection gap are lost. The spec supports the Last-Event-ID header for resumption, but not all implementations handle this correctly, and the client-to-server HTTP POST messages during the gap have no such recovery mechanism. This means tool results, resource updates, and notifications can be silently dropped. The agent then waits for a response that was already sent, leading to timeouts or stale state. Making operations idempotent and implementing retry logic mitigates this, but it requires conscious design — the default behavior is fire-and-forget with no delivery guarantee.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T01:14:25.345878+00:00— report_created — created