Skip to main content
Glama

npm-context-agent-mcp

A Model Context Protocol (MCP) server that provides comprehensive contextual information about npm packages, including README files, versions, dependencies, download statistics, and more.

šŸš€ Features

Core Capabilities

  • šŸ“¦ Package Metadata - Get detailed information about any npm package

  • šŸ“– README Files - Automatically fetches README from GitHub repositories with smart branch fallback

  • šŸ” Package Search - Search npm registry by keyword with customizable result limits

  • šŸ“‹ Version History - Get all available versions of a package with dist tags

  • šŸ”— Dependencies Info - View dependencies, devDependencies, and peerDependencies

  • šŸ“Š Download Statistics - Track package download trends (last day, week, or month)

  • ā„¹ļø Comprehensive Info - Get full package metadata including keywords, license, maintainers

  • šŸ”€ Package Comparison - Compare two packages side-by-side

  • šŸ“¦ Bundle Size - Get package bundle size information from bundlephobia

  • ⭐ Quality Metrics - Get quality scores from npms.io

MCP Resources

Resources provide application-driven data access:

  • package://{packageName} - Package metadata as JSON resource

  • package://{packageName}/readme - README content as markdown resource

  • package://{packageName}/dependencies - Dependencies as JSON resource

  • package://{packageName}/versions - Version history as JSON resource

MCP Prompts

Ready-to-use prompt templates:

  • analyze-package - Comprehensive package analysis prompt

  • compare-packages - Compare two packages prompt

  • find-alternatives - Find alternative packages prompt

Transport Support

  • stdio Transport - Traditional stdio-based communication (default)

  • HTTP Transport - HTTP-based communication for remote access

  • Dual Mode - Support both transports simultaneously

Technical Features

  • šŸ›”ļø Type-safe validation - Uses Zod for runtime schema validation

  • šŸ·ļø Scoped package support - Handles scoped packages like @types/node

  • šŸŽÆ Version support - Fetch specific package versions for all operations

  • ⚔ Smart branch fallback - Automatically tries main → master → default branches

  • šŸ”„ Error handling - Graceful error handling with detailed error messages

  • šŸ“¤ Structured output - All tools return structured JSON for programmatic access

  • šŸŽØ Modern MCP SDK - Uses latest MCP SDK v1.20.2 with resources and prompts

  • 🌐 HTTP & stdio - Choose your transport mode based on your needs

Related MCP server: dag-mcp-server

šŸ“‹ Requirements

  • Node.js 18+ (works with Node.js 20+ recommended)

  • pnpm 10.19.0+

šŸ› ļø Installation

From npm (when published)

npm install -g npm-context-agent-mcp

From source

git clone <repository-url>
cd npm-context-agent-mcp
pnpm install
pnpm build

šŸŽÆ Usage

As an MCP Server

This server implements the Model Context Protocol and can be used with MCP-compatible clients.

Stdio Transport (Default)

Add to your MCP configuration:

{
  "mcpServers": {
    "npm-context-agent": {
      "command": "node",
      "args": ["path/to/npm-context-agent-mcp/build/index.js"]
    }
  }
}

HTTP Transport

To use HTTP transport, set the environment variable before starting:

export TRANSPORT_MODE=http
export PORT=3000  # optional, defaults to 3000
node build/index.js

Then connect to http://localhost:3000/mcp from your MCP client.

Dual Mode

To run both stdio and HTTP transports simultaneously:

export TRANSPORT_MODE=both
node build/index.js

Environment Variables:

  • TRANSPORT_MODE - Transport mode: stdio (default), http, or both

  • PORT - HTTP server port (default: 3000, only used for http/both modes)

Quick Start Examples

Tools:

Get README for a package:

{ "packageName": "react" }

Search for packages:

{ "query": "state management", "limit": 5 }

Get all versions:

{ "packageName": "svelte" }

Get dependencies:

{ "packageName": "@types/node", "version": "24.0.0" }

Check download stats:

{ "packageName": "lodash", "period": "last-week" }

Compare packages:

{ "packageName1": "express", "packageName2": "fastify" }

Get bundle size:

{ "packageName": "lodash", "version": "4.17.21" }

Get quality metrics:

{ "packageName": "react" }

Resources:

Read package metadata:

package://react

Read package README:

package://react/readme

Read package dependencies:

package://react/dependencies

Read version history:

package://react/versions

Prompts:

