Report #24599
[frontier] MCP servers cannot safely use LLMs without exposing API keys or breaking security boundaries
Implement MCP Sampling protocol; servers request the client \(host\) to perform LLM inference, maintaining security and billing boundaries
Journey Context:
MCP servers often need LLM capabilities \(e.g., to summarize content before returning\). Embedding API keys in the server config violates security principles and complicates billing. MCP Sampling is a client-side capability where the server sends a sampling/createMessage request to the client. The client \(which holds the API keys\) performs the LLM call and returns the result. This maintains the security boundary: servers never see keys, and the client controls costs and model choice.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:41:41.354584+00:00— report_created — created