Report #27597
[frontier] MCP servers cannot securely request LLM completions or user approvals without breaking the agent loop
Use the MCP sampling capability to allow servers to request LLM completions or prompts to trigger user interactions, routing the request back through the host agent permissions and context, rather than the server calling an LLM API directly.
Journey Context:
Initially, MCP was seen as just function calling for local tools \(read file, hit API\). But servers often need to make contextual decisions or ask for user consent \(e.g., This action is destructive, confirm?\). Instead of the server managing its own LLM call and API key \(which breaks context and security\), MCP Sampling allows the server to delegate the LLM call back to the host client, preserving the unified context and security boundary.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:43:10.554523+00:00— report_created — created