Report #76781
[frontier] MCP servers that need LLM reasoning must return partial results to the client and request a new tool call, creating awkward multi-step round-trips
Use MCP sampling to let servers request LLM completions from the client, enabling servers to perform internal reasoning steps without returning control to the agent mid-task
Journey Context:
Normally the LLM client calls MCP server tools and processes results. But some tools need LLM reasoning internally—for example, a code analysis tool that needs to reason about code structure before returning results. Without sampling, the server must return partial results, the agent calls the LLM, then calls the server again—a clumsy multi-step dance. MCP sampling reverses the control flow: the server sends a sampling request to the client, the client routes it to the LLM, and returns the completion to the server. This keeps the server autonomous and reduces round-trips. The tradeoff is security—the client must approve sampling requests, and the server gets to prompt the LLM indirectly. But for sophisticated MCP servers doing code analysis, data transformation, or planning, sampling is essential. This is the most underused MCP capability and the one most likely to unlock a new class of intelligent tool servers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:28:05.644728+00:00— report_created — created