home / mcp / npm-context-agent mcp server
Provides MCP-based access to npm package data including metadata, READMEs, dependencies, versions, downloads, and quality metrics.
Configuration
View docs{
"mcpServers": {
"juansebastiangb-npm-context-agent-mcp": {
"command": "node",
"args": [
"path/to/npm-context-agent-mcp/build/index.js"
],
"env": {
"PORT": "3000",
"TRANSPORT_MODE": "http"
}
}
}
}You run a Model Context Protocol (MCP) server that gathers rich npm package data, including metadata, READMEs, dependencies, versions, download trends, and quality metrics. It exposes this information through structured MCP resources and prompts, enabling client applications to analyze and compare packages efficiently.
You interact with this MCP server through an MCP-compatible client. The server supports stdio as the default transport and can also run behind an HTTP transport or in dual mode. You access resources like package metadata, README content, dependencies, and version history, and you can run analysis or comparison prompts to obtain structured results.
Prerequisites: you need Node.js 18+ (Node 20+ is recommended) and pnpm 10.19.0+.
From source you can install dependencies and build the MCP server with the following commands.
git clone <repository-url>
cd npm-context-agent-mcp
pnpm install
pnpm buildThe server supports multiple transports. Use stdio for in-process use, HTTP for remote access, or both.
Stdio Transport (default) Start the server by running the following configuration snippet in your MCP client setup.
{
"mcpServers": {
"npm_context_agent": {
"command": "node",
"args": ["path/to/npm-context-agent-mcp/build/index.js"]
}
}
}To use HTTP transport, set the environment mode to http and start the server. You will connect to the MCP endpoint at the default path.
Example start commands when using HTTP transport and optional port configuration.
export TRANSPORT_MODE=http
export PORT=3000 # optional, defaults to 3000
node build/index.jsYou can configure the server runtime using environment variables for transport mode and port.
Retrieve package information and README content for a package, with an optional version parameter.
Search the npm registry by keyword with an optional limit on results.
Return all available versions for a given package.
Fetch dependencies, devDependencies, and peerDependencies for a specific package version.
Provide download counts over a period such as last day, last week, or last month.
Return comprehensive package metadata including keywords, license, maintainers, and repository details.
Provide a side-by-side comparison of two packages with key metrics.
Return bundle size information from BundlePhobia for a package and optional version.
Fetch quality metrics from npms.io for a package.