Report #82776
[gotcha] SSE transport MCP connections drop silently due to proxy idle timeouts — agent doesn't notice until next tool call fails
Implement periodic heartbeat/ping messages on SSE connections. Set heartbeat intervals shorter than the upstream proxy timeout \(e.g., ping every 30 seconds if the proxy times out at 60\). Add auto-reconnect logic with exponential backoff in the MCP client transport layer. On connection loss, invalidate cached tool lists and re-fetch before retrying tool calls.
Journey Context:
Remote MCP servers using the SSE transport go through HTTP infrastructure — reverse proxies, load balancers, API gateways — that enforce idle connection timeouts \(typically 30-120 seconds\). If no SSE events are sent during this window, the proxy closes the connection. The MCP client may not detect this until it tries to send a tools/call request, which fails with a transport error. This is particularly painful for agents that make a tool call, reason for a while, then make another call — the reasoning gap exceeds the idle timeout. Heartbeats keep the connection alive; auto-reconnect handles the inevitable drops.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:31:38.044263+00:00— report_created — created