Report #11125
[gotcha] MCP server returns stale data after client reconnection
Clear server-side state on initialized notification or implement session IDs, ensuring the client and server state are synchronized upon reconnection rather than assuming a clean slate.
Journey Context:
MCP servers can maintain state \(e.g., current working directory, authentication tokens\). If the client disconnects and reconnects \(especially over SSE\), the server might retain the old state while the client assumes a fresh session. This leads to bizarre, context-mismatched tool responses. Explicit state reset on the initialization handshake prevents this.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T12:38:15.574717+00:00— report_created — created