An MCP server that provides a tool to fetch metadata and documentation (including README content) for NPM packages, using a local cache to improve
An MCP server that provides a tool to fetch metadata and documentation (including README content) for NPM packages, using a local cache to improve performance. The mcp npm docs server mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 13 defined tools rather than through you.
Everything the assistant can do here goes through one of these:
createServer.ts — Server instance creation and tool registrationserver.ts — Main application entry pointpackage.json — Project metadata and dependenciestsconfig.json — TypeScript compiler optionsNPM_CACHE_TTL — Cache Time-To-Live in seconds. (Default: 86400 - 24 hours)NPM_CACHE_DB_PATH — Path to the SQLite database file. (Default: ./dist/npm-docs-cache.db - relative to the project root after build). If set, this overrides the defaultLOG_LEVEL — Set to debug for verbose logging. (Default: info)name — versiondescription — homepage (if available)dependencies — devDependenciesLint — ** npm run lintFormat — ** npm run formatSetup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.
You will need 4 environment variables: NPM_CACHE_TTL, NPM_CACHE_DB_PATH, LOG_LEVEL, NPM_REGISTRY_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. MCP Npm Docs Server's toolset — createServer.ts, server.ts, package.json and 10 more — is a fair guide to whether it matches your workflow. It is maintained by bsmi021; worth a glance at recent repository activity before you build anything load-bearing on it.
We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.
| Tool | What it does |
|---|---|
| createServer.ts | Server instance creation and tool registration. |
| server.ts | Main application entry point. |
| package.json | Project metadata and dependencies. |
| tsconfig.json | TypeScript compiler options. |
| NPM_CACHE_TTL | Cache Time-To-Live in seconds. (Default: 86400 - 24 hours) |
| NPM_CACHE_DB_PATH | Path to the SQLite database file. (Default: ./dist/npm-docs-cache.db - relative to the project root after build). If set, this overrides the default. Can be an absolute path or relative to the current working directory w |
| LOG_LEVEL | Set to debug for verbose logging. (Default: info) |
| name | version |
| description | homepage (if available) |
| dependencies | devDependencies |
| Lint | ** npm run lint |
| Format | ** npm run format |
| getNpmPackageDocs | Retrieves documentation and metadata for a specified NPM package. |
| Variable | Description | Required |
|---|---|---|
| NPM_CACHE_TTL | Configuration value read at startup. | Optional |
| NPM_CACHE_DB_PATH | Filesystem location the server is allowed to use. | Optional |
| LOG_LEVEL | Configuration value read at startup. | Optional |
| NPM_REGISTRY_URL | Endpoint or connection string the server talks to. | Yes |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.