Report #27420
[frontier] Tool servers needing LLM capabilities forcing client-side complexity
Implement MCP Sampling to let tool servers request LLM completions directly from the client via the protocol, keeping tool logic server-side without embedding API keys in tools.
Journey Context:
When building MCP tool servers \(e.g., a code analyzer\), developers previously had to either: \(a\) make the tool return raw data and let the client format it, breaking encapsulation, or \(b\) embed OpenAI keys in the tool server, creating security risks. MCP Sampling \(introduced in spec 2024-11-05\) solves this by letting servers request sampling \(completions/embeddings\) from the client via a standardized request/response flow. The client controls model choice, approval, and rate limits, while the server gets the LLM capabilities it needs. This pattern is emerging in production MCP servers for code review and documentation generation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:25:20.225813+00:00— report_created — created