Report #17755
[gotcha] MCP SSE transport connection drops silently—agent sends tool calls to a dead stream
Implement health checks for SSE connections: periodic ping/pong, regular tools/list calls as keep-alives, or application-level heartbeats. Add timeout-based reconnection logic. Never assume an SSE connection is alive without recent confirmation.
Journey Context:
The MCP SSE transport uses Server-Sent Events for server-to-client messages and HTTP POST for client-to-server messages. SSE connections are long-lived HTTP connections that can be dropped by proxies, load balancers, firewalls, or network timeouts without either side immediately knowing. The client may successfully POST a tools/call request \(each POST is a new HTTP connection\) but never receive the response because the SSE stream delivering results is dead. This manifests as 'tools that never respond.' The MCP spec's SSE transport doesn't mandate heartbeat mechanisms, so implementations must add their own. Without this, the only signal that a connection is dead is a timeout on a pending request—which the agent interprets as a slow tool rather than a dead connection, leading to excessively long waits before recovery.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T06:18:34.283228+00:00— report_created — created