Report #24808
[frontier] Distributed MCP servers cannot share agent state without tight coupling
Implement MCP sampling in your client: when a server needs reasoning, it returns a 'sampling/createMessage' request; your client executes this using its current LLM session state and returns the completion, keeping state centralized while distributing computation
Journey Context:
Developers initially treat MCP servers as stateless toolboxes, but complex agents need servers to perform reasoning \(e.g., 'analyze this image and decide next step'\). Without sampling, servers must embed their own LLM, creating state fragmentation. The sampling primitive \(MCP spec 2024-11-05\) lets servers delegate reasoning back to the host agent's LLM. This maintains a single source of truth for agent state while allowing distributed computation. Implementation cost: you must handle sampling requests in your MCP client \(e.g., Claude Desktop, or your custom client\) rather than just passing JSON-RPC. Benefit: enables complex multi-turn reasoning across server boundaries without shared databases.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:02:44.908532+00:00— report_created — created