npm-registry-mcp-server

npm-registry-mcp-server

Enables fetching npm package metadata and version lists via MCP tools, powered by the package-json library.

Category
Visit Server

README

npm-registry-mcp-server

A Model Context Protocol (MCP) server that looks up package metadata from the npm registry, powered by package-json by Sindre Sorhus.

  • Transport: stdio
  • Validation: zod input/output schemas on every tool
  • Monitoring: Sentry (@sentry/node) initialized before the server starts, with automatic MCP instrumentation via wrapMcpServerWithSentry
  • Runtime: Node.js >= 18 (matches the package-json engines requirement)

Repository: https://github.com/yuchen814/npm-registry-mcp-server

Tools

get_package_metadata

Fetch metadata for a package from the npm registry.

Argument Type Required Description
packageName string yes Package name, scoped packages supported (react, @sindresorhus/df). Validated against npm naming rules.
version string no Exact version (1.0.0), dist-tag (latest, next), or semver range (1, 1.2, ^1.2.3, ~1.2.3). Defaults to latest.
fullMetadata boolean no Return full (non-abbreviated) metadata. Defaults to false.
allVersions boolean no Return the registry main entry containing all versions. Defaults to false.
omitDeprecated boolean no Omit deprecated versions when resolving ranges (explicit versions/dist-tags still resolve). Defaults to true.

Package-not-found and version-not-found conditions are reported as tool errors with clear messages (PackageNotFoundError / VersionNotFoundError from package-json).

get_package_versions

List every published version and all dist-tags of a package.

Argument Type Required Description
packageName string yes Package name, scoped names supported

Returns { name, distTags, versions, total } as structured content.

Install & run

npm install
npm run build
npm start          # runs node dist/server.js on stdio

Development (no build step):

npm run dev        # tsx server.ts

Try it with the MCP Inspector:

npm run inspector

Client configuration

Example entry for an MCP client such as Claude Desktop (claude_desktop_config.json):

{
	"mcpServers": {
		"npm-registry": {
			"command": "node",
			"args": ["/absolute/path/to/npm-registry-mcp-server/dist/server.js"],
			"env": {
				"SENTRY_DSN": "https://examplePublicKey@o0.ingest.sentry.io/0"
			}
		}
	}
}

Environment variables

Variable Default Description
SENTRY_DSN (unset) Sentry DSN. When unset, Sentry is disabled and the server runs normally.
SENTRY_ENVIRONMENT production Sentry environment tag.
SENTRY_TRACES_SAMPLE_RATE 0.1 Sample rate (0.0–1.0) for performance tracing of MCP requests.

Copy .env.example to get started. Registry selection (including private registries and auth) follows your .npmrc, exactly like npm itself, courtesy of package-json.

Error monitoring

Sentry.init() runs before the MCP server is constructed or connected. Expected lookup failures (unknown package/version) are returned to the client as tool errors and are not sent to Sentry; unexpected failures are captured and flushed before the tool responds. Fatal startup errors are also captured.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured