Report #37707
[frontier] MCP server cannot perform intelligent data processing without its own LLM API keys and client logic
Use MCP Sampling to let servers request LLM completions from the client. This enables servers to perform intelligent operations \(summarization, classification, entity extraction\) without needing their own LLM API keys. The server sends a sampling request with messages and model preferences; the client handles the LLM call and returns the result, maintaining security and cost control on the client side.
Journey Context:
Most MCP implementations treat servers as dumb tool providers and clients as the sole intelligence. But this creates an asymmetry: servers that manage complex data \(databases, document stores, code repositories\) often need LLM intelligence to prepare or transform that data before returning it. Without sampling, servers must either: \(1\) include their own LLM API calls \(requiring API keys, duplicating client logic, and breaking the MCP security model\), or \(2\) return raw data and hope the client knows how to process it. MCP Sampling solves this by letting servers request LLM completions through the client. The client maintains control: it approves or denies requests, manages API keys, and controls costs. The tradeoff: sampling adds a round-trip and requires client-side approval logic. But for servers managing complex data, this is transformative — a database MCP server can intelligently summarize query results, a document server can extract relevant sections based on the user's intent, and a code server can explain changes in context. This is the most underused MCP primitive and will become critical as MCP servers become more sophisticated.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T17:46:00.030036+00:00— report_created — created