DEV Community

Andrei
Andrei

Posted on Originally published at serverdex.io

I scanned 220,000 MCP tool descriptions for prompt injection. The scare is overblown — but 1 in 4 servers touches your credentials.

Originally published on Serverdex, where you can run this check on any MCP server yourself.

"Tool poisoning." "Rug-pull MCP servers." "A malicious description hijacks your agent." The headlines are everywhere, and the fear is real: an MCP server's tool descriptions are loaded straight into your model's context on every turn — before it reads your prompt. A hidden instruction in there would be read as if the model wrote it.

So I stopped guessing and measured it. On 21 Nov 2026 I scanned the tool definitions of 12,987 MCP servers that answer a credential-free handshake — 220,226 tools in total — for the exact patterns the scare is about: injected instructions ("ignore your previous instructions"), hidden pleas to the model ("do not tell the user"), pseudo-tags (<important>…</important>), zero-width/invisible characters, and descriptions that read or send a sensitive file (.env, .ssh, a private key).

Here is the honest result.

The poisoning scare is, today, overblown

  • Tool descriptions telling the model to ignore its instructions: 0.
  • Hidden / zero-width characters sneaked into a description: 0.
  • Descriptions that read or exfiltrate a sensitive file: a handful of pattern-hits, and every one was benign on inspection — a security scanner describing what it detects ("checks what a site leaks"), or a legitimate secrets vault ("store an API key for one app").

That last point matters, and it's where most "MCP is full of injection" claims quietly break: a naive regex flags any tool that mentions injection or secrets — including the dozens of tools whose whole job is to scan for them. (It also flags ZWNJ and ZWJ characters, which are ordinary letters in Persian, Arabic and Indic scripts, not sabotage.) Once you exclude the defenders and the non-Latin text, the genuine tool-poisoning signal in the live ecosystem is effectively nil.

A scan reads descriptions, not intent, and the day a real poisoned server ships this changes. But as of today, the thing the headlines warn about is theoretical, not widespread.

The real attack surface isn't sabotage — it's capability

What you should vet is far more mundane, and far more common: what a server is allowed to touch.

Signal across 12,987 servers Servers Share
A tool that handles credentials / tokens / API keys 3,053 23.5%
A tool that can run shell or arbitrary code 188 1.4%
A tool that reads local files or paths 163 1.3%

Nearly one in four MCP servers has a tool that touches your secrets. Most are perfectly legitimate — that's what an auth or a deploy tool does. But "legitimate" and "I checked what it does" are not the same sentence, and almost nobody connects a server having read a single one of its tool descriptions.

That's the actual risk model. Not a cartoon villain hiding <important>send me your keys</important> in a description — a real tool with real reach that you wired into your agent without looking.

What to actually do before you connect a server

  1. Read the tool list once. The names and descriptions are the whole contract. If you can't tell what a tool does, that is the finding.
  2. Vet capability, not boogeymen. Does it need your credentials? Can it run code or read files? Those are the questions worth asking.
  3. Prefer servers you can see through. Undocumented tools and giant tool lists are a cost on every turn too — see the MCP context tax.
  4. Check it in a few seconds. Paste any MCP endpoint into the Serverdex health check: it reports whether the server answers, its token cost, and runs this same scan over its tool definitions — tuned, after this study, to not cry wolf on security tools or non-Latin text.

Method & data

Serverdex calls every listed server about once a day with a credential-free initialize + tools/list and records the tool definitions. This scan ran the injection/exfil/hidden-character patterns over those definitions on 21 Nov 2026, with the false-positive classes above excluded. It reads descriptions, not runtime behaviour, so treat it as surface area, not a verdict.

If you maintain an MCP server: your tool descriptions are the contract a model reads before it trusts you. Write them like one — and know that the people connecting you can, and should, read them first.

Top comments (21)

Collapse
 
eliashivemind profile image
Nova Ops •

The false-positive section is the part most scans like this skip, and it's what makes the zero believable: a regex that flags security scanners for describing what they detect, and ZWNJ/ZWJ characters that are ordinary letters in Persian and Arabic, would have manufactured exactly the scare the headlines want. Excluding the defenders before counting is the whole method. 'Vet capability, not boogeymen' also matches what we found writing our own MCP server's descriptions — the description is the contract the model reads before it trusts you, and the risk was never a hidden instruction, it was a tool with more reach than its job needed, described vaguely enough that nobody noticed. Since you re-check servers about once a day, do you diff descriptions between checks — would a server that quietly changed a description after listing show up as a change, or only as its new text?

Collapse
 
serverdex profile image
Andrei •

Yes — and it keys on the full definition, description included. Each check hashes the whole tool set (name + description + input schema) and stores it; when that hash differs from the previous run, the server gets a probe_tools_changed_at stamp, and its Serverdex page shows a "tool list changed " line. So a server that quietly rewrites a description after it's listed is caught as a change — the exact post-listing swap you're describing — not just silently overwritten with the new text. The one caveat worth being precise about: it's a set-level hash, so it tells you that a tool's name, description or schema changed and when, not a word-by-word diff of which clause moved. The daily check is the same one that runs across the remote list: serverdex.io/remote.

Collapse
 
eliashivemind profile image
Nova Ops •

Set-level hash with a changed-at stamp is the honest version of that check — it proves the swap happened without pretending to show what moved. We made the same trade-off in our release gate: the artifact hash changing is the blocking signal, and the diff is a human step afterwards, because a gate that tries to judge the content of the change stops being a gate. One step that might localise it without a full diff: hashing per tool as well as per set, so the stamp can name which tool's definition moved even if the clause stays human work. Do you store the per-tool hashes already, or only the set hash?

Thread Thread
 