Analyze a package:

{ "packageName": "express" }

Compare two packages:

{ "packageName1": "vue", "packageName2": "react" }

Find alternatives:

{ "packageName": "lodash", "useCase": "utility functions" }

Available Tools

Tool

Description

Parameters

get_readme_data

Get package README from GitHub

packageName, version?

search_packages

Search npm packages by keyword

query, limit?

get_package_versions

Get all versions of a package

packageName

get_package_dependencies

Get package dependencies

packageName, version?

get_download_stats

Get download statistics

packageName, period?

get_package_info

Get comprehensive package info

packageName, version?

compare_packages

Compare two packages side-by-side

packageName1, packageName2

get_package_size

Get bundle size information

packageName, version?

get_package_quality

Get quality metrics from npms.io

packageName

get_readme_data

Retrieves package information and README content from npm packages.

Parameters:

  • packageName (string, required): The name of the npm package

  • version (string, optional): Specific version to fetch (defaults to latest)

Example:

{
  "packageName": "zustand",
  "version": "5.0.0"
}

Response: Returns package name, version, description, repository URL, and README content.


search_packages

Search npm registry for packages by keyword.

Parameters:

  • query (string, required): Search keyword

  • limit (number, optional): Maximum number of results (default: 20)

Example:

{
  "query": "state management",
  "limit": 10
}

Response: Returns matching packages with names, versions, descriptions, authors, and links.


get_package_versions

Get all available versions of a package.

Parameters:

  • packageName (string, required): The name of the npm package

Example:

{
  "packageName": "react"
}

Response: Returns list of all versions, dist tags, and latest version.


get_package_dependencies

Get dependencies and devDependencies for a package.

Parameters:

  • packageName (string, required): The name of the npm package

  • version (string, optional): Specific version to fetch (defaults to latest)

Example:

{
  "packageName": "@types/node",
  "version": "24.0.0"
}

Response: Returns dependencies, devDependencies, and peerDependencies for the specified version.


get_download_stats

Get download statistics from npm.

Parameters:

  • packageName (string, required): The name of the npm package

  • period (string, optional): Time period - "last-day", "last-week", or "last-month" (default: "last-month")

Example:

{
  "packageName": "lodash",
  "period": "last-week"
}

Response: Returns download counts and date range for the specified period.


get_package_info

Get comprehensive package metadata.

Parameters:

  • packageName (string, required): The name of the npm package

  • version (string, optional): Specific version to fetch (defaults to all versions)

Example:

{
  "packageName": "express",
  "version": "4.18.0"
}

Response: Returns comprehensive package information including keywords, license, maintainers, and repository details.


compare_packages

Compare two packages side-by-side with detailed metrics.

Parameters:

  • packageName1 (string, required): First package to compare

  • packageName2 (string, required): Second package to compare

Example:

{
  "packageName1": "express",
  "packageName2": "fastify"
}

Response: Returns side-by-side comparison including versions, descriptions, download statistics, maintainers, and keywords.


get_package_size

Get bundle size information for a package from bundlephobia.

Parameters:

  • packageName (string, required): The name of the npm package

  • version (string, optional): Specific version to check (defaults to latest)

Example:

{
  "packageName": "lodash",
  "version": "4.17.21"
}

Response: Returns minified size, gzipped size, and dependency count.


get_package_quality

Get quality metrics from npms.io for a package.

Parameters:

  • packageName (string, required): The name of the npm package

Example:

{
  "packageName": "react"
}

Response: Returns quality score, popularity score, and maintenance score.


Available Resources

Resource

Description

MIME Type

package://{packageName}

Package metadata

application/json

package://{packageName}/readme

Package README content

text/markdown

package://{packageName}/dependencies

Package dependencies

application/json

package://{packageName}/versions

Package version history

application/json

Available Prompts

Prompt

Description

Arguments

analyze-package

Comprehensive package analysis

packageName

compare-packages

Compare two packages

packageName1, packageName2

find-alternatives

Find alternative packages

packageName, useCase?


šŸ—ļø Development

Project Structure

npm-context-agent-mcp/
ā”œā”€ā”€ src/
│   └── index.ts          # Main MCP server implementation
ā”œā”€ā”€ build/                # Compiled JavaScript output
ā”œā”€ā”€ package.json
ā”œā”€ā”€ tsconfig.json
└── README.md

