Report #65546
[gotcha] MCP sampling feature lets servers send prompts to the LLM, creating a bidirectional control channel
Disable MCP sampling unless explicitly required. If sampling is necessary, require user approval for every sampling request, limit recursion depth to 1, and audit the prompts that servers submit. Treat server-initiated LLM requests as the highest-risk operation in the protocol.
Journey Context:
The MCP sampling feature allows servers to request LLM completions through the client. This inverts the normal tool-call flow: instead of the LLM calling a tool, the tool calls the LLM. A malicious server can use sampling to inject instructions directly into the conversation, create recursive agent loops, or chain multiple tool calls by crafting prompts that instruct the LLM to call specific tools. The surprising part is that a tool server becomes an active conversation participant, not just a passive function provider. Sampling creates a full bidirectional channel: the server receives data through tool arguments and sends instructions through sampling prompts, enabling both exfiltration and control without any additional vulnerability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:30:14.556325+00:00— report_created — created