Purpose
npm-search-mcp-server is a Model Context Protocol (MCP) server for searching npm packages. It performs searches by invoking the npm search command, enabling MCP-capable clients (such as Claude Desktop, Zed, etc.) to query npm package information through tool calls.
Main capabilities
- Search npm packages using the npm search command.
- Support two transport modes, stdio and HTTP (streamable-http); when the PORT environment variable is set, HTTP mode is automatically enabled.
- Use Pino for structured logging.
- Support graceful shutdown handling.
- Provide a health check endpoint (/health).
- Provide session management for the HTTP transport.
Available tools
- search_npm_packages: search npm packages. The required parameter is query (a string), i.e. the search query content.
Usage
- Automatically install npm-search for Claude Desktop via Smithery.
- Install npm-search-mcp-server using NPM (recommended); after installation it can be run as a command.
- When using uv, no specific installation is required; npm-search-mcp-server can be run directly with uvx.
- Can be added to Claude's settings, or added to Zed's settings.json.
- The server can be debugged using MCP inspector (the material provides examples for uvx installation and for installation or development in a specific directory).
- Can be run in a Docker container with HTTP transport support: set the PORT environment variable to use HTTP transport; the server exposes POST /mcp (the main MCP endpoint for tool calls and session initialization), GET /mcp (the SSE stream endpoint for streaming responses, requiring a session ID), DELETE /mcp (the session termination endpoint), and GET /health (the health check endpoint, including service status and the number of active sessions). The material also mentions that it can be used for Docker Compose integration.
Applicable scenarios
Suitable for quickly retrieving npm packages in MCP clients, findingpackages related to a specific topic (such as react, web development), or querying a specific package (such as express). The example questions given in the material include: "Search for express package on npm", "Find packages related to react", "Show me npm packages for web development".
Limitations
The material does not provide information such as detailed fields of search results, rate limits, authentication requirements, or performance metrics. The project uses the MIT license and permits use, modification, and distribution subject to the terms of the MIT license.