NPM MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add npm -- npx -y mcp-server-npm
README.md

Search, compare, and inspect npm packages from your AI assistant.

MCP Server npm — Search, Compare & Inspect Packages from AI

An MCP server that lets your AI assistant search npm, compare packages, check download stats, and inspect dependencies. No API keys needed.

You: "Compare react vs preact — size, downloads, and dependencies"
AI:  react: 45.5kb min, 25M weekly downloads, 3 deps
     preact: 4.2kb min, 3.8M weekly downloads, 0 deps

Works with Claude Desktop, Cursor, and VS Code Copilot.

MCP server npm demo — comparing react vs preact from Claude Desktop

Tools

Tool What it does
npm_search Search npm packages by keyword
npm_info Get detailed package info (version, license, deps, maintainers)
npm_downloads Get download statistics (daily, weekly, monthly, yearly)
npm_versions List recent versions of a package
npm_compare Compare two packages side by side
npm_deps List all dependencies of a package

Quick Start

With Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "npm": {
      "command": "npx",
      "args": ["-y", "mcp-server-npm"]
    }
  }
}

With Cursor

Add to your .cursor/mcp.json:

{
  "mcpServers": {
    "npm": {
      "command": "npx",
      "args": ["-y", "mcp-server-npm"]
    }
  }
}

Examples

Ask your AI assistant:

  • "Search npm for state management libraries"
  • "Show me info about the express package"
  • "Compare react vs preact"
  • "How many downloads does zod get per month?"
  • "What are the dependencies of next?"
  • "List recent versions of typescript"

Development

npm install
npm test
npm run build

Author


README built with README Builder

License

MIT © Ofer Shapira

Tools (6)

npm_searchSearch npm packages by keyword
npm_infoGet detailed package info (version, license, deps, maintainers)
npm_downloadsGet download statistics (daily, weekly, monthly, yearly)
npm_versionsList recent versions of a package
npm_compareCompare two packages side by side
npm_depsList all dependencies of a package

Configuration

claude_desktop_config.json
{"mcpServers": {"npm": {"command": "npx", "args": ["-y", "mcp-server-npm"]}}}

Try it

Search npm for state management libraries
Show me info about the express package
Compare react vs preact
How many downloads does zod get per month?
What are the dependencies of next?

Frequently Asked Questions

What are the key features of NPM MCP Server?

Search npm packages by keyword. Retrieve detailed package metadata including version and license. Analyze download statistics across various timeframes. Compare two different packages side-by-side. Inspect and list package dependencies.

What can I use NPM MCP Server for?

Quickly comparing the size and popularity of two competing libraries before adding them to a project. Checking the maintenance status and dependency count of a package to assess risk. Finding the most relevant packages for a specific functionality directly within the IDE. Monitoring the download trends of your own published packages.

How do I install NPM MCP Server?

Install NPM MCP Server by running: npx -y mcp-server-npm

What MCP clients work with NPM MCP Server?

NPM MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep NPM MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare