Import Guardian logo

Import Guardian

Checks generated imports and lockfiles for hallucinated packages, typosquats, malware signals, and supply-chain risks before installation.

Install Import Guardian

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "import-guardian": {
      "command": "npx",
      "args": [
        "-y",
        "import-guardian-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 4 tools correctly (22d ago).

Overview

import-guardian MCP server checks generated JavaScript and TypeScript imports against package registries before installation. It extracts npm package names, ignores built-ins and local paths, and returns CLEAN, REVIEW, or BLOCK verdicts. Separate tools verify explicit packages, inspect one package in depth, and audit supported lockfiles for transitive supply-chain risks. Reach for it when an AI agent has produced dependency names or a lockfile that must be checked before installation.

Use cases

  • Scan AI-generated JavaScript before running npm install
  • Verify package names suggested by a coding agent
  • Review suspicious new or low-download npm packages
  • Audit npm, Python, or Go lockfiles for transitive risks

Key features

  • Extracts and validates npm imports
  • Flags nonexistent packages and likely typosquats
  • Returns CLEAN, REVIEW, or BLOCK verdicts
  • Deep-checks individual package metadata
  • Audits supported lockfiles and transitive dependencies
  • Analyzes install scripts and package payloads

Tools4

What Import Guardian lets your agent do. Expand a tool for its parameters.

Verified live~1.5k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 3d ago

Recent health check succeeded.

10/15 checks healthy over the last 91d

What it can do

From the 4 tools this server returned when we ran it.

Runs commands · 1Handles credentials · 1Makes network requests · 1Read-only tools · 3
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age117 days
Maintainers1

Observed 2026-10-18 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · import-guardian-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads154Package downloads in the last 30 days.
Last commit4mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed4Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Import Guardian works

What import-guardian does

import-guardian MCP server evaluates dependency names before they enter an install command. Its primary workflow accepts generated JavaScript or TypeScript, extracts imported npm packages, and checks whether those names exist and look legitimate. It can identify nonexistent packages, newly published packages, missing repositories, very low download activity, and names that closely resemble popular libraries.

The service reports three outcomes: CLEAN for packages that pass its checks, REVIEW for suspicious but existing packages, and BLOCK for imports that do not exist or match stronger malicious-package signals. A blocked name may include a suggestion for a nearby real package.

The server also accepts an explicit package list and can inspect a single package in greater depth. Its premium lockfile audit extends the review from visible imports to the resolved dependency graph. Supported inputs include npm package-lock.json, yarn.lock, pnpm-lock.yaml, Python requirements.txt, poetry.lock, Pipfile.lock, and Go mod or sum files.

How it works

The import-guardian MCP server uses regular-expression extraction rather than an AST. Scoped subpaths are reduced to their package root, so imports such as @scope/pkg/sub are checked as @scope/pkg, while lodash/fp is checked as lodash. Node built-ins, including fs and node:path, and local paths are skipped.

The basic package checks use live registry information such as existence, release age, versions, repository details, and download activity. Similarity checks can identify spelling changes, transpositions, and other likely typosquats. The lockfile tool resolves the complete dependency tree and checks for dependency confusion, transitive typo or homoglyph clones, maintainer-takeover patterns, risky install scripts, and known malicious or vulnerable versions through OSV.dev.

For lockfile audits, deeper analysis can inspect npm package tarballs and PyPI source distributions in memory. It examines lifecycle hooks, setup files, build backends, and related code for behaviors such as credential or environment-data theft, network egress, process execution, obfuscation, and download-and-run logic. Go replacement directives are also checked against the Go module proxy.

Setup and configuration

Run the import-guardian MCP server through npx using an MCP client configuration:

config.json
{
  "mcpServers": {
    "import-guardian": {
      "command": "npx",
      "args": ["-y", "import-guardian-mcp"]
    }
  }
}

The README presents audit_lockfile as a premium tool; the other listed tools are the code and package checks.

Tools and capabilities

  • scan_code_imports: extracts npm imports from generated JavaScript or TypeScript and checks them.
  • check_packages: verifies a supplied list of package names.
  • verify_package: performs a deeper review of one package, including existence, age, versions, repository, downloads, and similarity to popular packages.
  • audit_lockfile: audits resolved dependencies from supported npm, Yarn, pnpm, PyPI, and Go inputs.

Limitations and notes

The import-guardian MCP server focuses on dependency names and resolved dependency metadata; scan_code_imports does not inspect arbitrary program behavior. Its import extraction is regex-based, so it is not a full language parser. The basic scan sees imports that are visible in source, whereas transitive dependencies require the premium lockfile audit.

Registry and advisory results can change as packages are published or databases are updated. A clean result therefore reflects the checks and data available at scan time, not a guarantee that a package is safe in every context.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Import Guardian

import-guardian is an MCP server that checks generated npm imports and package lists before installation, using scan_code_imports, check_packages, and verify_package. Its premium audit_lockfile tool reviews resolved npm, Yarn, pnpm, PyPI, and Go dependencies for typosquats, malware indicators, install-script risks, and other supply-chain problems.

Install it by adding an MCP server entry that runs npx with the -y import-guardian-mcp argument. The README provides a configuration using the command npx and args ["-y", "import-guardian-mcp"].

Use scan_code_imports and provide the generated JavaScript or TypeScript. The tool extracts npm imports, skips Node built-ins and local paths, checks package names, and returns CLEAN, REVIEW, or BLOCK results.

Yes, audit_lockfile accepts npm package-lock.json files and resolves the full dependency tree. It is the premium lockfile tool and checks transitive packages for issues including dependency confusion, typosquats, risky install scripts, and known OSV advisories.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewImport Guardian AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/import-guardian?style=directory)](https://allmcps.com/mcp/import-guardian)
HTML Embed
<a href="https://allmcps.com/mcp/import-guardian"><img src="https://allmcps.com/api/badge/import-guardian?style=directory" alt="Import Guardian on AllMCPs" /></a>