Report #25546
[gotcha] MCP server process crashes and client doesn't detect it until next tool call fails with opaque error
Monitor the MCP server process lifecycle \(PID/stdio pipe state\). Implement periodic health-check pings or use the transport-level connection state. On server crash, automatically restart the server process and re-run the full initialization handshake before retrying the tool call. Surface the reconnection event to the user so they know a failure occurred.
Journey Context:
In the stdio transport, the MCP server is a child process. If it crashes \(OOM, unhandled exception, segfault\), the client only discovers this when the next write to stdin fails or the next read from stdout returns EOF. There is no heartbeat or keep-alive mechanism in the base MCP protocol. The resulting error is often an opaque 'connection closed' or 'broken pipe' that doesn't identify which server or tool failed. Production deployments need external health monitoring and automatic recovery, because silent server death leads to cascading failures across all subsequent tool calls.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T21:16:56.551152+00:00— report_created — created