patchbay audit
mediumSAMPLING-001source-confirmed

Server advertises deprecated sampling capability

The server advertises the `sampling` capability, which is deprecated in MCP 2026-07-28 and scheduled for removal 2027-07-28.

What it means

Sampling lets the server request LLM completions from the client's model. Beyond the deprecation window, the attack surface is notable: the server's prompts reach the client's model with no boundary against user-originated prompts (direct prompt-injection pathway), and the client pays for completions the server demanded (quota exfiltration). Many servers advertise sampling because an SDK template left it on, not because they need it.

How to fix

Remove `sampling` from the advertised capabilities if the server does not actually use it. If it is needed, document the exact use case, enforce human-in-the-loop on every sampling request client-side, and plan a migration before the 2027-07-28 removal window.

See it live

Our demo MCP server trips SAMPLING-001 on purpose. Scan it and you'll see this exact finding with evidence and fix text.

npx -y @patchbay-nebius/agent audit https://demo.patchbay-mcp.dev/mcp

Run the check against your own server:

npx -y @patchbay-nebius/agent audit <url-or-directory>

No install: scan an MCP server in the browser and get a shareable report.

Disagree with this finding on your server? Open an issue with the --json output. False-positive reports are the most useful feedback.