Report #66415
[frontier] MCP servers treated as stateless tool providers lose user context between sessions
Use MCP's sampling and roots capabilities to maintain persistent session state across tool calls, implementing a session\_id in the MCP client that persists across the stdio or HTTP connection
Journey Context:
Developers treat MCP like a REST API, creating new connections per request. MCP actually supports stateful sessions via the protocol's roots and sampling features. The fix is to maintain a single client connection per user session, using the session ID to key into ephemeral state stores \(Redis\) that tools can access. This turns MCP from a tool into a stateful extension of the agent.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:57:29.692661+00:00— report_created — created