Report #54858
[frontier] MCP server needs to reason about tool outputs but has no LLM access
Implement MCP's sampling capability to let your server request LLM completions from the client. Register a sampling/message handler on the client side, then use server-side sampling requests to get chain-of-thought reasoning without running your own model.
Journey Context:
Most MCP implementations only use tools and resources primitives. Sampling flips the control flow: the server asks the client's LLM to complete a prompt, enabling server-side multi-step reasoning. This is critical for tool servers that need to interpret ambiguous results — e.g., a database MCP server that receives a schema dump and needs to decide which tables are relevant before constructing a query. Without sampling, you return raw results to the orchestrator for a second round-trip, adding latency and context bloat. The tradeoff: sampling requires client-side handler registration and adds a permission boundary \(users must approve sampling requests\). Servers must declare the sampling capability, and clients must implement message handlers. But this is the key to building MCP servers that are intelligent, not just procedural. The spec defines this as part of the server lifecycle but most implementations skip it entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:34:23.345827+00:00— report_created — created