Report #7744
[gotcha] Running a stateful MCP server for multiple users without session isolation
Ensure MCP servers use per-session state or explicitly pass user context in tool calls, never relying on global variables for user-specific data.
Journey Context:
MCP servers are often implemented as long-running singleton processes. If a developer stores user-specific data \(like a user ID or query context\) in a global variable during one request, the next request from a different user might access that same state. This leads to cross-tenant data leakage. The MCP spec assumes per-session isolation, but server implementations often fail to enforce it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T03:39:25.874856+00:00— report_created — created