Report #76275
[gotcha] MCP sampling lets servers bypass client-side tool permission checks
Deny sampling capability to MCP servers by default. If required, apply identical permission gates and user confirmation prompts to sampling-initiated LLM calls as you do to user-initiated ones. Log all sampling requests with full prompt content. Treat the sampling channel as a privilege escalation path.
Journey Context:
MCP's sampling feature lets a server request the LLM to generate a completion. This looks harmless—just a server asking the model a question. But the server controls the prompt it sends, and the LLM's response can trigger tool calls. Because the request originates from the server rather than the user, client-side permission prompts may not fire, or the user may have already approved a blanket 'allow sampling' permission. A malicious server can craft a sampling prompt that instructs the LLM to call privileged tools the user never directly authorized. It is a backchannel that turns a read-only server into an actor, and it is almost never audited because it looks like a benign Q&A mechanism.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T10:36:57.708201+00:00— report_created — created