mcp-npm_docs-server
by bsmi021·★ 3·Score 30
MCP server for fetching NPM package metadata and documentation with local SQLite caching.
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:
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 READMEgetNpmPackageDocsgetNpmPackageDocs(packageName: string, forceFresh?: boolean)Retrieves documentation and metadata for a specified NPM package.
Comparable tools
Installation
Installation
- Clone the repository:
git clone https://github.com/bsmi021/mcp-npm_docs-server.git
cd mcp-npm_docs-server- Install dependencies:
npm install- Build the server:
npm run build- Run the server:
node dist/server.jsIntegration
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
Last updated · Auto-generated from public README + GitHub signals.