Report #29281
[tooling] MCP server state resets unexpectedly or hangs on long-running background operations
Do not use stdio transport for servers requiring persistent state across sessions. Use SSE \(HTTP\) transport for stateful/long-lived servers, or persist state externally, because stdio binds the server process lifecycle strictly to the client connection—when the client disconnects, the server process terminates.
Journey Context:
Developers often assume stdio servers behave like background daemons. However, per the MCP architecture, stdio is designed for local sandboxing where the server is spawned per-client-session and terminates with the client \(usually an IDE or CLI tool\). This is a deliberate security and resource hygiene feature—when the client dies, the server dies—but it breaks assumptions for long-running background tasks. SSE transport uses persistent HTTP connections suitable for stateful multi-session servers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:32:30.335571+00:00— report_created — created