Server data from the Official MCP Registry
Catch AI-hallucinated (slopsquatted) npm imports in generated code before npm install.
Catch AI-hallucinated (slopsquatted) npm imports in generated code before npm install.
import-guardian is a well-designed security-focused MCP server with clean architecture and no critical vulnerabilities. The codebase demonstrates strong security practices: no hardcoded credentials, proper input validation, safe network operations with timeouts, and appropriate permission scoping. Minor code quality improvements around error handling and logging could be made, but findings are low-severity and do not indicate security risks. Supply chain analysis found 4 known vulnerabilities in dependencies (0 critical, 3 high severity). Package verification found 1 issue.
7 files analyzed ยท 10 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-baneado98-import-guardian": {
"args": [
"-y",
"import-guardian-mcp"
],
"command": "npx"
}
}
}From the project's GitHub README.
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.
| ๐ป Hallucinated | imports of packages that do not exist on npm โ the model invented the name. Returns BLOCK with a "did you mean" to the closest real package. |
| ๐ชค Fresh squats | packages that do exist but were published days ago, have no source repo, near-zero downloads, or are a 1โ2 edit typo of a popular library. Returns REVIEW. |
| ๐งฉ Import-aware | resolves import x from "@scope/pkg/sub" โ @scope/pkg, lodash/fp โ lodash; skips Node built-ins (fs, node:path) and local paths. Plain regex, no AST, zero runtime deps beyond the MCP SDK. |
Verdicts: ๐ข CLEAN ยท ๐ REVIEW ยท ๐ด BLOCK.
{
"mcpServers": {
"import-guardian": { "command": "npx", "args": ["-y", "import-guardian-mcp"] }
}
}
Tools:
scan_code_imports โ 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.check_packages โ verify an explicit list of package names.verify_package โ deep-check a single package name (existence, age, versions, repo, weekly downloads, edit distance to popular packages).scan_code_imports({ code: 'import shift from "react-codeshift";\nimport React from "react";' })
๐ REVIEW โ 1 referenced package(s) look risky.
๐ react-codeshift (risk 57/100)
โข No source repository linked.
โข Only 1 published version.
โข Only 3 downloads in the last week despite being 158 days old.
๐ข react (ok) โ established package.
POST /scan { "code": "import x from 'reqeusts'\nimport y from 'lodash'" }
GET /verify?name=express
Hosted at https://import-guardian.vercel.app ยท try /verify?name=express vs /verify?name=reqeusts.
The /pro/* routes are gated by x402. Your agent pays $0.02 USDC per call automatically โ no sign-up, no API key. Payment settles on-chain (USDC on Base). The server holds no private key; it only declares a public receiving address.
POST /pro/scan { "code": "โฆ" } # 402 โ pay โ result, no rate limit
registry.npmjs.org) and the download-stats API โ these are facts, not guesses, which is the moat: an agent can't reliably know on its own whether a name it generated is real and trusted.REVIEW rather than silently passing a brand-new lookalike. It is a guardrail, not a guarantee โ pair it with npm-guardian for behavioural/CVE auditing of packages you decide to keep.MIT.
Be the first to review this server!
by Toleno ยท Developer Tools
Toleno Network MCP Server โ Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace ยท Developer Tools
Create, build, and publish Python MCP servers to PyPI โ conversationally.
by Microsoft ยท Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption