MCP Npm Docs Server MCP Server

An MCP server that provides a tool to fetch metadata and documentation (including README content) for NPM packages, using a local cache to improve

Local serverstdioTypeScript

What is the MCP Npm Docs Server MCP server?

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.

What it actually does

  • Fetches package metadata and README content using the npms.io API
  • Caches results locally using SQLite (better-sqlite3)
  • Provides the getNpmPackageDocs MCP tool
  • Follows the standard MCP server structure

Its toolset

Everything the assistant can do here goes through one of these:

  • 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
  • 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

Adding it to your client

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

Configuration

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.

When to reach for it

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.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 13 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch MCP Npm Docs Server.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the mcp npm docs server mcp server does with a few real requests.

Available tools

ToolWhat it does
createServer.tsServer instance creation and tool registration.
server.tsMain application entry point.
package.jsonProject metadata and dependencies.
tsconfig.jsonTypeScript compiler options.
NPM_CACHE_TTLCache Time-To-Live in seconds. (Default: 86400 - 24 hours)
NPM_CACHE_DB_PATHPath 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_LEVELSet to debug for verbose logging. (Default: info)
nameversion
descriptionhomepage (if available)
dependenciesdevDependencies
Lint** npm run lint
Format** npm run format
getNpmPackageDocsRetrieves documentation and metadata for a specified NPM package.

Configuration

VariableDescriptionRequired
NPM_CACHE_TTLConfiguration value read at startup.Optional
NPM_CACHE_DB_PATHFilesystem location the server is allowed to use.Optional
LOG_LEVELConfiguration value read at startup.Optional
NPM_REGISTRY_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use MCP Npm Docs Server to createServer.ts.
  • Use MCP Npm Docs Server to server.ts.
  • Use MCP Npm Docs Server to package.json.

Frequently asked questions

It returns a JSON object with the package name, version, description, homepage, repository URL, author, license, keywords, dependencies, devDependencies, and README markdown content (when available via npms.io).