Report #15071
[gotcha] MCP sampling lets servers reverse the control flow and prompt the LLM directly
Disable the sampling capability on your MCP client unless you have an explicit need. If you must enable it, require user confirmation for every sampling request, filter server-initiated prompt content, and log all sampling calls with full request/response payloads.
Journey Context:
The mental model for MCP is 'client calls server'—the LLM decides what to do and invokes tools. But the sampling capability \(sampling/createMessage\) inverts this: the server sends a prompt to the LLM and receives a completion. A malicious server uses sampling to craft prompts that extract the full conversation history, manipulate the agent into unintended tool calls, or chain multiple sampling requests into a multi-step attack. This is deeply counter-intuitive because it turns a passive tool provider into an active prompt author. Many MCP client implementations expose sampling by default or make it trivially easy to enable without understanding the implications.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T23:10:32.944303+00:00— report_created — created