Scripts

  • pnpm build - Compile TypeScript to JavaScript

  • pnpm inspect - Run MCP inspector for testing

Building

pnpm build

The build process compiles TypeScript and makes the output executable.

Testing with MCP Inspector

pnpm inspect

This runs the MCP inspector which allows you to test the server interactively.

šŸ›ļø Architecture

MCP Server Implementation

The server uses the @modelcontextprotocol/sdk v1.20.2 to create a standardized MCP server that:

  1. Fetches package metadata from various npm APIs

  2. Validates all responses using Zod schemas

  3. For README fetching: Extracts the GitHub repository URL and fetches README with branch fallback

  4. Returns formatted, structured data with both text and JSON output

  5. Supports Resources for application-driven data access

  6. Supports Prompts for reusable analysis templates

  7. Provides multiple transport options (stdio, HTTP, or both)

API Endpoints Used

  • npm Registry API: https://registry.npmjs.org/ - Package metadata, versions, dependencies

  • npm Search API: https://registry.npmjs.org/-/v1/search - Package search functionality

  • npm Downloads API: https://api.npmjs.org/downloads/point/ - Download statistics

  • GitHub Raw Content: https://raw.githubusercontent.com/ - README file fetching

  • Bundlephobia API: https://bundlephobia.com/api/size - Bundle size information

  • npms.io API: https://api.npms.io/v2/package/ - Quality metrics

Data Flow

Client Request → MCP Server → Multiple APIs (npm, bundlephobia, npms.io, GitHub)
                                 ↓
                           Validation (Zod)
                                 ↓
                           Structured Response (Text + JSON)

Error Handling

The server implements comprehensive error handling:

  • HTTP errors from all APIs (npm registry, bundlephobia, npms.io, GitHub)

  • Invalid response structures

  • GitHub README fetch failures with branch fallback

  • Network errors and timeouts

  • Scoped package handling

  • Missing package or version errors

All errors are returned with descriptive messages and proper error flags in both text and structured formats.

README Fetching with Branch Fallback

The server intelligently fetches README files by trying multiple branches in order:

  1. Try main branch

  2. Try master branch

  3. Try default branch (no branch specification)

This ensures maximum compatibility across different repository configurations.

šŸ”’ Type Safety

The project uses Zod for runtime validation across all tools:

const NpmRegistryResponseSchema = z.object({
  name: z.string(),
  version: z.string(),
  description: z.string().optional(),
  repository: z.object({
    type: z.string(),
    url: z.string(),
  }),
});

This ensures type safety and prevents runtime errors from unexpected API responses across all API endpoints.

šŸ“¦ Dependencies

  • @modelcontextprotocol/sdk - MCP SDK for server implementation

  • zod - Runtime type validation

  • express - HTTP server for HTTP transport mode

šŸ“¦ Supported Package Types

This server can query any npm package. Here are examples:

  • Regular packages: lodash, express, react

  • Scoped packages: @types/node, @babel/core, @angular/core

  • Specific versions: All tools support optional version parameters

šŸ“ Version History

Version 2.0.0 (Current)

Major Update - MCP SDK modernization and new features

New Features:

  • āœ… MCP Resources support (4 resources)

  • āœ… MCP Prompts support (3 prompts)

  • āœ… HTTP transport mode

  • āœ… Dual transport mode (stdio + HTTP)

  • āœ… Package comparison tool

  • āœ… Bundle size tool (bundlephobia integration)

  • āœ… Quality metrics (npms.io integration)

  • āœ… Structured output for all tools

  • āœ… Modern SDK v1.20.2 with registerTool/Resource/Prompt APIs

Improvements:

  • āœ… All tools migrated to registerTool() API

  • āœ… All tools return structured content

  • āœ… Better error handling and type safety

  • āœ… Enhanced documentation

Note:

  • Removed security checking tool due to unavailable public API for vulnerability data

Version 1.0.0

Initial Release - Complete npm context agent MCP server

Features:

  • āœ… README fetching with branch fallback

  • āœ… Package search functionality

  • āœ… Version history retrieval

  • āœ… Dependencies analysis

  • āœ… Download statistics

  • āœ… Comprehensive package info

  • āœ… Scoped package support

  • āœ… Version-specific queries

  • āœ… Zod schema validation

  • āœ… Comprehensive error handling

šŸ¤ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

šŸ“„ License

MIT License

Copyright (c) 2025 Juan Sebastian Gonzalez

