mcp-server-npm-registry
Provides npm package intelligence by querying the npm Registry and npm Downloads API for package metadata, package search results, and download statistics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-npm-registry Does lodash 4.17.15 have any known security vulnerabilities?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-npm-registry
Free MCP server for npm package intelligence: package metadata, search, download statistics, known security vulnerabilities, and browser bundle size. No API keys required — powered by four public APIs (npm Registry, npm Downloads API, OSV.dev, and Bundlephobia).
Tools
Tool | Purpose | Data Source |
| Get metadata, dependencies, dist-tags, types, and size for a package | npm Registry |
| Search npm packages by keyword and qualifiers with quality/popularity scores | npm Registry |
| Get total, daily average, and optional per-day download counts | npm Downloads API |
| Check a package version for known security advisories and CVEs | OSV.dev |
| Measure minified and gzipped browser bundle size and top dependencies | Bundlephobia |
Related MCP server: mcp-server-npm-plus
Requirements
Node.js
>=18
Quick start
npx -y mcp-server-npm-registryClient configuration
Claude Desktop
{
"mcpServers": {
"npm-registry": {
"command": "npx",
"args": ["-y", "mcp-server-npm-registry"]
}
}
}Claude Code
claude mcp add npm-registry -- npx -y mcp-server-npm-registryMCP Inspector
npx @modelcontextprotocol/inspector node build/index.jsTool reference
get_package_info
Parameters:
package_name(string, required): npm package name, e.g."react"or"@types/node".version(string, optional, default"latest"): Exact version (e.g."18.2.0") or dist-tag (e.g."next"). Defaults to"latest".
Example output:
{
"name": "left-pad",
"version": "1.3.0",
"description": "String left pad",
"license": "WTFPL",
"homepage": "https://github.com/stevemao/left-pad#readme",
"repositoryUrl": "https://github.com/stevemao/left-pad",
"keywords": ["leftpad", "pad", "padding"],
"author": "azer",
"maintainers": ["stevemao", "cnpm"],
"dependencies": { "is-number": "^7.0.0" },
"peerDependencies": {},
"dependencyCount": 1,
"distTags": { "latest": "1.3.0", "next": "2.0.0-beta.1" },
"deprecated": null,
"hasTypes": true,
"moduleType": "commonjs",
"nodeEngine": ">=0.10",
"unpackedSize": 4128,
"fileCount": 5,
"npmUrl": "https://www.npmjs.com/package/left-pad"
}search_packages
Parameters:
query(string, required): Search text, e.g."http client"or"keywords:typescript author:sindresorhus".limit(number, optional, default10): Maximum results to return (1-25). Default 10.offset(number, optional, default0): Number of results to skip for pagination. Default 0.
Example output:
{
"query": "express framework",
"total": 1234,
"offset": 0,
"returned": 1,
"results": [
{
"name": "express",
"version": "4.19.2",
"description": "Fast, unopinionated, minimalist web framework",
"keywords": ["express", "framework"],
"publishedAt": "2024-03-25T20:20:38.000Z",
"publisher": "wesleytodd",
"npmUrl": "https://www.npmjs.com/package/express",
"homepage": "http://expressjs.com/",
"repositoryUrl": "https://github.com/expressjs/express",
"scores": { "final": 0.923, "quality": 0.988, "popularity": 0.877, "maintenance": 1 }
}
]
}get_download_stats
Parameters:
package_name(string, required): npm package name, e.g."react"or"@types/node".period(string, optional, default"last-week"):"last-day","last-week","last-month","last-year"or a custom range"YYYY-MM-DD:YYYY-MM-DD". Default"last-week".include_daily(boolean, optional, defaultfalse): Include a per-day breakdown. Only allowed for periods of 92 days or fewer. Default false.
Example output:
{
"package": "left-pad",
"period": "last-week",
"start": "2024-05-01",
"end": "2024-05-07",
"totalDownloads": 70000,
"dayCount": 7,
"dailyAverage": 10000,
"daily": null
}check_package_vulnerabilities
Parameters:
package_name(string, required): npm package name, e.g."lodash"or"@angular/core".version(string, optional, default latest): Exact version to check, e.g."4.17.15". Defaults to the latest published version.
Example output:
{
"package": "lodash",
"version": "4.17.15",
"versionSource": "requested",
"checkedAt": "2026-01-01T00:00:00.000Z",
"totalVulnerabilities": 1,
"truncated": false,
"severityCounts": { "CRITICAL": 0, "HIGH": 1, "MEDIUM": 0, "LOW": 0, "UNKNOWN": 0 },
"vulnerabilities": [
{
"id": "GHSA-35jh-r3h4-6jhm",
"aliases": ["CVE-2021-23337"],
"cves": ["CVE-2021-23337"],
"summary": "Command Injection in lodash",
"severity": "HIGH",
"cvssVector": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"published": "2021-05-06T16:05:51Z",
"modified": "2024-01-01T00:00:00Z",
"fixedIn": ["4.17.21"],
"url": "https://osv.dev/vulnerability/GHSA-35jh-r3h4-6jhm",
"references": ["https://nvd.nist.gov/vuln/detail/CVE-2021-23337"]
}
]
}get_bundle_size
Parameters:
package_name(string, required): npm package name, e.g."react"or"@mui/material".version(string, optional, default latest): Exact version to measure, e.g."18.2.0". Defaults to the latest published version.
Example output:
{
"package": "left-pad",
"version": "1.3.0",
"versionSource": "requested",
"sizeBytes": 2048,
"sizeFormatted": "2.0 KB",
"gzipBytes": 1024,
"gzipFormatted": "1.0 KB",
"dependencyCount": 1,
"hasJSModule": false,
"hasSideEffects": true,
"isModuleType": false,
"peerDependencies": [],
"topDependencies": [{ "name": "is-number", "approximateSizeBytes": 548 }]
}Data sources, caching and limits
No API keys are required. All requests use an 8-second timeout (8000 ms) with no automatic retries.
npm Registry:
https://registry.npmjs.orgnpm Downloads API:
https://api.npmjs.orgOSV.dev:
https://api.osv.dev/v1/queryBundlephobia:
https://bundlephobia.com/api/size
Cache | Duration | Rationale |
Package metadata | 5 min (300,000 ms) | metadata changes on publish |
Search results | 2 min (120,000 ms) | rankings drift |
Download stats | 1 h (3,600,000 ms) | counts update daily |
OSV vulnerabilities | 30 min (1,800,000 ms) | new advisories appear during the day |
Bundlephobia size | 24 h (86,400,000 ms) | exact-version builds are immutable |
Note: Bundlephobia first-time builds of a package can be slow and may exceed the 8-second timeout; all four services may rate-limit requests.
Development
Scripts:
npm run clean: Removebuild/npm run build: Compile TypeScript tobuild/npm run typecheck: Type-checksrc/andtests/npm test: Run Vitest unit and integration testsnpm start: Start the stdio MCP server (node build/index.js)
Project layout:
mcp-server-npm-registry/
├── .github/workflows/ci.yml
├── src/
│ ├── constants.ts
│ ├── index.ts
│ ├── server.ts
│ ├── types/index.ts
│ ├── utils/
│ ├── services/
│ └── tools/
├── tests/
├── LICENSE
├── README.md
├── package.json
├── tsconfig.json
├── tsconfig.test.json
└── vitest.config.tsLicense
MIT
Available Tools
5 toolscheck_package_vulnerabilitiesCheck npm package vulnerabilitiesARead-onlyIdempotent
Check a specific npm package version for known security vulnerabilities using the OSV.dev database (includes GitHub Security Advisories and CVEs). If no version is given the latest published version is checked. Returns advisories sorted by severity with CVE aliases, fixed versions and links.
Inputs: package_name (required), version.
get_bundle_sizeGet npm bundle sizeARead-onlyIdempotent
Get the browser bundle size of an npm package version via Bundlephobia: minified size, minified+gzipped size, dependency count, tree-shaking indicators (ES module entry, side effects) and the largest dependencies. If no version is given the latest published version is measured. Not meaningful for Node-only or native packages.
Inputs: package_name (required), version.
get_download_statsGet npm download statisticsARead-onlyIdempotent
Get npm download counts for a package over a period (last-day, last-week, last-month, last-year, or a custom YYYY-MM-DD:YYYY-MM-DD range). Returns the total, the average per day and, optionally, a per-day breakdown (limited to ranges of 92 days or fewer). Data comes from the npm downloads API and lags about one day.
Inputs: package_name (required), period, include_daily.
get_package_infoGet npm package infoARead-onlyIdempotent
Get metadata for an npm package from the official npm registry: latest (or specified) version, description, license, repository, keywords, maintainers, dependencies, peer dependencies, dist-tags, TypeScript types support, module type (ESM/CommonJS), Node engine range and unpacked size. Use this when you need facts about one specific package.
Inputs: package_name (required), version.
search_packagesSearch npm packagesARead-onlyIdempotent
Search the npm registry for packages by keyword. Supports npm search qualifiers such as author:name, maintainer:name, scope:name, keywords:word, not:unstable and not:insecure. Returns name, version, description, keywords, last publish date, publisher, links and npm quality/popularity/maintenance scores (0 to 1).
Inputs: query (required), limit, offset.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct facet of the npm ecosystem: single-package metadata, keyword search, download counts, vulnerability advisories, and bundle size. There is no realistic way to confuse one with another, and descriptions reinforce the boundaries (e.g. 'one specific package' vs. 'search by keyword').
All names are snake_case verb_noun forms: get_package_info, search_packages, get_download_stats, check_package_vulnerabilities, get_bundle_size. The verbs (get/search/check) vary slightly but map naturally to the action type without breaking the pattern.
Five focused tools is a well-scoped surface for a read-only registry inspection server; each tool covers a genuinely different question an agent would ask. Nothing feels padded or redundant.
The core read-only lifecycle is covered: discovering packages, inspecting metadata, gauging adoption, assessing security, and evaluating browser cost. Minor gaps exist (no version history/dependency tree or package comparison), but agents can work around these via get_package_info and search.
Maintenance
Related MCP Connectors
Pay-per-call x402 npm and PyPI package metadata, versions, search, download counts.
Unofficial npm MCP — wraps the npm Registry API (free, no auth)
Dive into the world of npm with our NPM Package Info MCP. Access crucial metadata about any npm
Live npm and UNPKG data for AI agents: resolution, audits, import maps, malware/CVE checks.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides comprehensive contextual information about npm packages including README files, versions, dependencies, download statistics, and search functionality. Enables users to explore and analyze npm packages through natural language queries with intelligent GitHub README fetching and branch fallback.9MIT
- AlicenseBqualityDmaintenanceMCP server for npm — search packages, check bundle sizes, scan vulnerabilities, compare downloads, inspect dependencies.860 npm1MIT
- AlicenseBqualityDmaintenanceEnables querying NPM package download statistics, metadata, and dependency information through natural language.2MIT
- AlicenseAqualityBmaintenanceProvides software supply-chain intelligence for AI agents, enabling them to query package metadata, versions, downloads, dependencies, and health signals for npm, PyPI, and crates.io packages without API keys.6MIT