npm-search
MCP server for searching npm packages
claude mcp add --transport stdio btwiuse-npm-search-mcp-server npx -y npm-search-mcp-server \ --env PORT="Port to enable HTTP transport (optional). When set, HTTP mode is auto-enabled."
How to use
npm-search MCP Server provides a dedicated tool to search npm packages by invoking the npm search command through the MCP protocol. It supports both the standard MCP stdio transport and the HTTP transport (streamable-http) which is automatically activated when the PORT environment variable is set. The server exposes a tool called search_npm_packages which accepts a single required argument: query. You can call this tool via MCP by sending a tool invocation with name search_npm_packages and a payload containing the query string. For example, a Claude or Zed integration can request a search for the term express, and you’ll receive a structured list of matching packages including name, description, version, author and license. The server also offers session management and health checks, and can be run inside Docker with HTTP support by exposing port 3009 (or a custom port via PORT).
Typical usage flow:
- Start the MCP server using npm-search (via npx or npm install -g and run npm-search-mcp-server).
- If you want HTTP transport, set PORT to your desired port (e.g., PORT=3009) so the server exposes POST /mcp, GET /mcp for streaming, and GET /health endpoints.
- Send a MCP request to the npm-search tool: {"name": "search_npm_packages", "arguments": {"query": "express"}} and receive a response containing an array of npm package results with metadata such as name, description, version, author, and license.
- Use the streaming HTTP endpoint if you need real-time results; otherwise the standard MCP stdio flow will return the results in one response.
How to install
Prerequisites:
- Node.js and npm installed on your system (recommended current LTS).
- Basic familiarity with running commands in your terminal.
Installation options:
- Quick install via npx (no permanent install required):
npx -y @smithery/cli install npm-search-mcp-server --client claude
- Global npm installation (recommended if you will run npm-search-mcp-server frequently):
npm install -g npm-search-mcp-server
Run the server after installation:
npm-search-mcp-server
- Using uv (alternative runtime):
- No specific installation is needed for uv. Use uvx to run the server:
uvx npm-search-mcp-server
Docker (optional):
- Build and run a Docker container with HTTP support (PORT configurable):
# Build the image
docker build -t mcp/npm-search .
# Run with default port 3009 (no HTTP unless PORT is set)
docker run -p 3009:3009 mcp/npm-search
# Or run with custom port via environment variable to enable HTTP transport
docker run -p 3009:3009 -e PORT=3009 mcp/npm-search
Notes:
- If you want HTTP transport, ensure PORT is set; then the server will expose the MCP HTTP endpoints on that port.
- The repository also supports integration with Claude.app and Zed by configuring the mcpServers section accordingly.
Additional notes
Tips and notes:
- HTTP transport will automatically enable when PORT is set; otherwise the server uses stdio transport suitable for local or inspector workflows.
- The server exposes health at /health and supports session management for HTTP transport.
- Tools available: search_npm_packages (requires query string). You can extend usage by integrating with your Claude/Zed environments using the provided examples.
- If you experience issues, use the MCP inspector tool to debug: npx @modelcontextprotocol/inspector npx -y npm-search-mcp-server or, for development, run inspector with uv: npx @modelcontextprotocol/inspector uv run npm-search-mcp-server.
Related MCP Servers
mcp-arr
MCP server for *arr media management suite
claude-code
MCP Server connects with claude code local command.
Email MCP server with full IMAP + SMTP support — read, search, send, manage, and organize email from any AI assistant via the Model Context Protocol
webasyst
MCP server for Webasyst framework — tools for apps, plugins, themes, UI components via AI assistants (Claude, Cursor)
mcp-fantastical
MCP server for Fantastical calendar app - create events, view calendar, and manage schedules
RN-upgrade-helper
A Model Context Protocol (MCP) server that automates the React Native Upgrade Helper website to extract upgrade information between React Native versions.