MCP Commons

Package Inspector

Flagged · 2026.07

An MCP server that gives your AI assistant deep, trustworthy insight into npm packages

by Cryptobyte

Free · Link-outDeveloper Toolsstdio · localOpen source · MIT9 toolsNew1 installsv1.0.8
nodenpmpackageinspectsupplychainrisksecurity
Open source / endpoint ↗

Package Inspector is a local Model Context Protocol server that lets an AI coding assistant answer real questions about npm dependencies: what a package is, who maintains it, what it pulls in, whether it has known CVEs, how much it weighs, whether it looks like a supply-chain risk, and whether anyone actually uses it. It reads from public registry and advisory APIs, cross-references the signals, and returns both a plain-language verdict and structured JSON — so the assistant can answer immediately or reason further. It needs no API keys, no account, and no configuration.

AI security review

Flagged · 2026.07model: claude-sonnet-5

This stdio MCP server exposes nine read-only npm inspection tools whose descriptions match their implementations. All outbound HTTPS calls funnel through a single guarded fetch helper that only permits registry.npmjs.org, api.npmjs.org, api.osv.dev and bundlephobia.com, matching the declared manifest allowlist. The only user data sent outward is the package name and version being inspected. No credentials, tokens or telemetry are transmitted by the server itself. A separate CI publishing script uses a GitHub Actions secret to call the marketplace API, which runs only on the forge's runners and is not part of the shipped server.

Tool surface

inspect_packageGet a complete overview of an npm package: description, resolved version, license, maintainers, repository, dist-tags, deprecation status, publish date, Node engine requirements, TypeScript types, and weekly downloads. Use this first whenever a user asks "what is X", "should I use X", "is X maintained", or wants general facts about a package before installing it.
list_versionsList an npm package's recent versions newest-first with publish dates, marking the latest version and any deprecated ones, plus release-cadence stats (total versions, average/median days between releases, releases in the last 90 days). Use this to answer "what versions exist", "when was the last release", "is this still actively maintained", or to find a version published before/after a given date.
dependency_treeResolve an npm package's dependency tree from registry metadata to a given depth, returning the nested tree plus stats: unique dependency count, max depth, packages appearing at conflicting versions, packages that run install scripts, and the heaviest sub-trees. Use this for "how many dependencies does X have", "what does X pull in", "why is my node_modules so big", or to spot bloat before adding a dependency. Cycles are detected and the walk is capped, so results may be flagged as truncated.
check_vulnerabilitiesQuery the OSV database (GitHub Security Advisories, npm advisories, CVEs) for known vulnerabilities affecting a specific package version. Returns each advisory with its GHSA/CVE id, summary, CVSS severity score, affected version ranges and fixed versions, plus an overall verdict and the smallest upgrade that clears everything. Use this whenever a user asks "is X safe", "does X have CVEs", "should I upgrade X", or before recommending a pinned version.
package_sizeMeasure what a package actually costs. Returns the on-disk install footprint, derived from npm registry metadata by resolving the production dependency graph and summing unpacked sizes (reported as an estimate, with a coverage figure and caveats), plus browser bundle cost from bundlephobia (minified and min+gzip size, dependency count, whether it is tree-shakeable, and download-time estimates on slow 3G/4G). Use this for "how big is X", "will X bloat my bundle", or when comparing candidate libra
compare_versionsDiff two published versions of the same package: dependencies added, removed and version-bumped; bundle size delta; days and releases between them; engine and license changes; and a semver-based breaking-change verdict (major bumps, and any 0.x minor bump, are flagged as likely breaking). Use this for "what changed between X and Y", "is upgrading X safe", or "why did my bundle grow after upgrading".
analyze_supply_chainProduce a weighted, explainable supply-chain risk report for a package version. Checks install/preinstall/postinstall scripts, maintainer bus factor, publish recency and account, build provenance and registry signatures, deprecation, license risk (missing, non-OSI, or copyleft), adoption level, known vulnerabilities, and typosquatting similarity against a built-in list of very popular packages. Returns low/medium/high with the specific reasons behind it. Use this before adding an unfamiliar depe
search_packagesSearch the npm registry and return ranked results with name, description, latest version, weekly downloads, and npm's own quality/popularity/maintenance scores. Use this when the user describes what they need rather than naming a package ("a library for parsing CSV"), when you need to find alternatives to compare, or when a package name might be misspelled. Supports npm search qualifiers like "keywords:cli" and "author:name".
download_statsGet npm download counts for a package plus momentum: last week vs the prior week, and last 30 days vs the prior 30 days, each labelled growing / stable / declining. Use this to gauge real-world adoption, to tell whether a library is gaining or losing traction, or to compare two candidate packages by usage. Note that npm counts include CI and mirror traffic.

