Npmlens MCP Server

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

Local serverstdioTypeScript

What is the Npmlens MCP MCP server?

NPMLens MCP: a server exposing tools to search npm packages and fetch READMEs. Exposed over MCP by the npmlens mcp mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

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

Its toolset

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

  • search_npm — The search_npm tool exposed by this server
  • get_readme — The get_readme tool exposed by this server
  • get_package_info — The get_package_info tool exposed by this server
  • get_downloads — The get_downloads tool exposed by this server
  • get_usage_snippet — The get_usage_snippet tool exposed by this server
  • get_package_versions — The get_package_versions tool exposed by this server
  • get_package_dependencies — The get_package_dependencies tool exposed by this server
  • compare_packages — The compare_packages tool exposed by this server
  • search_by_keywords — The search_by_keywords tool exposed by this server

Adding it to your client

npmlens-mcp on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Configuration

You will need one environment variable: GITHUB_TOKEN. 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.

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

When to reach for it

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Npmlens MCP's toolset — search_npm, get_readme, get_package_info and 6 more — is a fair guide to whether it matches your workflow. It is maintained by rakeshmenon; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

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 9 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Npmlens MCP.
  • 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 npmlens mcp mcp server does with a few real requests.

Available tools

ToolWhat it does
search_npmThe search_npm tool exposed by this server.
get_readmeThe get_readme tool exposed by this server.
get_package_infoThe get_package_info tool exposed by this server.
get_downloadsThe get_downloads tool exposed by this server.
get_usage_snippetThe get_usage_snippet tool exposed by this server.
get_package_versionsThe get_package_versions tool exposed by this server.
get_package_dependenciesThe get_package_dependencies tool exposed by this server.
compare_packagesThe compare_packages tool exposed by this server.
search_by_keywordsThe search_by_keywords tool exposed by this server.

How to install the Npmlens MCP MCP server

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

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js v18.17 or newer - npm (or pnpm)
VariableDescriptionRequired
GITHUB_TOKENCredential the server authenticates with.Yes

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

It connects Npmlens MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 9 tools (search_npm, get_readme, get_package_info, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Npmlens MCP directly.