- Home
- MCP servers
- npm-context-agent
npm-context-agent
- typescript
0
GitHub Stars
typescript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
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.
How to use
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.
How to install
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 build
Run and connect to the MCP server
The 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"]
}
}
}
HTTP and Dual transport notes
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.js
Environment variables you may use
You can configure the server runtime using environment variables for transport mode and port.
Available tools
get_readme_data
Retrieve package information and README content for a package, with an optional version parameter.
search_packages
Search the npm registry by keyword with an optional limit on results.
get_package_versions
Return all available versions for a given package.
get_package_dependencies
Fetch dependencies, devDependencies, and peerDependencies for a specific package version.
get_download_stats
Provide download counts over a period such as last day, last week, or last month.
get_package_info
Return comprehensive package metadata including keywords, license, maintainers, and repository details.
compare_packages
Provide a side-by-side comparison of two packages with key metrics.
get_package_size
Return bundle size information from BundlePhobia for a package and optional version.
get_package_quality
Fetch quality metrics from npms.io for a package.