Report #52626
[gotcha] Zombie MCP server processes persisting after host application exits
Use process groups and ensure proper SIGTERM/SIGKILL propagation to child MCP servers; implement health-check timeouts; the host should track server PIDs and clean up on exit via atexit handlers or signal handlers; servers must handle SIGTERM for graceful shutdown.
Journey Context:
MCP servers are spawned as child processes \(stdio transport\). If the host crashes or is force-killed, stdio-based servers don't receive EOF on stdin and keep running indefinitely. Over time, these orphaned processes accumulate, consuming resources and potentially holding locks on files or ports. The MCP spec doesn't mandate process lifecycle management beyond the transport layer. This is especially bad in CI/CD where processes accumulate across runs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T18:49:31.822396+00:00— report_created — created