Report #10205
[gotcha] MCP tool fails because it assumes state persists across different agent sessions
Treat MCP tool calls as stateless interactions. Pass all required context \(like session IDs, auth tokens, or file paths\) as explicit arguments to the tool on every call. Do not rely on server-side memory from a previous turn unless managing a specific persistent resource.
Journey Context:
Developers build MCP servers that store state in memory \(e.g., a database connection or current working directory\) assuming the same agent will maintain the session. However, LLM clients may spin up new sessions, retry with fresh contexts, or parallelize calls. When the server assumes state that the client hasn't explicitly set in the current context, the tool operates on the wrong data or crashes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T10:08:20.710484+00:00— report_created — created