NPM Context Agent MCP
The NPM Context Agent MCP server provides comprehensive contextual information about npm packages through various tools, resources, and prompts:
Core Tools:
Package Metadata (
get_package_info) - Retrieve detailed package information including keywords, license, maintainers, and repository detailsREADME Files (
get_readme_data) - Fetch README content from GitHub repositories with smart branch fallback (main ā master ā default)Package Search (
search_packages) - Search npm registry by keyword with customizable result limitsVersion History (
get_package_versions) - Get all available versions and distribution tagsDependencies Analysis (
get_package_dependencies) - View dependencies, devDependencies, and peerDependencies for any versionDownload Statistics (
get_download_stats) - Track package download trends for last day, week, or monthPackage Comparison (
compare_packages) - Compare two packages side-by-side with detailed metricsBundle Size Analysis (
get_package_size) - Get minified and gzipped size information from BundlephobiaQuality Metrics (
get_package_quality) - Access quality, popularity, and maintenance scores from npms.io
MCP Resources:
package://{packageName}- Access package metadata as JSONpackage://{packageName}/readme- Access README content as markdownpackage://{packageName}/dependencies- Access dependencies as JSONpackage://{packageName}/versions- Access version history as JSON
MCP Prompts:
analyze-package- Comprehensive package analysis templatecompare-packages- Compare two packages templatefind-alternatives- Find alternative packages template
Technical Features:
Type-safe validation using Zod schemas
Support for scoped packages (e.g.,
@types/node)Version-specific queries across all operations
Multiple transport modes: stdio, HTTP, or dual mode simultaneously
Structured JSON output for programmatic access
Fetches README files from GitHub repositories with intelligent branch fallback (main/master/default) to provide package documentation
Provides comprehensive tools for interacting with the npm registry, including fetching package metadata, searching packages, retrieving version history, analyzing dependencies, and accessing download statistics
Click on "Install 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., "@NPM Context Agent MCPshow me the dependencies and download stats for express"
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.
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-mcpFrom 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.jsThen 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.jsEnvironment Variables:
TRANSPORT_MODE- Transport mode:stdio(default),http, orbothPORT- 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://reactRead package README:
package://react/readmeRead package dependencies:
package://react/dependenciesRead version history:
package://react/versionsPrompts:
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 package README from GitHub |
|
| Search npm packages by keyword |
|
| Get all versions of a package |
|
| Get package dependencies |
|
| Get download statistics |
|
| Get comprehensive package info |
|
| Compare two packages side-by-side |
|
| Get bundle size information |
|
| Get quality metrics from npms.io |
|
get_readme_data
Retrieves package information and README content from npm packages.
Parameters:
packageName(string, required): The name of the npm packageversion(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 keywordlimit(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 packageversion(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 packageperiod(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 packageversion(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 comparepackageName2(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 packageversion(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 metadata |
|
| Package README content |
|
| Package dependencies |
|
| Package version history |
|
Available Prompts
Prompt | Description | Arguments |
| Comprehensive package analysis |
|
| Compare two packages |
|
| Find alternative packages |
|
šļø Development
Project Structure
npm-context-agent-mcp/
āāā src/
ā āāā index.ts # Main MCP server implementation
āāā build/ # Compiled JavaScript output
āāā package.json
āāā tsconfig.json
āāā README.mdScripts
pnpm build- Compile TypeScript to JavaScriptpnpm inspect- Run MCP inspector for testing
Building
pnpm buildThe build process compiles TypeScript and makes the output executable.
Testing with MCP Inspector
pnpm inspectThis 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:
Fetches package metadata from various npm APIs
Validates all responses using Zod schemas
For README fetching: Extracts the GitHub repository URL and fetches README with branch fallback
Returns formatted, structured data with both text and JSON output
Supports Resources for application-driven data access
Supports Prompts for reusable analysis templates
Provides multiple transport options (stdio, HTTP, or both)
API Endpoints Used
npm Registry API:
https://registry.npmjs.org/- Package metadata, versions, dependenciesnpm Search API:
https://registry.npmjs.org/-/v1/search- Package search functionalitynpm Downloads API:
https://api.npmjs.org/downloads/point/- Download statisticsGitHub Raw Content:
https://raw.githubusercontent.com/- README file fetchingBundlephobia API:
https://bundlephobia.com/api/size- Bundle size informationnpms.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:
Try
mainbranchTry
masterbranchTry 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 implementationzod- Runtime type validationexpress- HTTP server for HTTP transport mode
š¦ Supported Package Types
This server can query any npm package. Here are examples:
Regular packages:
lodash,express,reactScoped packages:
@types/node,@babel/core,@angular/coreSpecific 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
Built with Model Context Protocol
Powered by the npm registry API
README content sourced from GitHub
Quality metrics provided by npms.io
Bundle size data from Bundlephobia
Available Tools
9 toolscompare_packagesCompare PackagesC
Compare two packages side-by-side
| Name | Required | Description | Default |
|---|---|---|---|
| packageName1 | Yes | ||
| packageName2 | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| packages | Yes |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| packageName | Yes | ||
| period | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| end | Yes | |
| start | Yes | |
| period | Yes | |
| package | Yes | |
| downloads | Yes |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| packageName | Yes | ||
| version | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| name | Yes | |
| version | Yes | |
| dependencies | Yes | |
| devDependencies | Yes | |
| peerDependencies | Yes |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| packageName | Yes | ||
| version | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| name | Yes | |
| license | No | |
| version | No | |
| distTags | No | |
| homepage | No | |
| keywords | No | |
| repository | No | |
| description | No | |
| maintainers | No | |
| totalVersions | No |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| packageName | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| name | Yes | |
| final | Yes | |
| quality | Yes | |
| popularity | Yes | |
| maintenance | Yes |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| packageName | Yes | ||
| version | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| gzip | Yes | |
| name | Yes | |
| size | Yes | |
| version | Yes | |
| dependencyCount | Yes |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| packageName | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| name | Yes | |
| latest | Yes | |
| distTags | Yes | |
| versions | Yes | |
| versionCount | Yes |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| packageName | Yes | ||
| version | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| readme | Yes | |
| package | Yes | |
| version | Yes | |
| repository | Yes | |
| description | Yes |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| total | Yes | |
| results | Yes |
TDQS
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.
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.
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.
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.
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.
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
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.
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.
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.
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
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
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ā¦
Package intelligence for AI agents across npm, PyPI, crates.io and deps.dev. No API keys.
Scrape npm package metadata, versions, downloads, dependencies and maintainers. Pay per row.
Related MCP Servers
- AlicenseCqualityFmaintenanceFetches up-to-date documentation for any npm package directly in your IDE by retrieving README files from GitHub repositories or package tarballs. Provides real-time access to current package documentation and API information.111MIT
- AlicenseNot gradedqualityDmaintenanceProvides intelligent, version-aware access to npm library documentation. Supports semantic search, API validation, and version comparison to assist developers in using libraries correctly.2MIT
- AlicenseAqualityCmaintenanceEnables 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.924MIT
- AlicenseBqualityDmaintenanceEnables querying NPM package download statistics, metadata, and dependency information through natural language.2MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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