Skip to main content
ClaudeWave

npm registry MCP server — package intelligence, security audits, and dependency analysis for AI assistants

MCP ServersRegistry oficial2 estrellas1 forksTypeScriptMITActualizado today
ClaudeWave Trust Score
95/100
Verified
Passed
  • Open-source license (MIT)
  • Actively maintained (<30d)
  • Clear description
  • Topics declared
  • Documented (README)
Last scanned: 9/15/2026
Install in Claude Code / Claude Desktop
Method: Manual
Claude Code CLI
git clone https://github.com/YawLabs/npmjs-mcp
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "npmjs-mcp": {
      "command": "node",
      "args": ["/path/to/npmjs-mcp/dist/index.js"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
💡 Clone https://github.com/YawLabs/npmjs-mcp and follow its README for install instructions.
Casos de uso

Resumen de MCP Servers

# @yawlabs/npmjs-mcp

[![npm version](https://img.shields.io/npm/v/@yawlabs/npmjs-mcp)](https://www.npmjs.com/package/@yawlabs/npmjs-mcp)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![GitHub stars](https://img.shields.io/github/stars/YawLabs/npmjs-mcp)](https://github.com/YawLabs/npmjs-mcp/stargazers)

**Run npm registry operations from Claude Code, Cursor, and any MCP client.** 64 tools covering the full registry surface: package intelligence, security audits, dependency analysis, org/team management, and the write ops that normally fight you locally (`npm deprecate`, `npm dist-tag`, `npm owner`, `npm unpublish`).

Built and maintained by [Yaw Labs](https://yaw.sh).

[![Add to Yaw MCP](https://yaw.sh/yaw-mcp-button.svg)](https://yaw.sh/mcp/install?name=npm&command=npx&args=-y%2C%40yawlabs%2Fnpmjs-mcp&description=npm%20registry%20-%20package%20intel%2C%20security%2C%20dependency%20analysis%2C%20write%20ops&source=https%3A%2F%2Fgithub.com%2FYawLabs%2Fnpmjs-mcp)

One click adds this to your local Yaw MCP config so it's available in every Yaw Terminal session. Or install manually below.

## Why this one?

Other npm MCP servers wrap `npm search` and call it done. This one doesn't.

- **Full registry HTTP surface** — 64 tools across reads, writes, orgs, teams, hooks, provenance, trusted publishers, and ops health. Not just `npm view`.
- **Write ops that actually work in agents** — `npm_deprecate`, `npm_undeprecate`, `npm_dist_tag_set`, `npm_unpublish_version` go directly to the HTTP API with a Granular Access Token that has 2FA bypass. No 2FA prompts, no `--otp` hunts, no `ENEEDAUTH` from a session-bound `.npmrc`. (Since 2026-07-31 npm requires an interactive 2FA challenge for owner, access, team membership and grant, org membership and token changes even with 2FA bypass; for those tools the error names the exact `npm` command a human runs.)
- **Agent-aware failure surfacing** — `npm_check_auth` and `npm_publish_preflight` detect a non-interactive context and hand back a human-runnable command, and every write error names what was sent and the npm CLI equivalent, instead of looping on unrecoverable errors.
- **Safety by default** — `npm_unpublish_*` requires `confirm: true`. `npm_owner_remove` blocks you from locking yourself out. `npm_deprecate` rejects a message over the registry's 1024-character limit before sending it.
- **Ops playbook built in** — `npm_ops_playbook` returns the canonical tool-vs-CLI-vs-CI decision matrix so your agent picks the right path on the first try.
- **Tool annotations** — every tool declares `readOnlyHint`, `destructiveHint`, `idempotentHint`, and `openWorldHint`, so MCP clients can skip confirmation on safe ops.
- **No API key required for reads** — search, packages, downloads, security, dep tree, licenses all work anonymously. Auth is opt-in via `NPM_TOKEN`.
- **Instant startup** — ships as a single bundled file with zero runtime dependencies. No 5-minute `node_modules` install.
- **Input hardening** — package names, scopes, versions, dist-tags, and team names are all regex-validated against npm's actual constraints. Defends against CRLF and path-traversal in URL construction.

## Quick start

**1. Create `.mcp.json` in your project root**

macOS / Linux / WSL:

```json
{
  "mcpServers": {
    "npm": {
      "command": "npx",
      "args": ["-y", "@yawlabs/npmjs-mcp@latest"]
    }
  }
}
```

Windows:

```json
{
  "mcpServers": {
    "npm": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@yawlabs/npmjs-mcp@latest"]
    }
  }
}
```

> **Why the extra step on Windows?** Since Node 20, `child_process.spawn` cannot directly execute `.cmd` files (that's what `npx` is on Windows). Wrapping with `cmd /c` is the standard workaround.

**2. Restart and approve**

Restart Claude Code (or your MCP client) and approve the npm MCP server when prompted.

**3. (Optional) Add your npm token for write operations**

Read-only tools work without any setup. For write tools (`deprecate`, `dist-tag`, `owner`, `team_*`, `org_member_*`, `unpublish`, `hook_*`, `access_set*`, `token_revoke`), add `NPM_TOKEN` to the `env` block:

```json
{
  "mcpServers": {
    "npm": {
      "command": "npx",
      "args": ["-y", "@yawlabs/npmjs-mcp@latest"],
      "env": {
        "NPM_TOKEN": "npm_xxxxxxxxxxxx"
      }
    }
  }
}
```

Use a [Granular Access Token](https://docs.npmjs.com/creating-and-viewing-access-tokens#creating-granular-access-tokens) scoped to just the packages and orgs you want your agent to manage.

That's it. Now ask your AI assistant:

> "Deprecate my-old-pkg 1.x with a pointer to v2"
>
> "What's the dep tree for fastify look like three levels deep?"
>
> "Audit express for known CVEs and tell me the fix"
>
> "Who are the maintainers of next.js and when did each one last publish?"

## Configuration

| Environment variable | Default | Description |
|---|---|---|
| `NPM_TOKEN` | (none) | npm access token. Required only for write/auth/org/access/hooks tools. Use a Granular Access Token (with 2FA bypass for headless writes); classic tokens, including Automation tokens, were revoked in December 2025. |
| `NPM_REGISTRY` | `https://registry.npmjs.org` | Alternate registry (enterprise/private). Must support the npm HTTP API shape. |
| `NPM_REQUEST_TIMEOUT_MS` | `30000` | Timeout for each attempt of a registry request, in milliseconds, including reading the body. A read retries a timeout, a network error, or HTTP 429/502/503/504, up to 3 attempts in all, so a stalled read can take about three times this value. A write is never re-sent after a timeout or network error, because the registry may already have applied it; it retries only on 429/503. A value that is not a positive, finite number (`Infinity` included) falls back to the default, so the timeout cannot be turned off. |
| `NPM_RETRY_BACKOFF_MS` | `500` | Base wait before a retry, doubled each time: 500 ms, then 1000 ms by default. When the retried response carries a `Retry-After` header, that wait (capped at 30 s) is used instead, whatever this is set to. `0`, an empty value, or whitespace removes the backoff wait. Any other negative or non-numeric value falls back to the default. |
| `DEBUG` | (none) | Logs one line per attempt of every npm API call to stderr, prefixed `[npmjs-mcp]`: method, URL, then the status and milliseconds to response headers, or the wait before a retry and the attempt number, or the network error. The token is never logged. Enabled only by the exact values `npmjs-mcp` or `*`; anything else, such as `1` or `npmjs-mcp:*`, is ignored. A `DEBUG=*` set for another tool turns it on too. |
| `NPMJS_MCP_RUNTIME` | `auto` | `auto`: serve on the [oam](https://oamjs.org) the launcher is already running under if that is 0.15.2 or newer; otherwise run on the newest oam binary it can find at 0.15.2 or newer (see `OAM_BIN`); otherwise on Node. An oam host older than 0.15.2 never serves the server itself — it hands off to the newest usable oam, or to Node on `PATH`, or exits with an error when there is neither. An unusable `OAM_BIN` is always named on stderr; the other oam binaries found are named, with the reason, only when none of them is usable — an older copy losing to a newer one says nothing. `oam`: the same, but exit with an error instead of falling back to Node. `node`: always Node — in-process under `npx`, and handed off to Node on `PATH` when a client launches the command with `oam run`. Case-insensitive; any other value behaves like `auto`. |
| `NPMJS_MCP_SANDBOX` | (none) | `1` runs the server in a freshly spawned oam (0.15.2+) under `--permission`, granting only the npm registry hosts (plus `NPM_REGISTRY`'s host) and the variables the server reads; filesystem and subprocess access stay denied. Forces a spawn even when already running on oam. Under `auto`, when no usable oam is found, or the one found fails to launch, the server runs without the sandbox and says so on stderr; pair it with `NPMJS_MCP_RUNTIME=oam` to make that fatal. Ignored under `NPMJS_MCP_RUNTIME=node`. |
| `OAM_BIN` | (none) | Path to an `oam` binary to use in preference to discovery, when it is 0.15.2 or newer. If it does not exist, is older, or will not run, the launcher says so on stderr and carries on with discovery. Discovery looks in the installed location (`%LOCALAPPDATA%\oam\bin` then `~/.oam/bin` on Windows, `~/.oam/bin` elsewhere) and on `PATH`, asks every oam it finds for its version, and uses the newest; on a tie the installed copy wins. On Windows only `oam.exe` counts; an `oam.cmd` / `oam.bat` shim is never run, and is named on stderr when no usable oam is found. Ignored under `NPMJS_MCP_RUNTIME=node`, and when already running on oam 0.15.2+ without the sandbox. |

### Runtime

The server ships a launcher that prefers the [oam](https://oamjs.org) runtime and falls back to Node. The server itself is a pre-bundled ESM file using only `node:` builtins, so **both paths behave identically** — verified against the full MCP surface (handshake, all 64 tools, live registry calls) on each.

**oam 0.15.2, the latest release, is the minimum.** The launcher asks every oam binary it can find for its version and runs the newest one at or above it, never serves on an older oam, and falls back to Node when there is none (`NPMJS_MCP_RUNTIME=oam` turns that into a hard error). See [Configuration](#configuration) for the details.

Falling back costs nothing: npm has already started Node to run the launcher, so the fallback is an in-process `import()` — no extra spawn, no extra startup.

**oam is faster, but the launcher is not.** Measured on windows-arm64, n=12 medians, spawn to first MCP `initialize` response:

| invocation | time | vs node |
|---|--:|--:|
| `oam run dist/index.js` | 116 ms | **0.67x** |
| `node dist/index.js` | 172 ms | 1.00x |
| this launcher (node spawns oam) | 243 ms | 1.41x |

npm `bin` entries are Node scripts, so reaching oam through one costs Node's startup *plus* oam's
agentaiai-agentsauditclaudeclaude-codeclaude-desktopcursordependenciesmcpmcp-servermodel-context-protocolnpmnpm-registrynpmjspackagesregistrysecurityvscodewindsurf

Lo que la gente pregunta sobre npmjs-mcp

¿Qué es YawLabs/npmjs-mcp?

+

YawLabs/npmjs-mcp es mcp servers para el ecosistema de Claude AI. npm registry MCP server — package intelligence, security audits, and dependency analysis for AI assistants Tiene 2 estrellas en GitHub y su última actualización registrada es del 2026-09-14.

¿Cómo se instala npmjs-mcp?

+

Puedes instalar npmjs-mcp clonando el repositorio (https://github.com/YawLabs/npmjs-mcp) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.

¿Es seguro usar YawLabs/npmjs-mcp?

+

Nuestro agente de seguridad ha analizado YawLabs/npmjs-mcp y le ha asignado un Trust Score de 95/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.

¿Quién mantiene YawLabs/npmjs-mcp?

+

YawLabs/npmjs-mcp es mantenido por YawLabs. La última actividad registrada en GitHub es del 2026-09-14, con 0 issues abiertos.

¿Hay alternativas a npmjs-mcp?

+

Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.

Despliega npmjs-mcp en tu cloud

Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.

¿Mantienes este repo? Añade un badge a tu README

Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.

Featured on ClaudeWave: YawLabs/npmjs-mcp
[![Featured on ClaudeWave](https://claudewave.com/api/badge/yawlabs-npmjs-mcp)](https://claudewave.com/repo/yawlabs-npmjs-mcp)
<a href="https://claudewave.com/repo/yawlabs-npmjs-mcp"><img src="https://claudewave.com/api/badge/yawlabs-npmjs-mcp" alt="Featured on ClaudeWave: YawLabs/npmjs-mcp" width="320" height="64" /></a>

Más MCP Servers

Alternativas a npmjs-mcp