Skip to main content
Glama
chris-trag

pkg-peep

by chris-trag

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:

  1. MCP Protocol: Server communicates with AI clients via Model Context Protocol

  2. Tool Registration: NPM API endpoints become callable tools

  3. No Authentication: Uses public NPM APIs (no API key required)

  4. JSON Responses: All package data returned as formatted JSON

Related MCP server: dag-mcp-server

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:#000

When you ask Q CLI or Claude Code to "get download stats for react", it:

  1. Calls the get_npm_downloads tool

  2. Server makes API request to NPM Downloads API

  3. Returns formatted results to the AI client

  4. 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 name

  • period (optional): last-day, last-week, last-month

  • startDate (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

  1. Clone or download this repository

  2. Install dependencies:

    npm install
  3. The 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"]
    }
  }
}
{
  "mcpServers": {
    "pkg-peep": {
      "command": "npx",
      "args": ["-y", "pkg-peep"]
    }
  }
}

Usage Examples

Get weekly downloads:

Get download stats for "react" package

Custom date range:

Get download stats for "lodash" from 2024-01-01 to 2024-12-31

Package information:

Get package info for "express"

Testing

Run the test suite to verify everything works:

npm test

The 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.js

API 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.

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Provides 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.
    Last updated
    9
    MIT
  • A
    license
    -
    quality
    A
    maintenance
    Enables npm registry operations from MCP clients like Claude Code and Cursor, with 64 tools for package intelligence, security audits, dependency analysis, org/team management, and write operations like deprecate and unpublish.
    Last updated
    255
    2
    MIT
  • F
    license
    -
    quality
    C
    maintenance
    Grants AI agents real-time access to the NPM registry, enabling package metadata retrieval, version checks, and dependency auditing for up-to-date code generation.
    Last updated
    25
    3

View all related MCP servers

Related MCP Connectors

  • Provide AI-powered real-time analysis and intelligence on NPM packages, including security, depend…

  • npm, PyPI & crates.io intel for AI agents: versions, popularity, deps, health. No API keys.

  • Package intelligence for AI agents across npm, PyPI, crates.io and deps.dev. No API keys.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chris-trag/pkg-peep'

If you have feedback or need assistance with the MCP directory API, please join our Discord server