home / mcp / npm mcp server

NPM MCP Server

Provides a server to search, analyze, and compare npm packages through the MCP interface.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "alisaitteke-npm-mcp": {
      "command": "npx",
      "args": [
        "@alisaitteke/npm-mcp"
      ]
    }
  }
}

You can run a Model Context Protocol (MCP) server for the npm registry to search packages, assess security, compare versions, and validate compatibility. This MCP serves as a centralized assistant that your MCP clients can query to explore npm packages, evaluate risks, and plan integrations without manually inspecting each package.

How to use

You connect your MCP client to the npm_registry_mcp server to perform tasks like searching for packages, auditing security, comparing package options, and checking compatibility and quality signals. Use it to ask questions such as the following: a) search for React state management libraries, b) security audit for [email protected], c) is [email protected] compatible with your current dependencies, d) compare React 17 and 18, e) quality check for date-fns, f) is it safe to run npx create-next-app. The server provides detailed results, including versions, dependencies, download statistics, deprecation status, and guidance on safe versions.

How to install

Prerequisites you need before starting:

1) Install Node.js and npm on your machine if they are not already installed. You can download them from the official Node.js website and follow the platform-specific installation instructions.

2) Ensure you have a working npx command available as part of npm. This is usually included when you install Node.js.

3) Choose how you want to run the MCP server. The recommended approach uses a pre-configured MCP setup via npx, so you do not install a global package unless you prefer that method.

Option A — Configure Cursor (recommended for Cursor users) Create the MCP configuration file at ~/.cursor/mcp.json with the following content to connect to the npm MCP server.

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

Option B — Configure Claude Desktop (macOS) Create the MCP configuration file at ~/Library/Application Support/Claude/claude_desktop_config.json with the following content to connect to the npm MCP server.

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

Option C — Global install (optional) If you prefer a global install, you can install the MCP package globally and reference it directly in your client configuration.

npm install -g @alisaitteke/npm-mcp

After installation or configuration, connect your MCP client to npm_registry_mcp. You will then be able to ask questions and receive structured results from the server.

Available tools

searchPackages

Query the npm registry to find packages matching your keywords, with ranking, scores, and relevant metadata.

autoSecurity

Automatically assess package security and provide safe install recommendations without manual action.

capabilitiesAnalysis

Analyze package capabilities such as ESM/CJS support, TypeScript usage, platform compatibility (Node/Browser/Deno), and build tool compatibility.

quickStartGenerator

Generate ready-to-use code snippets for integrating a selected package into your project.

packageComparison

Compare alternatives side-by-side based on features, size, popularity, and other quality metrics.

bundleSizeAnalysis

Estimate minified and gzipped bundle impact, including tree-shaking and dependency footprint.

similarPackages

Find alternatives or similar packages to help you evaluate options.

details

Provide detailed package information including versions, dependencies, downloads, and deprecation status.

security

Perform vulnerability checks and provide safe-version recommendations.

compatibility

Check peer dependencies and potential version conflicts with your current setup.

quality

Assess maintenance status and community activity signals.

versionCompare

Highlight breaking changes and semver considerations between versions.

npxCheck

Validate npx commands before executing to avoid unsafe runs.