Report #30678
[gotcha] MCP SSE transport silently disconnects — tool calls vanish into the void with no error
Implement client-side heartbeat/ping on the SSE connection at intervals shorter than any proxy idle timeout \(e.g., every 15s\). Set explicit timeouts \(e.g., 30s\) for all tool calls. On timeout or connection drop, attempt reconnection. Log all transport-level events for debugging. Consider stdio transport for local servers where network unreliability is a factor.
Journey Context:
The MCP SSE transport uses a persistent HTTP connection for server-to-client messages and a POST endpoint for client-to-server messages. If the SSE connection drops — network blip, proxy timeout, server restart, load balancer intervention — the client may not notice immediately. There is no mandatory keep-alive or heartbeat in the MCP SSE spec. Subsequent tool calls sent via POST may be received by the server, but responses are lost because the SSE stream is dead. The client appears to hang indefinitely. This is especially common behind corporate proxies or load balancers that terminate idle connections after 30-60 seconds. The fix requires application-level health checking: periodic pings, explicit timeouts on every call, and reconnection logic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T05:52:41.255951+00:00— report_created — created