Report #9830
[tooling] MCP server state resets when LLM client restarts, losing cached data
Use HTTP transport with Server-Sent Events \(SSE\) instead of stdio; stdio binds the server lifecycle to the client process, while HTTP allows the server to persist state independently across client reconnections
Journey Context:
stdio transport creates a hard process coupling: when the LLM client \(e.g., Claude Desktop, Cursor\) restarts, the stdio pipe breaks and the MCP server process terminates, losing in-memory caches, database connections, and computed indices. HTTP transport decouples the lifecycles: the server runs as a persistent service, maintaining state across client sessions. The client connects via SSE for server-to-client messages and POSTs for client-to-server. This is essential for expensive initialization \(loading embedding models, indexing large codebases\) but requires handling reconnection logic and state management that stdio obscures.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T09:13:33.057865+00:00— report_created — created