MCP Catalogs
Home

mcp-npm_docs-server

by bsmi021·3·Score 30

MCP server for fetching NPM package metadata and documentation with local SQLite caching.

developer-toolsai-llmother
0
Forks
0
Open issues
14 mo ago
Last commit
2d ago
Indexed

Overview

This MCP server provides a tool to fetch metadata and documentation (including README content) for NPM packages, using a local SQLite cache to improve performance. It uses the npms.io API for data retrieval and implements proper caching mechanisms to reduce API calls. The server follows standard MCP structure with clear separation of concerns through configuration, services, tools, and utility modules.

Try asking AI

After installing, here are 6 things you can ask your AI assistant:

you:Documentation lookup for developers working with npm packages
you:Metadata retrieval for package analysis tools
you:Cached access to npm package information in offline environments
you:What API is used to fetch npm package information?
you:How is caching implemented?
you:Can I force a fresh fetch despite the cache?

When to choose this

Choose this MCP server when you need to quickly access NPM package documentation and metadata in AI workflows, especially with caching benefits for repeated queries.

When NOT to choose this

Don't choose this if you need real-time package data without caching, or if you require access to private NPM packages not available through npms.io.

Tools this server exposes

1 tool extracted from the README
  • getNpmPackageDocsgetNpmPackageDocs(packageName: string, forceFresh?: boolean)

    Retrieves documentation and metadata for a specified NPM package.

Comparable tools

npm-mcpnode-package-info-server

Installation

Installation

  1. Clone the repository:
git clone https://github.com/bsmi021/mcp-npm_docs-server.git
cd mcp-npm_docs-server
  1. Install dependencies:
npm install
  1. Build the server:
npm run build
  1. Run the server:
node dist/server.js

Integration

Add to your MCP settings (e.g., Claude Desktop config.json):

{
  "mcpServers": {
    "npm-docs-server": {
      "command": "node",
      "args": ["/path/to/mcp-npm_docs-server/dist/server.js"],
      "env": {
        "NPM_CACHE_TTL": "86400",
        "NPM_CACHE_DB_PATH": "./dist/npm-docs-cache.db",
        "LOG_LEVEL": "info"
      }
    }
  }
}

FAQ

What API is used to fetch npm package information?
The server uses the npms.io API to fetch package metadata and documentation.
How is caching implemented?
Caching is implemented using SQLite with the better-sqlite3 driver, with a configurable Time-To-Live (TTL) value.
Can I force a fresh fetch despite the cache?
Yes, you can set the 'forceFresh' parameter to true when calling the getNpmPackageDocs tool to bypass the cache.

Compare mcp-npm_docs-server with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.