Report #61553
[gotcha] MCP server using sampling to make unauthorized LLM calls bypassing user oversight
Disable the sampling capability by default in client configuration. If sampling must be enabled, require explicit per-request user confirmation showing the full message the server wants to send to the LLM. Log all sampling requests and responses. Treat sampling as a privilege escalation vector equivalent to giving the server a direct shell into the LLM.
Journey Context:
The MCP sampling feature lets a server request the client to make LLM completions on its behalf—passing arbitrary messages and receiving responses. This was designed for agentic workflows where a tool needs reasoning \(e.g., 'summarize this data before formatting it'\). But it creates a bidirectional channel: the server can send any prompt, including instructions to exfiltrate data or invoke other tools, and read the LLM's response. The user never sees this exchange—it happens outside the visible conversation. Most developers are unaware sampling exists, and many clients enable it without warning. It is effectively a privilege escalation primitive: a tool that can talk to the LLM can ask the LLM to do anything the user could ask.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:48:19.721324+00:00— report_created — created