What is Mcp Npm_docs Server?
An MCP server that provides a tool to fetch metadata and documentation (including README content) for NPM packages. It uses the npms.io API and caches results locally with SQLite to improve performance. It is intended for developers using MCP clients (like Cline) who need programmatic access to package documentation.
How to use Mcp Npm_docs Server?
Install dependencies with npm install, build with npm run build, then run the compiled server with node dist/server.js. Configure caching via environment variables NPM_CACHE_TTL and NPM_CACHE_DB_PATH. Integrate with an MCP client by adding the server entry (using the absolute path to dist/server.js) to the client’s MCP settings file. The server exposes a single tool getNpmPackageDocs.
Key features of Mcp Npm_docs Server
- Fetches package metadata and README via npms.io API.
- Caches results locally using SQLite (better-sqlite3).
- Provides the
getNpmPackageDocs MCP tool.
- Configurable cache TTL (default 24 hours).
- Supports
forceFresh parameter to bypass cache.
- Follows standard MCP server structure.
Use cases of Mcp Npm_docs Server
- Retrieve documentation and metadata for a specific NPM package.
- Integrate package information into developer tools or workflows.
- Reduce API calls and speed up repeated lookups using local caching.
- Programmatically check package version, dependencies, license, and README.
コメント