Egress allowlist: registry.npmjs.org, api.npmjs.org, api.osv.dev, bundlephobia.com

Install and use

Requirements

  • Node.js 20 or newer (uses the built-in fetch).
  • No API keys. No account, no token, no configuration file. Every data source is a free public endpoint.

Install and run

This server is not published to npm and is run from source.

> [!WARNING]
> Do not run npx -y package-inspector. The name package-inspector is already
> taken on the public npm registry by an unrelated third-party CLI, so that command
> downloads and executes someone else's code — not this server. It is not an MCP
> server, so it prints usage text and exits, and your client reports
> "Server transport closed unexpectedly". Always use an absolute path to your own
> build, as shown below.

git clone https://github.com/Cryptobyte/package-inspector.git
cd package-inspector
npm install
npm run build
node dist/index.js

The server speaks MCP over stdio, so running it directly just waits for a client on stdin — that is expected. Point an MCP client at it using one of the configs below.


Client configuration

Every example below uses an absolute path to dist/index.js. Replace
/absolute/path/to/package-inspector with wherever you cloned the repo, and make
sure you have run npm run build first — the path must point at the compiled
dist/index.js, not at src/.

Claude Desktop

Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "package-inspector": {
      "command": "node",
      "args": ["/absolute/path/to/package-inspector/dist/index.js"]
    }
  }
}

Restart Claude Desktop afterwards (quit fully — closing the window is not enough).

Claude Code

claude mcp add package-inspector -- node /absolute/path/to/package-inspector/dist/index.js

Or add it to .mcp.json in your project root to share it with your team:

{
  "mcpServers": {
    "package-inspector": {
      "command": "node",
      "args": ["/absolute/path/to/package-inspector/dist/index.js"]
    }
  }
}

Cursor

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project):

{
  "mcpServers": {
    "package-inspector": {
      "command": "node",
      "args": ["/absolute/path/to/package-inspector/dist/index.js"]
    }
  }
}

VS Code

Add to .vscode/mcp.json in your workspace:

{
  "servers": {
    "package-inspector": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/package-inspector/dist/index.js"]
    }
  }
}

Verifying it works without a client

If a client reports the server disconnecting, check the build directly — this
should print an initialize response and a list of nine tools:

printf '%s\n%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"cli","version":"1"}}}' '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | node dist/index.js

If you see usage text about repl, dl, exec and cl commands, you are
running the unrelated npm package rather than this server — see the warning above.

Link-out server: reviewed by MCP Commons, hosted by the creator. These instructions are provided by the creator. You supply any credentials it needs.

Version history

VersionSourceReview
v1.0.8 · liveCryptobyte/package-inspector@1.0.8flag
v1.0.7Cryptobyte/package-inspector@1.0.7flag
v1.0.6Cryptobyte/package-inspector@1.0.6flag
v1.0.5Cryptobyte/package-inspector@HEADpass
v1.0.4Cryptobyte/package-inspector@HEADfail
v1.0.3Cryptobyte/package-inspector@HEADfail
v1.0.2Cryptobyte/package-inspector@HEADpass
v1.0.1Cryptobyte/package-inspector@HEADpass
v1.0.0Cryptobyte/package-inspector@HEADflag