NPM MCP Server
# NPM MCP Server
[](https://smithery.ai/server/@mateusribeirocampos/npm-mcp-server)
This is a Model Context Protocol (MCP) server that provides functionality to fetch information about npm packages.
## Features
1. **Package Search**: Tool to fetch detailed information about npm packages
2. **Popular Packages**: Resource to list the 10 most popular npm packages
## Installation
### Installing via Smithery
To install NPM MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@mateusribeirocampos/npm-mcp-server):
```bash
npx -y @smithery/cli install @mateusribeirocampos/npm-mcp-server --client claude
```
### Installing Manually
```bash
npm install
```
## Build
```bash
npm run build
```
## Running
```bash
npm start
```
For development:
```bash
npm run dev
```
## Usage
The server exposes two main functionalities:
### 1. searchNpmPackage Tool
Fetches detailed information about a specific npm package. The tool returns comprehensive package information including:
- Package name
- Latest version
- Description
- Author information
- Homepage URL
- Repository URL
- Dependencies list
Example usage:
```typescript
const result = await server.tools.searchNpmPackage({ packageName: "react" });
```
Example response:
```json
{
"name": "react",
"version": "18.2.0",
"description": "React is a JavaScript library for building user interfaces.",
"author": "Meta Open Source",
"homepage": "https://reactjs.org/",
"repository": {
"url": "https://github.com/facebook/react.git"
},
"dependencies": {
"loose-envify": "^1.1.0"
}
}
```
### 2. popular-packages Resource
Lists the 10 most popular npm packages, sorted by popularity. Each package in the list includes:
- Package name
- Description
- Current version
Resource URI: `npm://popular`
Example response:
```json
[
{
"name": "lodash",
"description": "Lodash modular utilities",
"version": "4.17.21"
},
// ... more packages
]
```
## Integration with AI Models
This MCP server can be integrated with AI models to:
1. Get package information before installation
2. Compare different package versions
3. Analyze dependencies
4. Find popular alternatives
5. Get quick package summaries
## Technologies
- TypeScript
- Model Context Protocol SDK
- Node-fetch
- Zod
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'searchNpmPackage' has a distinct and clear purpose by default.
Since there is only one tool, naming consistency is inherently perfect. The tool name 'searchNpmPackage' uses a consistent verb_noun pattern with no deviations to evaluate.
A single tool is too few for a server named 'NPM MCP Server', which implies broader npm-related functionality. This feels thin and incomplete for the apparent scope of npm package management.
The tool set is severely incomplete for an npm server. Only search functionality is provided, with no coverage for install, view, publish, update, or other essential npm operations, leading to significant gaps.