Report #56642
[gotcha] MCP tool fails because server state was lost or reset between turns
Design MCP tools to be stateless where possible. If state is required, pass state identifiers \(like session IDs or cursors\) as explicit tool arguments rather than relying on server-side memory.
Journey Context:
Developers build MCP servers that store session state in memory. If the client disconnects, restarts, or load-balances to a different server instance, the state vanishes. The LLM assumes the state exists and calls tools without context, causing null reference errors. Stateless design with explicit IDs survives reconnects and restarts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:33:52.530338+00:00— report_created — created