MCP SSE client hangs indefinitely on dropped connection
Resolved 💬 3 comments Opened Feb 17, 2026 by mudgesbot Closed Feb 21, 2026
Description
When using an MCP server over SSE transport (e.g., via Tailscale to a remote host), if the network connection drops mid-session, Claude Code hangs indefinitely when it next tries to call an MCP tool. The user must press Esc to cancel and manually reconnect the MCP server.
Steps to Reproduce
- Configure an MCP server with SSE transport (e.g.,
claude mcp add mem0-local --transport sse http://remote-host:8050/sse) - Start a conversation and use MCP tools successfully
- Cause a network interruption (Tailscale hiccup, Wi-Fi drop, server restart, etc.)
- Try to use an MCP tool again — Claude Code hangs with no timeout or error
Expected Behavior
- MCP tool call should timeout after a reasonable period (e.g., 30-60s)
- Claude Code should display an error like "MCP server unreachable" and offer to reconnect
- Ideally: automatic reconnection attempt before failing
Actual Behavior
- Claude Code blocks indefinitely waiting for a response on the dead SSE connection
- No timeout, no error message
- User must press Esc to cancel, then manually reconnect the MCP (
/mcp→ reconnect)
Root Cause Analysis
- TCP keepalive defaults on macOS are ~2 hours, so the OS doesn't detect the dead connection quickly
- The MCP SSE client doesn't implement any request-level timeout
- No SSE heartbeat/keepalive detection on the client side
- Server-side SSE keepalive pings can help the server detect dead clients, but don't fix the client hanging
Environment
- Claude Code CLI (latest)
- macOS (Sequoia 15.3)
- MCP server: SSE transport over Tailscale VPN
- Reproducible with any SSE MCP server when network drops
Suggested Fix
- Add a configurable timeout to MCP tool calls over SSE (default ~30-60s)
- Detect stale SSE connections (e.g., expect periodic keepalive events)
- Auto-reconnect on connection failure before returning error to user
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