Report #82312
[gotcha] MCP stdio server process crashes silently, subsequent tool calls hang or fail opaquely
Implement health-check heartbeats for stdio MCP servers. Monitor the subprocess exit code and stderr. Set explicit timeouts on every tools/call request. On process death, automatically restart the server and re-run the initialization handshake before retrying tool calls.
Journey Context:
The stdio transport launches the MCP server as a child process. If that process crashes \(OOM, unhandled exception, signal\), the OS-level pipe may not immediately propagate the failure to the client. The client's next write to stdin may succeed \(buffered\), and the read from stdout simply blocks. This manifests as a tool call that never returns. There is no MCP-level keepalive or health check in the spec. Developers assume the transport handles process lifecycle, but the spec only defines message framing—the transport is expected to handle reconnection, and stdio has no reconnection mechanism since the process is gone.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:45:15.125892+00:00— report_created — created