npmjs
MCP server from yiannis-spyridakis/npmjs-mcp-server
claude mcp add --transport stdio yiannis-spyridakis-npmjs-mcp-server node dist/index.js
How to use
This MCP server provides structured npm package metadata for use by LLMs and AI-assisted tooling. It exposes a set of tools to fetch quick package summaries, full version histories, and download statistics, all formatted in a consistent JSON structure suitable for reasoning, planning, and data extraction. The server runs as a child process and communicates via the MCP protocol over stdin/stdout, allowing an orchestrator or agent to request package data and receive a predictable payload in response.
Available tools include: get_npm_package_summary (essential package details like latest version, description, license, homepage, and repository URL), get_npm_package_versions (all published versions with their publish dates), get_npm_package_downloads (download counts for a specified period or all default periods), and get_npm_package_details (comprehensive data including maintainers and keywords). Prompts such as get_summary_prompt and get_details_prompt help generate standardized requests for these tools. When integrated into an agent, you can query npmjs package data for use in documentation, risk assessments, or feature planning, then weave the results into your workflows or AI-generated responses.
How to install
Prerequisites:
- Node.js (12.x or newer) and npm
- Access to the project repository (git)
Installation steps:
-
Clone the repository git clone https://github.com/yiannis-spyridakis/npmjs-mcp-server.git cd npmjs-mcp-server
-
Install dependencies npm install
-
Development run (with automatic restarts on file changes) npm run dev
-
Build for production (compile TypeScript to JavaScript) npm run build
Outputs to the dist/ directory
-
Run in production npm start
This will execute node dist/index.js as the MCP server process
Notes:
- The repo uses ts-node and nodemon for development workflows. If you prefer a single-run workflow without watching for changes, you can use npm run watch.
- Ensure any environment-specific configuration is set via environment variables if needed by your deployment environment.
Additional notes
Tips and considerations:
- The server is designed to be consumed by MCP clients via stdin/stdout. Ensure the client properly handles the MCP response envelope and parses the data.content[0].text JSON payload.
- If you plan to deploy in a container or cloud environment, consider wiring the process with a supervisor to automatically restart on failures.
- Validate network access to npm registry APIs if you enable any additional features or caching beyond the provided tools.
- If you introduce authentication or rate-limiting, document the required environment variables (e.g., API keys) in the env section for the server. Common issues include npm registry rate limits or network restrictions in restricted environments.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.