Npmlens MCP Server

NPMLens MCP: a server exposing tools to search npm packages and fetch READMEs.

Local serverstdioTypeScript

What is the Npmlens MCP Server?

NPMLens MCP: a server exposing tools to search npm packages and fetch READMEs.

What it actually does

npmlens-mcp lets your coding agent (such as Claude, Cursor, Copilot, Gemini or Codex) search the npm registry and fetch package context (README, downloads, GitHub info, usage snippets). It acts as a Model‑Context‑Protocol (MCP) server, giving your AI assistant a structured way to discover libraries and integrate them quickly.

  • Structured npm search with optional ranking weights
  • Direct README fetch (optionally truncated)
  • Enriched package info (downloads + GitHub details)
  • Usage snippet extraction from README
  • Stdio MCP transport, ready for MCP‑compatible clients

Configuration

  • Node.js v18.17 or newer - npm (or pnpm)

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
search_npmSearch the npm registry with optional ranking weights.
Argspackages (array of 1-10 package names, required).
ReturnsArray of comparison data with name, version,
search_by_keywordsSearch npm packages by specific keywords/tags with AND/OR operators.
Example"Compare react-query, swr, and apollo-client".
get_readmeFetch README markdown for a package (optionally by version).
get_package_infoEnriched package info combining registry metadata, npm downloads,
get_usage_snippetExtract a likely usage snippet from a package README.
get_package_versionsList all available versions of a package with publish dates and dist
get_package_dependenciesGet the dependency tree for a package.
get_downloadsFetch npm downloads for the last day/week/month.
compare_packagesCompare multiple npm packages side-by-side.

How to install the Npmlens MCP Server

{
  "mcpServers": {
    "npmlens": {
      "command": "npx",
      "args": [
        "-y",
        "npmlens-mcp@latest"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  • Node.js v18.17 or newer - npm (or pnpm)

Example prompts to try

  • “Use Npmlens MCP to search npm.”
  • “Use Npmlens MCP to get readme.”
  • “Use Npmlens MCP to get package info.”

Frequently asked questions

NPMLens MCP: a server exposing tools to search npm packages and fetch READMEs. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.