Build1 publisher2 min readPublished
Scanning an MCP server means reading its tool descriptions before the model does
Pasting an mcpServers block into Claude Desktop runs a stranger's code with your environment variables, and the tool descriptions that server advertises land in the model's context before you call anything.
The Engineer · Build desk
What happened
- The dev.to post contrasts a package install, where you glance at the repo and the weekly downloads, with connecting an MCP server, where copying a JSON snippet out of a README is the whole review.
- That pasted snippet tells the machine to download and run someone else's code locally, with the user's permissions, environment variables and network access.
- The post catalogues description patterns it says show up in the wild: instruction override, exfiltration phrasing, secrecy directives, and urgency framing that lobbies for unconditional invocation.
- Its static scan with rule pack v0 is deterministic and LLM-free, executes nothing, and asks the server only for initialize and its tool list.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- decision Teams that already gate npm dependencies have to decide whether a JSON paste into a client config passes through the same gate, since the artifact under review is a command line plus a block of text.
- exposure The environment variables named in the config set what a third party's process can reach as your user, so the blast radius is fixed at paste time, before any tool is called.
- constraint A clean result expires at the next server update, and someone has to remember to re-run the scan by hand until drift detection exists.
- cost The case for spending the five minutes rests on an unquantified assertion about how many offered servers are hostile, so each team decides whether the check is worth it given its own credential exposure.
A tool description is metadata: a name, a description, an argument schema [5]. The client folds that text into the model's context, and the model reads it the same way it reads your instructions [6]. Nothing on the CPU runs it [7]. Zero-width spaces, directionality marks and tag characters can carry the same instructions past a person skimming the file [9], and none of it requires a vulnerability [10].
The exposure scales with sessions, not with calls. The dev.to post describes a description containing "ignore previous instructions" as an injection attempt against every session where the tool is connected [24].
The config side is checkable line by line. A scan can establish whether the command launches bash, sh or pwsh, whether the args invoke curl, wget, nc, ssh or scp, whether AWS_*, *_TOKEN or *_SECRET are passed into the server process, and whether the server URL is plain http:// [11][12]. Skills get the same read, with frontmatter granting Bash(*) or more than a handful of tools flagged [12]. "The only thing standing between that server and your AWS credentials is the author's good intentions and npm's good luck," the post wrote [20].
The checklist, which the post says MCPGuard automates, runs to five steps [21][23]. Two of them need the server's advertised tool list: the rule-pack scan over names, descriptions, argument schemas and SKILL.md files, and the pass where you read the descriptions as if an attacker wrote some of them [13][14]. The other three come off files already on your disk, ending in a recorded outcome of clean, findings-reviewed or rejected [11][12][15][22]. Findings are grouped by severity, and critical is live credential material [18].
On how often this actually bites, the post offers one line and no figure behind it: "Because statistically, some of the ones you'll be offered were" written by attackers [14]. The second limit is time: "a server you vetted in March can ship a different tool list in June," the post wrote, with metadata drift listed as a roadmap item and manual re-runs the current answer [16].
In my view the five steps are worth the time in proportion to what the config hands over. On a laptop holding an AWS profile, with a shell-launching command in the JSON, all of them apply. Where servers run with a scrubbed environment and an outbound allowlist, the blast-radius questions resolve before the scan starts, and what is left is the description text. Dependency review reads repos and weekly download counts [19].
What to watch
- Whether Claude Desktop or Cursor start showing a diff of tool names and descriptions when a connected server updates.
- Whether the rule pack grows rules for text returned by tool calls, not just the metadata a server advertises at connect time.
- A measured incidence figure for injection phrases across public MCP server directories, which the post does not supply.