npm-search-mcp-server
by: btwiuse
MCP server for searching npm packages
📌Overview
Purpose: The npm-search MCP Server enables users to search for npm packages efficiently through the npm search
command.
Overview: This server is built on the Model Context Protocol and acts as an interface for searching npm packages, providing developers with quick and easy access to package information.
Key Features:
-
Search NPM Packages: Allows users to search for npm packages using a search query, facilitating easy discovery of relevant tools and libraries.
-
Multiple Installation Options: Can be installed using Smithery or via npm, catering to different user preferences and environments, ensuring accessibility and convenience.
npm-search MCP Server
A Model Context Protocol server that allows you to search for npm packages by calling the npm search
command.
Available Tools
search_npm_packages
- Search for npm packages.- Required arguments:
query
(string): The search query.
- Required arguments:
Installation
Installing via Smithery
To install npm-search for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install npm-search-mcp-server --client claude
Using NPM (recommended)
Alternatively you can install npm-search-mcp-server
via npm:
npm install -g npm-search-mcp-server
After installation, you can run it as a command using:
npm-search-mcp-server
Using uv
When using uv
no specific installation is needed. Use uvx
to directly run npm-search-mcp-server.
Configuration
Configure for Claude.app
Add to your Claude settings:
Using npm installation:
"mcpServers": {
"npm-search": {
"command": "npx",
"args": ["-y", "npm-search-mcp-server"]
}
}
Using uvx:
"mcpServers": {
"npm-search": {
"command": "uvx",
"args": ["npm-search-mcp-server"]
}
}
Configure for Zed
Add to your Zed settings.json:
Using npm installation:
"context_servers": {
"npm-search-mcp-server": {
"command": "npx",
"args": ["-y", "npm-search-mcp-server"]
}
},
Using uvx:
"context_servers": [
"npm-search-mcp-server": {
"command": "uvx",
"args": ["npm-search-mcp-server"]
}
],
Example Interactions
- Search for npm packages:
{
"name": "search_npm_packages",
"arguments": {
"query": "express"
}
}
Response:
{
"results": [
{
"name": "express",
"description": "Fast, unopinionated, minimalist web framework",
"version": "4.17.1",
"author": "TJ Holowaychuk",
"license": "MIT"
},
...
]
}
Debugging
You can use the MCP inspector to debug the server. For uvx installations:
npx @modelcontextprotocol/inspector npx -y npm-search-mcp-server
Or if developing locally:
cd path/to/servers/src/npm-search
npx @modelcontextprotocol/inspector uv run npm-search-mcp-server
Examples of Questions for Claude
- "Search for express package on npm"
- "Find packages related to react"
- "Show me npm packages for web development"
Build
Docker build:
cd src/npm-search
docker build -t mcp/npm-search .
Contributing
We encourage contributions to help expand and improve npm-search-mcp-server. Whether you want to add new npm-related tools, enhance existing functionality, or improve documentation, your input is valuable.
For examples of other MCP servers and patterns, see: https://github.com/modelcontextprotocol/servers
Pull requests are welcome!
License
npm-search-mcp-server is licensed under the MIT License. You are free to use, modify, and distribute the software under its terms. See the LICENSE file in the project repository for details.