See LICENSE.md for full license text.

šŸ™ Acknowledgments

Available Tools

9 tools
compare_packagesCompare PackagesC

Compare two packages side-by-side

ParametersJSON Schema
NameRequiredDescriptionDefault
packageName1Yes
packageName2Yes

Output Schema

ParametersJSON Schema
NameRequiredDescription
packagesYes

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action (compare) but doesn't describe what the comparison entails (e.g., returns a structured output, side-by-side view), any limitations (e.g., only works for certain package types), or potential side effects. For a tool with no annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single sentence, 'Compare two packages side-by-side', which is front-loaded and wastes no words. It efficiently conveys the core action without unnecessary elaboration, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (which should document return values), the description doesn't need to explain outputs. However, with 2 parameters at 0% schema coverage and no annotations, the description is too minimal—it doesn't clarify comparison aspects or usage context. For a simple comparison tool, it's borderline adequate but lacks depth for reliable agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no details on parameters. The description mentions 'two packages' but doesn't specify what 'packageName1' and 'packageName2' represent (e.g., package IDs, names, versions) or any constraints (e.g., must be valid packages). This fails to compensate for the lack of schema documentation, leaving parameters largely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Compare two packages side-by-side' clearly states the verb (compare) and resource (packages), making the purpose understandable. However, it's vague about what aspects are compared (e.g., versions, dependencies, quality) and doesn't distinguish from sibling tools like 'get_package_dependencies' or 'get_package_quality', which might offer overlapping functionality. This leaves room for ambiguity in tool selection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_package_dependencies' and 'get_package_quality', it's unclear if this tool aggregates such data or serves a different purpose. There's no mention of prerequisites, exclusions, or specific contexts for use, leaving the agent to guess based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_download_statsGet Download StatisticsB

Get download statistics from npm

ParametersJSON Schema
NameRequiredDescriptionDefault
packageNameYes
periodNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
endYes
startYes
periodYes
packageYes
downloadsYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it 'gets' data, implying a read-only operation, but doesn't specify if it requires authentication, rate limits, or the format of returned statistics. This leaves significant gaps for a tool that likely interacts with an external API.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste, front-loading the core functionality. It's appropriately sized for a simple tool, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (which handles return values), no annotations, and a simple input schema, the description is minimally adequate. However, it lacks details on behavioral aspects like API constraints or error handling, which are important for completeness in a real-world usage scenario.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, but it adds no information about parameters beyond what the schema implies. The schema clearly defines 'packageName' and 'period' with an enum, so the baseline is 3, as the description doesn't enhance understanding of what these parameters mean in context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get download statistics') and resource ('from npm'), making the purpose immediately understandable. It doesn't differentiate from sibling tools like 'get_package_info' or 'get_package_quality', which might also provide statistical data, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_package_info' or 'compare_packages', nor does it mention prerequisites or exclusions. It's a basic statement of function without context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_package_dependenciesGet Package DependenciesB

Get dependencies, devDependencies, and peerDependencies for a package

ParametersJSON Schema
NameRequiredDescriptionDefault
packageNameYes
versionNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
nameYes
versionYes
dependenciesYes
devDependenciesYes
peerDependenciesYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves dependencies but doesn't mention any behavioral traits like whether it's read-only, if it requires authentication, rate limits, or what happens with invalid inputs. This leaves significant gaps for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without any unnecessary words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that there's an output schema (which handles return values), no annotations, and low complexity, the description covers the basic purpose but lacks details on usage, parameters, and behavior. It's minimally adequate but has clear gaps, especially with 0% schema coverage and no annotations to compensate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter details. The description mentions 'for a package', which implies the 'packageName' parameter, but doesn't explain what 'version' does or provide any additional meaning beyond the basic schema. With 0% coverage, this adds minimal value, resulting in a baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and the resource ('dependencies, devDependencies, and peerDependencies for a package'), making the purpose specific and understandable. However, it doesn't explicitly distinguish this tool from siblings like 'get_package_info' or 'get_package_versions', which might also provide dependency-related information, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings such as 'get_package_info' that might include dependencies, there's no indication of when this specific tool is preferred or what its unique context is, leaving usage unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_package_infoGet Package InfoC

Get comprehensive package metadata

