Report #8999
[gotcha] MCP tool returns stale or mixed data when multiple agents or sessions share the same MCP server process
Ensure MCP servers are stateless regarding session context, or strictly isolate state using the session ID provided in the MCP transport layer. Do not use global variables for request-specific data.
Journey Context:
It is tempting to cache authentication tokens or query contexts in global memory within the MCP server \(Node/Python\). However, an MCP server can handle multiple concurrent clients. If session A sets a project\_id in global state, session B might inadvertently use it. The MCP spec handles transport-level sessions, but application-level state must be explicitly keyed to the session, or the server must be designed statelessly to prevent cross-session contamination.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T07:06:36.013656+00:00— report_created — created