npm-mcp
Provides tools for searching npm packages and inspecting package metadata, versions, and dist-tags from the public npm registry.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@npm-mcpsearch npm for packages related to date formatting"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
npm-mcp
npm-mcp is a small, read-only Model Context Protocol server for the public npm registry. It lets MCP-compatible AI clients discover npm packages and inspect focused package metadata without exposing install, publish, login, shell, filesystem, or arbitrary-fetch capabilities.
Start with Docker
See the Docker quick start to launch the server and MCP Inspector from a fresh checkout. The essential command is:
docker compose --profile inspector up --build -dTo test model-driven MCP tool use without running a model locally, use LibreChat with OpenRouter's free-model router:
docker compose -f compose.yaml -f compose.openrouter.yaml --profile openrouter up --build -dThen open http://127.0.0.1:3080. An OpenRouter API key is required even for free models. See OPENROUTER_QUICKSTART.md for setup and usage. The local Ollama profile remains available as an optional fully local alternative.
Related MCP server: npm-mcp
Tools
Tool | Use it when | Input |
| The exact package name is unknown or alternatives are wanted |
|
| The exact package name is known and metadata or dependencies are needed |
|
| Only the current |
|
| Published versions and all dist-tags are needed |
|
All tools return JSON as text for broad client compatibility and expose the same value as MCP structured content. Package responses are deliberately filtered rather than returning the registry's full metadata document.
Requirements and installation
Node.js 20 or newer (for native
fetchandAbortSignal.timeout)npm
git clone <repository-url>
cd npm-mcp
npm installRun locally
npm startThe process waits for MCP messages on stdin and writes protocol responses to stdout. Do not type interactively into it; an MCP client should launch it. Development watch mode is available with npm run dev.
Deployment
For local clients, use the stdio entry point. For Docker and cloud deployment, use the stateless Streamable HTTP entry point at /mcp; it requires a bearer token by default and exposes /healthz for health probes. See the Docker and cloud deployment guide for Docker Compose and deployment instructions for Google Cloud Run, Azure Container Apps, AWS App Runner/ECS Fargate, and Kubernetes.
The Compose file also includes the official MCP Inspector as an optional client. Run docker compose --profile inspector up --build -d, then open http://127.0.0.1:6274. See Run an MCP client in Docker for token setup and CLI usage.
Test
npm testTests use Node's built-in test runner and mocked fetch responses, so they do not require the live npm registry.
To inspect the server interactively with MCP Inspector:
npx @modelcontextprotocol/inspector node src/index.jsOpen the URL printed by Inspector, connect, select Tools, choose a tool, enter its arguments, and run it.
MCP client configuration
Use an absolute path so the client can start the server from any working directory:
{
"mcpServers": {
"npm": {
"command": "node",
"args": ["/absolute/path/to/npm-mcp/src/index.js"]
}
}
}The exact outer configuration key can vary by MCP client, but the command and arguments are the same.
Example calls
{"name":"npm_search_packages","arguments":{"query":"postgres orm","limit":10}}{"name":"npm_get_package","arguments":{"packageName":"@nestjs/core"}}{"name":"npm_get_latest_version","arguments":{"packageName":"react"}}{"name":"npm_get_versions","arguments":{"packageName":"axios"}}Architecture
src/index.jsowns stdio startup only.src/http.jsandsrc/http-server.jsprovide the authenticated Streamable HTTP entry point used by containers.src/server.jscreates the MCP server and registers the four tools.src/tools/contains schemas, focused response shaping, and handlers.src/services/npm-registry.jsis the only module that communicates with npm. It validates package names, constrains URLs to the official registry endpoints, applies a timeout, and normalizes network/HTTP/response errors.
Scoped names are encoded as a single registry path segment. The server is stateless and performs no writes.
Future improvements
Possible later additions include download statistics, dependency analysis, package security information, caching, and OAuth-based remote authentication.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceAn 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
- AlicenseBqualityCmaintenanceMCP server for npm package management — publish, install, audit, search, security & dependency health38401MIT
- AlicenseAqualityCmaintenanceMCP server that provides npm package information for AI agents during TypeScript development.7181MIT
- AlicenseAqualityDmaintenanceMCP server providing npm registry search, package details, dependency auditing, bundle size estimation, and package comparison tools for AI agents.546MIT
Related MCP Connectors
Provide AI-powered real-time analysis and intelligence on NPM packages, including security, depend…
npm, PyPI & crates.io intel for AI agents: versions, popularity, deps, health. No API keys.
MCP server for hex.pm and hexdocs.pm: search, inspect, compare, and audit Elixir packages
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/rajeshn95/npm-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server