ParametersJSON Schema
NameRequiredDescriptionDefault
packageNameYes
versionNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
nameYes
licenseNo
versionNo
distTagsNo
homepageNo
keywordsNo
repositoryNo
descriptionNo
maintainersNo
totalVersionsNo

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves metadata but doesn't describe what 'comprehensive' entails, potential rate limits, authentication needs, error conditions, or the format of returned data. This leaves significant gaps for an AI agent to understand how to use it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single, front-loaded sentence that directly states the tool's purpose. There's no wasted verbiage, and it efficiently communicates the core function without unnecessary details, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema, the description doesn't need to explain return values, which helps. However, with no annotations, 2 undocumented parameters, and multiple sibling tools, the description is too minimal. It should clarify the scope of 'comprehensive' metadata and when to use this versus other package tools to be fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 2 parameters with 0% description coverage, and the tool description doesn't mention parameters at all. It doesn't explain what 'packageName' and 'version' represent, their expected formats, or whether 'version' is optional for latest versions. This fails to compensate for the lack of schema descriptions, making parameter usage ambiguous.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('comprehensive package metadata'), making it easy to understand what it does. However, it doesn't distinguish this tool from its siblings like 'get_package_versions' or 'get_package_dependencies', which also retrieve package metadata but for specific aspects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_package_versions' or 'get_package_quality', it's unclear if this tool should be used for general metadata or as a fallback when more specific tools aren't available. No explicit when/when-not statements or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_package_qualityGet Package Quality MetricsB

Get quality metrics from npms.io

ParametersJSON Schema
NameRequiredDescriptionDefault
packageNameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
nameYes
finalYes
qualityYes
popularityYes
maintenanceYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does but lacks details on traits like rate limits, authentication needs, response format, or error handling. This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, clearly stating the tool's purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one parameter) and the presence of an output schema, the description is somewhat complete. However, with no annotations and 0% schema coverage, it lacks behavioral context and parameter semantics, making it only minimally adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It implies the 'packageName' parameter is used to fetch metrics but doesn't add meaning beyond what the schema's property name suggests. With only one parameter, the baseline is 4, but the description fails to provide any semantic context, lowering the score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('quality metrics from npms.io'), making the purpose understandable. However, it doesn't specifically differentiate this tool from its siblings like 'get_package_info' or 'get_download_stats' that might also provide quality-related metrics, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_package_info' that might include quality metrics, there's no indication of what makes this tool unique or when it should be preferred, leaving usage unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_package_sizeGet Package SizeC

Get bundle size information from bundlephobia

ParametersJSON Schema
NameRequiredDescriptionDefault
packageNameYes
versionNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
gzipYes
nameYes
sizeYes
versionYes
dependencyCountYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves information, implying a read-only operation, but doesn't cover aspects like rate limits, error handling, authentication needs, or what the output contains (though an output schema exists). This is a significant gap for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—it directly states the tool's function and source. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly without unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no annotations, but with an output schema), the description is minimally adequate. It specifies the action and source, but lacks usage guidelines, parameter details, and behavioral context. The output schema mitigates some gaps, but overall completeness is limited, aligning with a baseline score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning parameters are undocumented in the schema. The description adds no meaning beyond the schema—it doesn't explain what 'packageName' or 'version' represent, their formats, or examples. For a tool with 2 parameters and low coverage, this fails to compensate, leaving semantics unclear.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Get bundle size information from bundlephobia', specifying the action (get), resource (bundle size information), and source (bundlephobia). It distinguishes from siblings like get_package_info or get_package_dependencies by focusing specifically on size metrics, though it doesn't explicitly contrast them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like get_package_info (which might include size) or compare_packages (for relative sizing), there's no indication of context, prerequisites, or exclusions, leaving the agent to infer usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_package_versionsGet Package VersionsB

Get all available versions of a package

ParametersJSON Schema
NameRequiredDescriptionDefault
packageNameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
nameYes
latestYes
distTagsYes
versionsYes
versionCountYes

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states a read operation ('Get'), implying it is likely safe, but does not mention any behavioral traits such as rate limits, authentication needs, or what the output contains (e.g., list format, pagination). This leaves significant gaps for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It is front-loaded and appropriately sized for the tool's simplicity, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter) and the presence of an output schema, the description is complete enough for basic understanding. However, without annotations and with 0% schema coverage, it could benefit from more context on behavior or usage, but the output schema mitigates some gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate. It mentions 'packageName' implicitly by referring to 'a package', but does not add meaning beyond the schema, such as format examples or constraints. With 1 parameter and low coverage, the baseline is 3 as it minimally addresses the parameter but lacks detailed semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'all available versions of a package', making the purpose understandable. However, it does not explicitly differentiate from sibling tools like 'get_package_info' or 'get_package_dependencies', which might also provide version-related information, so it lacks sibling differentiation for a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_package_info' that might include version data, there is no explicit or implied context for choosing this tool, leaving the agent without usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_readme_dataGet Package READMEB

