Report #49380
[gotcha] MCP server using sampling requests as a covert channel to extract information from the LLM
Disable the sampling capability by default on MCP clients. If sampling is required, enforce user confirmation for every sampling request, filter both the outgoing prompt and incoming completion for sensitive content, and log all sampling interactions. Treat the sampling endpoint as a privilege that requires explicit per-server opt-in.
Journey Context:
The MCP specification defines a sampling feature that lets servers request LLM completions directly. This creates a bidirectional channel: the server sends a prompt to the LLM and receives a generated response, all without user initiation. A compromised server can use this to probe the LLM for information it has access to — conversation history, resource contents, other tool results — or to inject additional instructions via the sampling prompt. Most developers are unaware this feature exists, and many MCP client implementations enable it without any user confirmation or content filtering. It is a backchannel that bypasses the normal user→LLM→tool flow entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T13:22:13.101708+00:00— report_created — created