mcp-server-npm
Provides tools for searching the npm registry, allowing users to retrieve detailed package information, download statistics, version history, and dependency trees, as well as compare multiple packages side-by-side.
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 depsWorks with Claude Desktop, Cursor, and VS Code Copilot.

Tools
Tool | What it does |
| Search npm packages by keyword |
| Get detailed package info (version, license, deps, maintainers) |
| Get download statistics (daily, weekly, monthly, yearly) |
| List recent versions of a package |
| Compare two packages side by side |
| List all dependencies of a package |
Related MCP server: mcp-server-npm-plus
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 buildAuthor
README built with README Builder
License
MIT © Ofer Shapira
Available Tools
6 toolsnpm_compareC
Compare two npm packages side by side
| Name | Required | Description | Default |
|---|---|---|---|
| packageA | Yes | First package name | |
| packageB | Yes | Second package name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. While 'compare' implies a read-only operation, it doesn't specify what aspects are compared (versions, dependencies, downloads), whether authentication is needed, rate limits, or what format the comparison output takes. This leaves significant gaps in understanding the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly concise - a single sentence that directly states the tool's purpose with zero wasted words. It's front-loaded and immediately understandable without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a comparison tool with no annotations and no output schema, the description is insufficient. It doesn't explain what gets compared, the format of results, or how this differs from sibling tools. Given the complexity of package comparison and lack of structured metadata, more context is needed for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 100% description coverage, with both parameters clearly documented as package names. The description adds no additional parameter semantics beyond what's already in the schema, so it meets the baseline for high schema coverage without providing extra value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('compare') and resource ('two npm packages'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its siblings like npm_info or npm_search, which might also provide comparative information in different ways.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like npm_info (for single package details) or npm_search (for finding packages). It simply states what the tool does without context about appropriate use cases or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
npm_depsC
List dependencies of an npm package
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Package name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states it 'lists dependencies' but doesn't describe what the output looks like (e.g., format, structure), whether it includes dev dependencies, version ranges, or any limitations like rate limits or authentication needs. This leaves significant gaps for an agent to understand the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no annotations and no output schema, the description is incomplete. It doesn't explain what the output looks like (e.g., a list of dependencies, their versions), which is critical for a tool that lists data. Without this, an agent cannot fully understand how to use the tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the 'name' parameter documented as 'Package name'. The description doesn't add any additional meaning beyond this, such as examples or constraints on package names. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'List dependencies of an npm package' clearly states the verb ('List') and resource ('dependencies of an npm package'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its siblings like npm_info or npm_versions, which might also provide dependency information, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like npm_info or npm_search. It doesn't specify if this tool is for getting only dependencies versus other package metadata, or any prerequisites or constraints for usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
npm_downloadsB
Get download statistics for an npm package
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Package name | |
| period | No | Time period | last-month |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe how it behaves: no information on rate limits, authentication needs, error handling, or what the output looks like (e.g., format, units). This leaves significant gaps for an agent to understand operational constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without any fluff. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavior, output format, and usage context. Without annotations or output schema, more elaboration would be helpful for an agent to use it effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents both parameters (name and period with enum values). The description doesn't add any meaning beyond what's in the schema, such as explaining what 'download statistics' entails or how the period affects results. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get') and resource ('download statistics for an npm package'), making the purpose immediately understandable. It doesn't explicitly differentiate from siblings like npm_info or npm_versions, but the focus on download statistics is specific enough to imply distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like npm_info (which might include download stats) or npm_compare. There's no mention of prerequisites, exclusions, or specific contexts where this tool is preferred over others.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
npm_infoC
Get detailed info about an npm package
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Package name (e.g. 'express') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Get detailed info') but doesn't describe what 'detailed info' includes, whether it requires authentication, rate limits, error handling, or response format. This is a significant gap for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It's front-loaded and appropriately sized for a simple tool, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete. It doesn't specify what 'detailed info' entails, leaving the agent uncertain about the return values. For a tool with no structured output documentation, this creates ambiguity in usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with the parameter 'name' fully documented in the schema. The description adds no additional meaning beyond the schema, such as examples of package names or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Get') and resource ('detailed info about an npm package'), making the purpose immediately understandable. It doesn't specifically differentiate from siblings like npm_versions or npm_search, which might provide overlapping information, so it doesn't reach the highest score of 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like npm_versions or npm_search. It lacks explicit context, exclusions, or named alternatives, leaving the agent to infer usage based on tool names alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
npm_searchC
Search npm packages by keyword
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query | |
| size | No | Number of results |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'Search' but doesn't describe what the search returns (e.g., list of packages with basic info), whether it's a read-only operation, any rate limits, or authentication needs. This leaves significant gaps in understanding the tool's behavior beyond the basic action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste—it directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a search tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the search results include (e.g., package names, versions, descriptions), how results are ordered, or any limitations (e.g., pagination). This leaves the agent with insufficient context to fully understand the tool's functionality.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with clear documentation for both parameters (query and size). The description adds no additional meaning beyond what the schema provides, such as examples of search queries or context for the size parameter. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('Search') and resource ('npm packages'), and specifies the search method ('by keyword'). However, it doesn't differentiate this search tool from potential sibling tools like npm_compare or npm_info, which might also involve searching or retrieving package information.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like npm_info (for detailed package info) or npm_compare (for comparing packages). It lacks explicit context about use cases, exclusions, or prerequisites, leaving the agent to infer usage based on the name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
npm_versionsC
List recent versions of an npm package
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Package name | |
| count | No | Number of versions to show |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool lists versions but doesn't mention key traits like whether it's read-only, safe to use, or has rate limits. It also omits details about output format, such as what 'recent' means or how versions are ordered, which is crucial for a tool with no output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy for an agent to parse and understand quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of listing package versions, the lack of annotations, and no output schema, the description is incomplete. It doesn't explain behavioral aspects like safety, output format, or error handling, leaving significant gaps for the agent to navigate without additional context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no parameter semantics beyond what the input schema provides, as schema description coverage is 100% with clear descriptions for both parameters. The baseline score of 3 is appropriate because the schema adequately documents the parameters, though the description doesn't enhance understanding further.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('List') and resource ('recent versions of an npm package'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like npm_info or npm_compare, which might also provide version-related information, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like npm_info or npm_compare. It lacks any context about prerequisites, such as needing a package name, or exclusions, leaving the agent to infer usage from the tool name and parameters alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct purpose: compare packages, list dependencies, get downloads, get info, search packages, and list versions. There is no overlap or ambiguity between these functions, making tool selection straightforward for an agent.
All tool names follow a consistent 'npm_' prefix with a descriptive suffix (e.g., compare, deps, downloads). This uniform pattern enhances readability and predictability across the toolset.
With 6 tools, the server is well-scoped for npm package management. Each tool serves a unique and essential function, covering common operations without being overly sparse or bloated.
The toolset covers key npm operations like search, info, dependencies, versions, downloads, and comparisons. A minor gap is the lack of tools for publishing or managing packages (e.g., publish, update, or install), but core query and analysis functions are well-represented.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
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
Publish and discover MCP servers via the official MCP Registry. Powered by HAPI MCP server.
MCP server for hex.pm and hexdocs.pm: search, inspect, compare, and audit Elixir packages
Related MCP Servers
- MIT
- AlicenseBqualityDmaintenanceMCP server for npm — search packages, check bundle sizes, scan vulnerabilities, compare downloads, inspect dependencies.8561MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server for searching, inspecting, and evaluating NPM packages through health scoring and license risk assessments. It provides comprehensive package analysis including maintenance status, popularity trends, and security vulnerability reports to help users make informed dependency decisions.3MIT
- AlicenseAqualityDmaintenanceMCP server providing npm registry search, package details, dependency auditing, bundle size estimation, and package comparison tools for AI agents.551MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ofershap/mcp-server-npm'
If you have feedback or need assistance with the MCP directory API, please join our Discord server