npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@arvoretech/npm-registry-mcp

v1.0.4

Published

NPM Registry MCP Server for package information

Downloads

14

Readme

NPM Registry MCP Server

Install MCP Server

A Model Context Protocol (MCP) server implementation that provides comprehensive access to NPM package information through the official NPM registry API. Perfect for integrating NPM package data with LLMs and AI tools.

Features

  • 📦 Package Information: Complete metadata, dependencies, and version history
  • 📊 Download Statistics: Weekly download counts and trends
  • 🔍 Package Search: Advanced search with scoring and filtering
  • 🚀 Fast: Direct API calls to NPM registry using fetch
  • 📡 MCP Protocol: Communication via stdio transport
  • 🛠️ TypeScript: Fully typed with Zod validation
  • 🌐 No Configuration: Uses public NPM APIs - no setup required

Installation

npm install -g @arvoretech/npm-registry-mcp --registry=https://npm.pkg.github.com

Or configure your .npmrc:

echo "@arvoretech:registry=https://npm.pkg.github.com" >> ~/.npmrc
npm install -g @arvoretech/npm-registry-mcp

Usage

# Development
pnpm dev

# Production
node dist/index.js

Available MCP Tools

get_package_info

Retrieves comprehensive information about an NPM package.

Parameters:

  • packageName (string): Name of the NPM package

Returns:

  • Package metadata (name, version, description)
  • Author and maintainer information
  • Dependencies and dev dependencies
  • Repository and homepage links
  • Available versions and distribution tags
  • Creation and modification timestamps

Example:

{
  "packageName": "react"
}

get_package_downloads

Gets download statistics for an NPM package from the last week.

Parameters:

  • packageName (string): Name of the NPM package

Returns:

  • Total downloads in the last week
  • Average downloads per day
  • Date range for the statistics

Example:

{
  "packageName": "typescript"
}

search_packages

Searches for NPM packages with advanced filtering and scoring.

Parameters:

  • query (string): Search query string
  • size (number, optional): Number of results to return (1-250, default: 20)

Returns:

  • Search results with package metadata
  • Quality, popularity, and maintenance scores
  • Author and keyword information
  • Repository and homepage links

Example:

{
  "query": "react component",
  "size": 10
}

Programmatic Usage

import { NPMMCPServer } from "npm-mcp-server";

const server = new NPMMCPServer();

// Setup graceful shutdown
server.setupGracefulShutdown();

// Start server
await server.start();

Claude Desktop Integration

Add to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "npm-registry": {
      "command": "npx",
      "args": ["-y", "@arvoretech/npm-registry-mcp"]
    }
  }
}

API Endpoints

The server integrates with these NPM API endpoints:

  • Package Info: https://registry.npmjs.org/<package>
  • Download Stats: https://api.npmjs.org/downloads/point/last-week/<package>
  • Search: https://registry.npmjs.org/-/v1/search?text=<query>&size=<size>

Development

# Install dependencies
pnpm install

# Run in development mode
pnpm dev

# Build
pnpm build

# Linting
pnpm lint
pnpm lint:fix

Architecture

  • NPMClient: Handles NPM API communication and error handling
  • NPMMCPTools: Implements MCP tool logic and response formatting
  • NPMMCPServer: Main MCP server with stdio transport
  • Validation: Uses Zod for type and parameter validation
  • Error Handling: Comprehensive error handling for API failures

Error Handling

  • Network errors: Graceful handling of API timeouts and connectivity issues
  • Package not found: Clear error messages for non-existent packages
  • Rate limiting: Appropriate handling of NPM API rate limits
  • Validation: Input validation with descriptive error messages

Limitations

  • Read-only access to NPM registry (no publishing capabilities)
  • Uses public NPM APIs only
  • Weekly download statistics only (NPM API limitation)
  • Stdio transport only (no HTTP/WebSocket)
  • No caching (each request hits NPM API)

License

MIT