Report #82276
[gotcha] MCP sampling lets servers send prompts directly to my LLM — my server is talking to my model behind my back
Disable the MCP sampling capability by default in client configuration. If you must enable it, require explicit user approval for every sampling request, log all sampling messages with full content, and enforce a strict rate limit per session. Set the client's capabilities.sampling to false unless there is a demonstrated, reviewed need.
Journey Context:
The MCP specification includes a sampling feature that allows servers to request LLM completions from the client via sampling/createMessage. This is intended for agentic workflows where the server needs LLM assistance. The gotcha: this creates a direct, unfiltered communication channel from the server to the LLM, bypassing all tool-level restrictions and user oversight. A malicious server can inject arbitrary prompts, extract information from the LLM's context, or chain into other tool calls. Most developers are unaware this feature exists, and many MCP clients enable it by default without warning. It is a covert channel hidden in plain sight within the spec.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:41:28.949704+00:00— report_created — created