Import Guardian MCP server
Catch AI-hallucinated (slopsquatted) npm imports in generated code before npm install.
0 stars54 downloads/wk
Reviews
Write oneNobody has reviewed Import Guardian yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Import Guardian tools (4)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
audit_lockfileDEEP supply-chain audit of a RESOLVED lockfile — the premium product. Works across NINE ecosystems: npm (package-lock.json v1/v2/v3, yarn.lock classic/berry, pnpm-lock.yaml), Python/PyPI (requirements.txt, poetry.lock, Pipfile.lock), Go (go.mod, go.sum), Rust/Cargo (Cargo.lock, Cargo.toml), Java (Maven pom.xml, Gradle build.gradle/.kts + gradle.lockfile), PHP/Composer (composer.json, composer.lock
check_packagesCheck an explicit list of npm package names for hallucination / slopsquatting (e.g. a dependency list you are about to install). Returns CLEAN / REVIEW / BLOCK per package with a 'did you mean' for fakes. The free tier verifies a small handful (≤5 names); a full dependency manifest or pro=true routes to the premium unlimited batch verify (requires IMPORT_GUARDIAN_KEY).
scan_code_importsScan a block of JS/TS source code for HALLUCINATED / slopsquatted npm imports BEFORE you install anything or commit. Extracts every npm package the code imports/requires and checks each against the live npm registry: flags packages that DO NOT EXIST (AI hallucinations — the #1 slopsquatting attack vector in 2026, where attackers register the plausible fake name to ship malware) and packages that e
verify_packageVerify a single npm package name exists and is not a slopsquat: registry existence, age, version history, repo, weekly downloads, and edit-distance to popular packages. Use right before adding a dependency you are not 100% sure is real. Always free.
Public scan report
scanner v0.1.9 · 2026-09-26 · same rubric, same numbers if you re-run it
- Code scan10 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 92 days ago8/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Import Guardian compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 82/100
- higher than 63% of 48,255 servers
- Tools
- 4
- the typical server has 7
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
- Downloads a week
- 54
- more than 45% of 12,191 servers with a package
What its tools let an agent do: 4 read
Install Import Guardian in Claude Code, Cursor or VS Code
Runs npx -y import-guardian-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add import-guardian -- npx -y import-guardian-mcp
What the publisher says
From the Import Guardian repository's README, as published. We do not edit it. Read it on GitHub
import-guardian 🪝
Catch AI-hallucinated (slopsquatted) npm imports in generated code — before you run npm install.
An LLM just wrote some code. It might import a package that doesn't exist — a name the model confidently hallucinated. Attackers register exactly those names and ship malware. This is slopsquatting, and in 2026 it's one of the fastest-growing supply-chain attacks: code generators have been observed referencing 205,000+ unique non-existent package names, and real hallucinated packages (react-codeshift, a fake huggingface-cli with 30k+ downloads) have already shown up in the wild.
import-guardian reads the generated code, extracts every npm package it imports, and tells you which ones are real — so an agent never installs a name its own model invented.
It's part of the guardian set: npm-guardian audits a package you've already chosen for CVEs and malicious behaviour, license-guardian audits the licenses of your dependencies (GPL/AGPL/BUSL traps) before you ship, and lockfile-guardian audits the resolved package-lock.json for integrity tampering and risky install scripts. import-guardian works one step earlier than all of them, at the moment the code — and its dependency names — are generated.
What it catches
Verdicts: 🟢 CLEAN · 🟠 REVIEW · 🔴 BLOCK.
Use it as an MCP server (free)
{
"mcpServers": {
"import-guardian": { "command": "npx", "args": ["-y", "import-guardian-mcp"] }
}
}Tools:
- scancodeimports — give it a block of generated JS/TS; it extracts and checks every npm import. Run this on code you just generated, before its install command.
- checkpackages** — verify an explicit list of package names.
- verifypackage** — deep-check a single package name (existence, age, versions, repo, weekly downloads, edit distance to popular packages).
- auditlockfile 🔒 (premium) — the deep one. Give it a lockfile from npm (package-lock.json), yarn (yarn.lock), pnpm (pnpm-lock.yaml), PyPI (requirements.txt / poetry.lock / Pipfile.lock) or Go (go.mod / go.sum) and it resolves the whole transitive tree and audits every package for dependency confusion, transitive typosquats / homoglyph clones, maintainer-takeover fingerprints, nonexistent pins, and install-script** risk. See below.
Deep lockfile audit (premium) 🔒
scancodeimports looks at the handful of imports you can see. auditlockfile looks at the hundreds you can't** — the fully resolved dependency graph in your lockfile — and finds the supply-chain attacks an LLM cannot reason about from source alone:
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Import Guardian: common questions
- Is Import Guardian MCP server safe?
- Mostly: it is graded B (82/100). Read the Import Guardian safety report
- How do I install Import Guardian?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Import Guardian need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Import Guardian maintained?
- The last commit was 131 days ago (2026-06-26). The latest release is v0.3.0.
- How does Import Guardian compare with other MCP servers?
- safety score 82/100 (higher than 63% of 48,255 servers); tools 4 (the typical server has 7); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.