pkg-peep
Provides tools for retrieving NPM package download statistics, metadata, and dependency information.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pkg-peep get download stats for react last month"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pkg-peep π
A Model Context Protocol (MCP) server for NPM package intelligence. Get download statistics, package metadata, and dependency information for any NPM package.
How It Works
This MCP server exposes NPM registry APIs as tools that Q CLI and Claude can use:
MCP Protocol: Server communicates with AI clients via Model Context Protocol
Tool Registration: NPM API endpoints become callable tools
No Authentication: Uses public NPM APIs (no API key required)
JSON Responses: All package data returned as formatted JSON
Related MCP server: npmlens-mcp
pkg-peep MCP Architecture
%%{init: {'flowchart': {'curve': 'basis'}}}%%
graph LR
A["π»<br/>Q CLI"] -.-> B["π<br/>MCP Server"]
C["π»<br/>Claude Code"] -.-> B
B <--> D["π¦<br/>NPM Registry API"]
B <--> E["π<br/>NPM Downloads API"]
style A fill:#6366f1,stroke:#000,stroke-width:3px,color:#fff
style C fill:#ff9900,stroke:#000,stroke-width:3px,color:#000
style B fill:#C11C84,stroke:#000,stroke-width:3px,color:#fff
style D fill:#cb3837,stroke:#000,stroke-width:3px,color:#fff
style E fill:#10b981,stroke:#000,stroke-width:3px,color:#000When you ask Q CLI or Claude Code to "get download stats for react", it:
Calls the
get_npm_downloadstoolServer makes API request to NPM Downloads API
Returns formatted results to the AI client
The agent presents the data to you in context
Features
π Download Statistics - Weekly, monthly, daily, or custom date ranges
π¦ Package Metadata - Versions, dependencies, maintainers, license info
π Comprehensive Info - Repository links, keywords, creation dates
β‘ Fast & Reliable - Direct NPM registry API integration
π No API Key Required - Uses public NPM APIs
Tools
get_npm_downloads
Get download statistics for any NPM package.
Parameters:
package(required): NPM package nameperiod(optional):last-day,last-week,last-monthstartDate(optional): Custom start date (YYYY-MM-DD)endDate(optional): Custom end date (YYYY-MM-DD)
Example Response:
{
"downloads": 50766634,
"start": "2025-08-27",
"end": "2025-09-02",
"package": "react"
}get_npm_package_info
Get comprehensive package metadata.
Parameters:
package(required): NPM package name
Example Response:
{
"name": "react",
"description": "React is a JavaScript library for building user interfaces.",
"latest": "19.1.1",
"license": "MIT",
"homepage": "https://react.dev/",
"repository": {
"url": "git+https://github.com/facebook/react.git",
"type": "git"
},
"maintainers": [
{"name": "fb", "email": "opensource+npm@fb.com"}
],
"dependencies": {...},
"created": "2011-10-26T17:46:21.942Z"
}Installation
For Amazon Q CLI
Clone or download this repository
Install dependencies:
npm installThe MCP server is ready to use with Q CLI's MCP support
For Claude Desktop
Add to your Claude Desktop configuration:
{
"mcpServers": {
"pkg-peep": {
"command": "node",
"args": ["/path/to/pkg-peep/index.js"]
}
}
}Using NPX (Recommended)
{
"mcpServers": {
"pkg-peep": {
"command": "npx",
"args": ["-y", "pkg-peep"]
}
}
}Usage Examples
Get weekly downloads:
Get download stats for "react" packageCustom date range:
Get download stats for "lodash" from 2024-01-01 to 2024-12-31Package information:
Get package info for "express"Testing
Run the test suite to verify everything works:
npm testThe tests verify:
β Tool registration (both download and package info tools)
β Download stats for popular packages
β Different time periods (daily, weekly, monthly)
β Package metadata retrieval
β Custom date ranges
β Error handling for non-existent packages
π Example Prompts >> - Try these sample queries to test your MCP!
Development
# Install dependencies
npm install
# Run the server
node index.js
# Test with a simple request
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | node index.jsAPI Endpoints Used
NPM Downloads API:
https://api.npmjs.org/downloads/NPM Registry API:
https://registry.npmjs.org/
License
MIT
Contributing
Issues and pull requests welcome! This MCP server uses the official Model Context Protocol SDK.
Available Tools
2 toolsget_npm_downloadsC
Get NPM package download statistics
Inputs: package (required), period, endDate, startDate.
get_npm_package_infoB
Get comprehensive NPM package metadata
Inputs: package (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 2 tools
The two tools address distinct aspects of NPM package data: download statistics versus package metadata. There is no overlap or ambiguity between them.
Both tools follow a consistent get_npm_[noun] pattern, making their purpose predictable from the name alone.
With only two tools, the server feels thin for a general-purpose package inspection utility. This falls at the lower end of the acceptable range, earning a borderline score.
The server covers basic metadata and download stats, but lacks common operations like version listing, search, or readme retrieval. Agents needing those features would hit a dead end.
Maintenance
Related MCP Connectors
Dive into the world of npm with our NPM Package Info MCP. Access crucial metadata about any npm
Provide AI-powered real-time analysis and intelligence on NPM packages, including security, dependβ¦
Live npm and UNPKG data for AI agents: resolution, audits, import maps, malware/CVE checks.
Scrape npm package metadata, versions, downloads, dependencies and maintainers. Pay per row.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides comprehensive contextual information about npm packages including README files, versions, dependencies, download statistics, and search functionality. Enables users to explore and analyze npm packages through natural language queries with intelligent GitHub README fetching and branch fallback.9MIT
- AlicenseAqualityDmaintenanceEnables AI coding agents to search the npm registry and retrieve package metadata, READMEs, download stats, GitHub details, and usage snippets via the Model Context Protocol.915 npmMIT
- AlicenseAqualityCmaintenanceEnables AI assistants to track weekly npm package download trends, growth rates, and rankings for market and developer ecosystem research.3MIT
- AlicenseNot gradedqualityCmaintenanceEnables searching npm packages, retrieving package details and version histories, and fetching download statistics through the npm Registry API.105 npmMIT