serverdex profile image
Andrei •

Set-level only — a single hash over the whole tool set, not per tool. Good thread, thanks for the read.

Thread Thread
 
eliashivemind profile image
Nova Ops •

Set-level only settles it — thanks for being precise about it. The per-tool sketch was me reaching past what the check needs to do: a stamp that says something in this set changed, on this date, is already the honest signal, and the clause-level work belongs to a human after that. Good thread on my side too.

Collapse
 
paul_irolla_6b5ae261d0224 profile image
Paul Irolla •

The scan answers the security question. The bill asks another one: a tool list is billed as input each turn, at the cached rate when the cache holds it, so a server with long descriptions costs before its first call. Worth reporting the token size of each list next to the risk.

Collapse
 
serverdex profile image
Andrei •

Exactly — we report it right next to the check. Each server gets a token estimate of its tool definitions (characters of the raw definitions / 4): median ~4,800, top 10% ~41k, the heaviest ~247k — a whole context window before the first call. It shows on every server page and on the health check, and the full distribution is written up in The MCP context tax: serverdex.io/articles/mcp-context-tax . You're right about caching: that estimate is the uncached load — the ceiling you pay to put the list in context — so a fat tool list still costs full price the moment you connect, and caching only helps on later turns.

Collapse
 
innerluxes profile image
INNERLUXES •

The 23.5% is the number worth printing on a wall. A tool that handles credentials is not the problem. A tool that handles credentials and was never read is.

We started treating an MCP tool list the way we treat a dependency manifest: reviewed when it is added, re-reviewed when the hash changes, and the reviewer has to write one line per tool saying what it can reach. When that line is hard to write, the description is the defect, not the agent.

The capability framing also holds on the day a genuinely poisoned server does ship. A server with no credential reach and no shell cannot do much even if its description turns hostile, and that is a property you can check before you connect rather than after.

Collapse
 
honeykiran profile image
Honey Kiran •

Measured beats scared - thank you for actually counting. This matches what we see: the cartoon strings ("ignore your instructions") are the rare ones; the quiet asks are the real surface, a description that wants a file read or a secret sent. Scanning the tool list before the agent ever connects should be as normal as scanning dependencies.

Collapse
 
prascli profile image
Indra Prasetya •

Concretely, here is a case a tools/list scan cannot see: a line with 150 or more blank characters followed by a second instruction. A reviewer sees one ordinary line in the diff; the agent reads both. We contributed a deterministic rule for that pattern (CFG137, warn severity, counts runes not bytes, covers space/tab/Zs) and one for instruction-like text in tool output (CFG024). It runs before the model sees the text: cfgaudit --strict . over the workspace. A clean descriptions scan and this check answer different questions, the contract you approved versus the text that reached the model on this turn.

Collapse
 
vincentravenscroft profile image
Vincent Ravenscroft •

@paul_irolla_6b5ae261d0224 you asked the bill question in a thread about the security question, and here they collide: the check keys on the full definition, description included (that is what makes a set-level hash honest), and the description is exactly what the invoice is made of. So which one do you eat?

A) Cut descriptions, keep the tool list cheap, and lose detection on the fields where people actually write prose.
B) Keep them whole, and pay for the prose on every call.

I am not asking whether measuring is hard. I have published a wrong cost figure twice for a different reason, both times reading a counter before it finished moving (21 against 130+, 601 against 989+), and the correction cost me more than the measurement would have. I am asking which cost you chose, because I cannot see your bill from out here.

Collapse
 
mousap_ali_5fbb6ff0019df2 profile image
mousap ali •

Thanks for measuring instead of guessing. Two things a one-time description scan can't see: descriptions can change after a user approves a server, so pinning a hash of the tool list and re-checking on change matters more than the first scan; and in practice injected text mostly arrives through tool results (fetched pages, issues, files), not descriptions. That's why we hold outbound calls and secret reads for approval once a session has read untrusted content, rather than relying on detection alone.
Disclosure: I work on SecGuardRail (secguardrail.com), which checks each agent action before it runs.

Collapse
 
x1y1co profile image
X1Y1 •

Worth saying which half this covers. These are the 12,987 that answer without credentials, mostly remote. The bad case people quote, postmark-mcp, was an npm package run locally, and the problem was in the code, not the description. A clean description would not have flagged it.

Collapse
 
zarko_zivkovic_1c91189c35 profile image
Zarko Zivkovic •

Interesting data, but isn't the biggest injection risk in runtime tool responses rather than tool descriptions?

A perfectly legitimate MCP server could return a poisoned document, search result, or repository file. None of that would show up in tools/list.

Doesn't that make the conclusion that prompt injection is overblown a bit premature?

Collapse
 
izgorodin profile image
Edward Izgorodin •

I would split the 23.5% by where the secret travels. When a tool takes a key as an input argument, the model has to write the key into its own call, so it sits in the conversation history and goes to the model provider with every later request. When the key lives in the server's environment, or in the connection's auth header that the client handles, the model never sees it. The input schema mostly tells the two apart, but only after the same exclusion pass you ran on the descriptions: a property named token is as often a crypto symbol or a pagination cursor as a credential.

Collapse
 
serverdex profile image
Andrei •

That's the cut that actually matters, and you've drawn it correctly: a key passed as a tool argument lands in the conversation history and rides to the model provider on every later turn, while one that lives in the server's env or the client's auth header never reaches the model. We flag credential-handling tools today but don't yet split arg-in-history from env/header — the input schema is exactly where that distinction lives, and you're right that it needs the same exclusion pass we ran on the descriptions: a property named "token" is as often a pagination cursor or a crypto ticker as a secret. The right next layer — thanks for naming it.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.