NPM MCP Server

by mateusribeirocampos

1 stars
282 downloads
Not rated
GitHub

About

NPM MCP Server is a Model Context Protocol server that fetches detailed information about npm packages. It provides a search tool for individual packages and a resource listing the 10 most popular packages. It is intended for developers and AI agents that need rapid, structured…

Details

Author
mateusribeirocampos
GitHub stars
1
Downloads
282
Categories
Other

- Search any npm package by name for detailed info
- List the top 10 most popular npm packages
- Returns version, description, author, and homepage
- Provides dependencies for searched packages
- Exposes resource URI npm://popular
- Written in TypeScript using the MCP SDK

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name NPM MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via Smithery (npx -y @smithery/cli install @mateusribeirocampos/npm-mcp-server --client claude) or manually (npm install, then npm run build and npm start). Use the searchNpmPackage tool with a packageName argument or access the npm://popular resource URI.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "npm mcp server": {
            "npm-mcp-server": {
                "command": "npx",
                "args": [
                    "-y",
                    "@smithery/cli",
                    "install",
                    "@mateusribeirocampos/npm-mcp-server",
                    "--client",
                    "claude"
                ]
            }
        }
    }
}

McpServers

{
    "npm-mcp-server": {
        "command": "npx",
        "args": [
            "-y",
            "@smithery/cli",
            "install",
            "@mateusribeirocampos/npm-mcp-server",
            "--client",
            "claude"
        ]
    }
}

NPM MCP Server

smithery badge

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:

npx -y @smithery/cli install @mateusribeirocampos/npm-mcp-server --client claude

Installing Manually

npm install

Build

npm run build

Running

npm start

For development:

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:

const result = await server.tools.searchNpmPackage({ packageName: "react" });

Example response:

{
  "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:

[
  {
    "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

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.