Documentation

The method, in the open.

How HIA scans an MCP server, what it watches, and how a grade is decided. Nothing here is secret: a fair grade is one you can check.

How a scan works

  1. Prepare the room. A fresh home folder is filled with fake credentials, a certificate authority is created for this scan only, and an internal network is built with one other host: the sinkhole.
  2. Install. The package is installed with its normal installer (npm or pip) inside the sandbox. Install scripts run and are watched like everything else.
  3. Run. An MCP client starts the server, lists its tools, resources and prompts, and calls every tool with realistic arguments.
  4. Observe. Runtime hooks record files opened, programs started and environment variables read. The sinkhole answers every DNS, HTTP and TLS request and writes it down.
  5. Grade. Rules turn events into findings with evidence, then into a score and a letter. The room is destroyed.

Isolation

Untrusted code runs under gVisor (runsc), a user-space kernel that stands between the package and the host. In the cloud each scan gets a throwaway virtual machine with no IAM role, no public IP and no route to the internet; it is terminated after the scan, and a reaper kills any worker older than 15 minutes.

Containers also drop every Linux capability, cannot gain privileges, and are limited in memory, CPU and processes. Reports produced without gVisor are marked development only.

Bait credentials

Each scan plants new fake secrets where real ones usually live: ~/.aws/credentials, ~/.ssh/id_ed25519, a .env with GitHub and API tokens, and a few environment variables. They are unique to the scan, so if one shows up in the sinkhole, even base64, hex or split across DNS names, it is proof the server tried to steal it.

Bait values are masked in public reports.

What we observe

CategoryWhat triggers it
Secret exfiltrationA bait secret reaches the sinkhole. Hard proof: grade F.
Credential file accessReads of ~/.aws, ~/.ssh, .env, kube configs, beyond what the tool declares.
Undeclared networkDNS, HTTP or TLS traffic although no tool says it uses the network.
Network at installInstall scripts that phone home.
Process executionShells, curl, wget, nc started by a tool or an install script.
Secret env readReading tokens from environment variables the tool has no reason to use.
Tool poisoningInstructions aimed at the AI agent inside tool descriptions.
Injection in responsesThe same kind of instructions inside tool results.
Hidden charactersZero-width, bidi or control characters in text the agent will read.
Path traversal, SSRFTools that can be steered to read any file or call internal addresses.

A benign tool that clearly declares a behavior (a weather tool calling its weather API, an SSH helper reading ~/.ssh/config) is judged in that light.

Grading

The score starts at 100. Each finding removes points: critical 100, high 35, medium 15, low 5, multiplied by the confidence of the finding. Points are counted once per category, so ten copies of the same event do not sink a server alone.

GradeScoreMeaning
A90–100No risky behavior was seen.
B75–89Minor concerns. Read the findings.
C60–74Risky behavior. Install only if you understand why.
D40–59Serious concerns.
F0–39, or any hard proofDo not install.

When fewer than 70% of the tools could be exercised, the report and the badge say low coverage.

Not graded

If the server could not start or listed no tools, or if the network self-test failed, HIA did not see enough to judge. Such a scan gets no letter and no score, because "no findings" would wrongly read as safe. A leaked bait secret is still an F: proof does not need a complete scan.

Rug pulls

Every scan keeps a snapshot: tool descriptions and schemas, hosts contacted, programs started, finding categories. A new version is compared with the previous one. HIA flags a suspected rug pull when a description gains instructions or hidden characters, a new flagged tool appears, a new network tool is started, or new hard proof shows up. Benign edits are listed too, quietly.

Badge

Each server has a badge that follows its latest scan. Add it to a README:

[![HIA grade](https://hia.example/data/badges/<server>.svg)](https://hia.example/report.html?id=<scan-id>)

The exact snippet for a server is on its report page. The badge only ever contains a grade from a fixed set.

Report safety

A report shows text written by the package author, who may be hostile. So the site never interprets it: every string is inserted as plain text, hidden characters appear as ⟨U+XXXX⟩, scripts only come from this site, and local paths and raw install logs are never published.

Standards

Every finding links to the OWASP Top 10 for Agentic Applications (2026), to its CWE weakness and to the part of the MCP specification it concerns. The table is static, so every link can be checked.

FindingOWASP Agentic Top 10CWE
Honeytoken exfiltrationASI04 Agentic Supply Chain Vulnerabilities, ASI03 Identity and Privilege AbuseCWE-506, CWE-200
Sensitive file accessASI03 Identity and Privilege Abuse, ASI04 Agentic Supply Chain VulnerabilitiesCWE-200
Secret env readASI03 Identity and Privilege AbuseCWE-526
Undeclared networkASI04 Agentic Supply Chain VulnerabilitiesCWE-506
Install networkASI04 Agentic Supply Chain VulnerabilitiesCWE-829
Process executionASI05 Unexpected Code Execution (RCE)CWE-494
Tool poisoningASI01 Agent Goal Hijack, ASI04 Agentic Supply Chain VulnerabilitiesCWE-1427
Response injectionASI01 Agent Goal Hijack, ASI06 Memory and Context PoisoningCWE-1427
Hidden charactersASI01 Agent Goal Hijack, ASI09 Human-Agent Trust ExploitationCWE-451
Path traversalASI02 Tool Misuse and ExploitationCWE-22
SsrfASI02 Tool Misuse and ExploitationCWE-918
Declared vs observedASI04 Agentic Supply Chain VulnerabilitiesCWE-506
Rug pull (drift)ASI04 Agentic Supply Chain Vulnerabilities, ASI01 Agent Goal HijackCWE-506

FAQ

Is an A a guarantee?

No. It means one dynamic scan in a sandbox saw no risky behavior. Malware can wait for a date, a specific input or a real network. HIA raises the bar; it does not replace judgment.

Does HIA run my code on the internet?

No. The sandbox has no route out. Every request goes to the sinkhole, which answers like the real service would, so the server keeps behaving normally.

Which servers can be scanned?

Public npm and PyPI packages that start an MCP server over stdio. Remote (HTTP) servers are on the roadmap.

Can a maintainer contest a grade?

Yes. Every finding comes with its evidence. If a behavior is legitimate and declared, describe it in the tool description and rescan; the report keeps the history.

Is AI used?

Optionally. A model can write realistic tool calls and review findings, grounded in known attack patterns. It never removes hard proof, and reports say when it was used.