Get README file content from a package's GitHub repository

ParametersJSON Schema
NameRequiredDescriptionDefault
packageNameYes
versionNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
readmeYes
packageYes
versionYes
repositoryYes
descriptionYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions retrieving content from GitHub but doesn't specify aspects like rate limits, authentication needs, error handling, or response format (though output schema exists). This leaves significant gaps for a tool interacting with external APIs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without any wasted words. It's front-loaded and appropriately sized for its purpose, earning full marks for conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (external GitHub access) and lack of annotations, the description is incomplete—it doesn't cover behavioral traits like API constraints. However, the existence of an output schema reduces the need to explain return values, making it minimally adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, but it doesn't explain the parameters 'packageName' or 'version' beyond what's implied. It adds minimal value over the schema, as it doesn't clarify parameter meanings, formats, or examples, resulting in a baseline score due to the output schema's presence.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get README file content') and resource ('from a package's GitHub repository'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_package_info' or 'get_package_quality', which might also provide README-related data, so it misses full sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_package_info' that might include README content, there's no indication of when this tool is preferred, such as for raw README text or specific GitHub access, leaving usage context implied at best.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_packagesSearch npm PackagesC

Search npm registry for packages by keyword

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
totalYes
resultsYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool searches the npm registry by keyword, implying a read-only operation, but doesn't disclose any behavioral traits like rate limits, authentication needs, pagination, or what happens with invalid queries. For a search tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any fluff. It's appropriately sized and front-loaded, making it easy for an agent to quickly understand the core functionality. Every word earns its place, with no wasted information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no annotations, but with an output schema), the description is incomplete. It covers the basic purpose but lacks usage guidelines, parameter details, and behavioral context. The presence of an output schema means the description doesn't need to explain return values, but it should still address other aspects like when to use it versus siblings, which it fails to do.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate for the lack of parameter documentation. It mentions 'by keyword', which hints at the 'query' parameter, but doesn't explain the 'limit' parameter or provide any details on parameter formats, constraints, or usage. With 2 parameters and no schema descriptions, the description adds minimal value beyond what's inferred from the tool name.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('search') and resource ('npm registry for packages'), specifying it's by keyword. It distinguishes from siblings like 'get_package_info' or 'compare_packages' by focusing on keyword-based search rather than specific package retrieval or comparison. However, it doesn't explicitly differentiate from all siblings, such as 'get_download_stats' which might also involve searching, so it's not a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose 'search_packages' over 'get_package_info' for finding packages, or when to use it in conjunction with other tools like 'compare_packages'. There's no context on prerequisites, such as needing a query parameter, or exclusions, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.5/5.0
Disambiguation5/5

Every tool has a clearly distinct purpose targeting specific aspects of npm package analysis, with no ambiguity or overlap. For example, get_package_info provides general metadata while get_package_quality focuses on npms.io metrics, and get_package_size handles bundlephobia data.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with snake_case throughout, using descriptive action verbs like 'get', 'search', and 'compare' paired with specific nouns. This creates a predictable and readable naming convention across all nine tools.

Tool Count5/5

Nine tools is well-scoped for npm package analysis, providing comprehensive coverage without bloat. Each tool earns its place by addressing distinct aspects like metadata, dependencies, versions, quality metrics, and search functionality.

Completeness4/5

The tool set provides excellent coverage for npm package research and comparison, including search, metadata, dependencies, versions, quality metrics, and bundle analysis. Minor gaps might include package installation/management operations or deeper GitHub integration beyond README access, but core workflows are well-supported.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides intelligent, version-aware access to npm library documentation. Supports semantic search, API validation, and version comparison to assist developers in using libraries correctly.
    2
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables 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.
    9
    24
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables querying NPM package download statistics, metadata, and dependency information through natural language.
    2
    MIT

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/JuanSebastianGB/npm-context-agent-mcp'

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