Skip to main content
Glama
mgcrea

@mgcrea/mcp-npm

by mgcrea

@mgcrea/mcp-npm

npm version ghcr

A Model Context Protocol server for the npm registry, built around the thing npm's own tooling makes hardest to automate: configuring trusted publishers. It also covers package intel, dist-tags, deprecation, access, org and team governance, tokens, security advisories, and publishing. Read-only by default — the mutating tools are not registered at all unless you turn them on.

Features

  • Trusted publishing, programmatically. Read, set and revoke the OIDC trusted publisher on a package, or apply one across a batch of packages with a single browser authorization.

  • Works with zero configuration. If npm whoami answers, so does this — it reads the token npm login already wrote to ~/.npmrc, scoped to the registry you are actually talking to.

  • Read-only by default. Write tools are absent, not refused, until NPM_ALLOW_WRITES=1. Everything irreversible additionally needs an explicit confirm: true.

  • Never exits on missing credentials. An unconfigured server still answers, and npm_auth_status tells you exactly what to set.

  • Responses shaped for a context window. A raw packument is megabytes; these are a screen.

  • Native fetch, no runtime dependencies beyond the MCP SDK, Zod and @mgcrea/mcp-totp.

Related MCP server: npm-registry-mcp

Security

Supply chain. Three runtime dependencies: @modelcontextprotocol/server, zod and @mgcrea/mcp-totp. No HTTP client, no logging framework. Every transitive dependency would be attack surface on a process holding a live npm token.

The third is ours, and it is the fleet's usual justification for one: @mgcrea/mcp-totp/core is the dependency-free half of our own TOTP server — RFC 6238, otpauth:// parsing and the macOS keychain store — and re-deriving it here would fork it on day one. It is imported lazily, so a server in the default web mode never loads it, and it pulls in nothing of its own.

Your credentials. The token is read from NPM_TOKEN, a config file, or the entry in ~/.npmrc matching the configured registry — a token for npmjs.org is never sent to a private registry, or the reverse. Nothing is written to disk. One-time passwords are held in memory only, for the life of the process.

Blast radius. With the defaults, this server can only read. With NPM_ALLOW_WRITES=1 it can change what your CI is allowed to publish, move dist-tags, deprecate versions, alter org and team membership, mint and revoke tokens, and publish or unpublish packages. Grant it deliberately.

Token choice matters. A granular access token with Bypass 2FA enabled is rejected by every trusted-publisher write. See Traps worth knowing.

Configure

The server starts with no configuration at all. In that state it registers only the tools that need none — npm_auth_status and npm_audit_dependencies, since npm's advisory endpoint takes no authentication — and npm_auth_status tells you what to set for the rest. It never refuses to start over a missing token, because an MCP server that exits shows up in the client as a bare Connection closed with the explanation swallowed.

Most people need nothing:

npm login        # this server reads the resulting ~/.npmrc entry
npm whoami       # if this answers, you are configured

Variable

Required

Description

NPM_TOKEN

no

Overrides the ~/.npmrc lookup. Needed in Docker and CI.

NPM_REGISTRY

no

Defaults to https://registry.npmjs.org. The .npmrc token is looked up for this host.

NPM_DOWNLOADS_URL

no

Defaults to https://api.npmjs.org. A different host, never authenticated.

NPM_ALLOW_WRITES

no

1 to register the write tools. Off by default.

NPM_OTP_MODE

no

web (default), totp, static, or none. See Two-factor.

NPM_TOTP_LABEL

no

totp mode: which seed to read. Defaults to npm.

NPM_TOTP_SECRET

no

totp mode: an otpauth:// URI or base32 key, instead of the keychain.

NPM_TOTP_KEYCHAIN_SERVICE

no

totp mode: keychain service holding the seed. Defaults to com.mgcrea.mcp-totp.

NPM_OTP_AUTH_TYPE

no

Overrides the npm-auth-type header. Escape hatch; leave unset.

NPM_OTP

no

A code. Almost always wrong — see the note in .env.example.

NPM_OTP_TTL_SECONDS

no

How long a confirmed code is reused. Defaults to 300, npm's own window.

NPM_OTP_MAX_USES

no

Calls one code covers. Defaults to 80, npm's own guidance.

NPM_AUTO_OPEN_BROWSER

no

0 to print the URL instead of launching a browser.

NPM_MAX_RETRIES

no

Retry budget for 429/5xx. Defaults to 3.

NPM_BIN

no

Path to npm's npm-cli.js (or an npm executable), for npm_publish. Only needed when npm is not on PATH.

NPM_MCP_CONFIG

no

Path to a JSON config file.

NPM_DEBUG

no

1 to log to stderr.

See .env.example for the annotated list.

Config file

  • The environment wins, field by field. A config file supplies whatever the environment does not, so Docker and CI keep working, and a one-off NPM_ALLOW_WRITES=0 still overrides a file that says true.

  • Keys are camelCase (allowWrites, not NPM_ALLOW_WRITES).

  • Unknown keys are an error, not ignored — a typo'd allowWrite tells you so instead of silently falling back to the environment.

  • Location: $NPM_MCP_CONFIG, else $XDG_CONFIG_HOME/npm-mcp/config.json, else ~/.config/npm-mcp/config.json. An absent file is fine; a malformed one is reported with its path. The variable is NPM_MCP_CONFIG, not NPM_CONFIG, because npm reads its own npm_config_* namespace out of the environment.

  • The server warns on stderr if the file is readable by other users.

Quick start

A. npx

{
  "mcpServers": {
    "npm": { "command": "npx", "args": ["-y", "@mgcrea/mcp-npm"] }
  }
}

B. Docker

docker run --rm -i -e NPM_TOKEN ghcr.io/mgcrea/mcp-npm

C. From source

pnpm install && pnpm build
node dist/cli.js

Inspect the tools

npx @modelcontextprotocol/inspector node dist/cli.js

Two-factor

npm requires an npm-otp header on all three trusted-publisher endpoints — including the read — and a one-time password lasts about five minutes. A code cannot be configured once at startup and reused: it is dead before anything runs.

How far that gets you depends on NPM_OTP_MODE:

Mode

Where the code comes from

Unattended?

web (default)

npm's browser confirmation page

No — one human click per five-minute window

totp

Minted locally from a stored seed

Yes

static

NPM_OTP, typed in

No, and usually already expired by the time it is used

none

Nothing; npm_auth_otp can still supply one

No

npm_auth_status reports which flow will actually run, and says plainly what each one can and cannot do rather than offering a setting that looks like it should work.

totp mode

Set NPM_OTP_MODE=totp and the second factor is computed on the spot, with no browser and no click, so batches and scripted publishes run start to finish on their own:

NPM_OTP_MODE=totp            # seed read via @mgcrea/mcp-totp
NPM_TOTP_LABEL=npm           # which seed; defaults to "npm"
NPM_TOTP_SECRET=...          # optional: otpauth:// URI or base32 key, for Docker/CI

With no NPM_TOTP_SECRET, the seed comes from the macOS login keychain — see @mgcrea/mcp-totp for how to get one in there, including sharing it with Passwords.app so your phone keeps working.

The trade is real and worth stating. npm's second factor then lives on the same machine as the npm token, so anything that can read that keychain item can publish as you. Where it applies, trusted publishing over OIDC is strictly better — it needs no second factor at all. Reach for totp for local publishes and account management, not as a substitute for OIDC in CI.

One implementation detail that matters if you are debugging it: a TOTP code is single-use, so the provider never replays one npm has already consumed — if the current 30-second window is burnt it waits for the next.

npm-auth-type stays web in this mode too. That was checked against the live registry rather than assumed: a TOTP typed straight from an authenticator was accepted on both the publish and trusted-publisher endpoints with web set, so npm validates npm-otp without consulting it — and web is what makes npm attach an authorization URL to a challenge, which is the only way a human recovers from a missing or wrong code. NPM_OTP_AUTH_TYPE overrides it if npm ever changes how it negotiates.

Publishing without a human

npm_publish meets the same wall, and the same mode gets past it: under NPM_OTP_MODE=totp a challenged publish mints its code locally and continues. In the default web mode it fails immediately instead, because the browser provider will not open a page and block unless the call asked it to — pass wait_for_otp: true when someone is there to click, or run npm_auth_otp first and let the publish ride the cached code.

The credential half has an escape hatch too. npm_auth_login runs npm's browser sign-in and holds the resulting session token in memory for the life of the server process — never on disk, never in a tool result. It exists because npm login in a terminal cannot be driven by an agent: with stdin at EOF, npm falls through to its legacy Username: prompt and exits having written nothing. Reach for it when the configured token turns out to be the wrong kind — a granular token that cannot create a package, or one whose selected-packages list does not name yours. It is behind NPM_ALLOW_WRITES, and a token it obtains dies with the process; npm login plus npm_auth_reload is still what makes one durable.

In web mode, what is possible is spending one authorization on many packages. npm's confirmation page has a same-IP cooldown; this server caches the confirmed code for that window (in memory, never on disk) so npm_set_trusted_publisher_batch prompts once for up to 25 packages.

The web flow, when npm asks:

  1. A trust call goes out without a code and npm answers 401 with an authorization URL.

  2. Every trust tool except npm_auth_otp fails right there, with that URL in authUrl and a remedy explaining the fix. None of them knows whether a human is watching this session, so none of them blocks waiting to find out — an immediate, actionable failure beats a multi-minute hang with nobody to click the link, which is what an earlier version of this server did.

  3. npm_auth_otp is the one call that does wait: run it first — with code from an authenticator app, or with package to open the browser and poll for up to otpTimeoutMs (180s default) — and every trust call after it rides the cached code until it expires. npm_set_trusted_publisher_batch does this too, once, on the first package only; the other 24 ride the same cache, which is the whole mechanism behind its "one prompt" promise.

Reach for npm_auth_otp before any trust call in a non-interactive or agentic session — there is no other way past step 2 there — or whenever you would rather approve the prompt at a moment of your choosing. Pass it code to skip the browser entirely, or open: false when the browser is on another machine.

Tools

42 tools. W = needs NPM_ALLOW_WRITES=1; ⚠ = also needs confirm: true.

Area

Tools

Auth

npm_auth_status, npm_auth_reload, npm_auth_login W, npm_auth_otp, npm_auth_clear_otp, npm_whoami

Trusted publishing

npm_get_trusted_publisher, npm_set_trusted_publisher W, npm_set_trusted_publisher_batch W, npm_delete_trusted_publisher W

Packages

npm_get_package, npm_get_package_version, npm_list_versions, npm_search_packages

Dist-tags

npm_get_dist_tags, npm_add_dist_tag W, npm_remove_dist_tag W

Downloads

npm_get_downloads, npm_get_version_downloads

Security

npm_audit_dependencies (no credentials needed)

Access

npm_get_package_visibility, npm_list_collaborators, npm_set_package_access W⚠, npm_deprecate_package W

Publishing

npm_publish W⚠, npm_unpublish W

Orgs

npm_list_org_members, npm_list_org_teams, npm_list_org_packages, npm_set_org_member_role W, npm_remove_org_member W

Teams

npm_list_team_members, npm_list_team_packages, npm_create_team W, npm_delete_team W⚠, npm_add_team_member W, npm_remove_team_member W⚠, npm_grant_team_package_access W, npm_revoke_team_package_access W

Tokens

npm_list_tokens, npm_create_token W, npm_revoke_token W

Escape hatch

npm_request

Worked example: trusted publishing across a fleet

The problem this server was written for. You have several packages published from one repo, and npm's UI wants you to configure each by hand.

First, check you can:

npm_auth_status

trusted_publishing_available must be true. If it is not, blockers says why — the usual answers are a bypass_2fa token or 2FA not enabled on the account itself.

See what one package has today:

npm_get_trusted_publisher  package="@mgcrea/mcp-ovh"

This is the call that triggers the browser confirmation, because npm requires an OTP even to read. Approve it once.

Now preview the whole batch — nothing is written:

npm_set_trusted_publisher_batch
  packages=["@mgcrea/mcp-npm", "@mgcrea/mcp-ovh", "@mgcrea/mcp-x"]
  provider="github"
  repository="mgcrea/mcp-npm"
  workflow_filename="ci.yml"
  dry_run=true
  confirm=true

Then drop dry_run. Packages already configured correctly come back as unchanged and cost nothing. Verify against npm's own CLI, which calls the same endpoint:

npm trust list @mgcrea/mcp-ovh

With that in place, CI publishes with no token anywhere:

permissions:
  contents: read
  id-token: write   # this is what OIDC trusted publishing needs
# ...
- run: npm publish --provenance --access public

Traps worth knowing

  1. A "Bypass 2FA" granular token is refused by every trust write (403, pointing at gh.io/npm-gat-bypass2fa-deprecation) and by a direct publish — npm's own login banner puts "account changes and direct publishing" behind the same restriction. Reads keep working, so it only surfaces on the write. Worse, a publish refused this way answers 404, not 403, which reads as "no such package". npm_publish says so when it has already read the packument and knows the package exists. Create a token without that option, or use a session token from npm login (or npm_auth_login).

  2. Two-factor must be on the npm account, not just the token. No token setting substitutes.

  3. Several governance reads accept only a session token. npm_list_tokens, npm_list_org_members, npm_list_collaborators and npm_get_package_visibility refuse a granular access token — so a read can fail where the matching write succeeds. This is the failure someone who followed npm's own "use granular tokens" advice will hit.

  4. One trusted publisher per package, and no update endpoint. Changing one is genuinely delete-then-create. npm_set_trusted_publisher owns both steps for a reason: split apart, a failed create after a successful delete leaves the package with no publisher and a broken release pipeline.

  5. workflow_filename is a bare filename. ci.yml, never .github/workflows/ci.yml.

  6. Scoped names are escaped two different ways. /@babel%2fcore for the packument, %40babel%2Fcore for the /-/package/ routes. The wrong one returns 404, which reads like "no such package".

  7. Bulk downloads rejects scoped packages, caps at 128, and cannot do a daily series. The single-package form handles @scope/name fine.

  8. **Deprecating with an empty message undeprecates.**

  9. npm_create_token shows the value once. It is never retrievable again, only revocable.

  10. npm_publish produces no provenance attestation. A CI publish over OIDC does. Prefer it.

  11. npm publishes no rate-limit headers, and documents no per-endpoint numbers — only that 5M requests/month is acceptable. Assume nothing; the batch tool paces itself at 2s.

  12. A successful publish can 404 on the read path for several minutesnpm view, npm_get_package, even registry.npmjs.org directly. Seen on an ordinary Nth publish, not only the first-publish case in npm-first-publish-bootstrap. The write already landed if the CLI printed + <pkg>@<version> or, for a provenance publish, logged a transparency-log URL (search.sigstore.dev/?logIndex=...) — that log entry is independently verifiable and does not depend on npm's own read path at all. A stale read right after publishing is not evidence of failure; poll rather than conclude.

Troubleshooting

A tool I expected is missing. Call npm_auth_status. An absent tool almost always means missing configuration or NPM_ALLOW_WRITES being off — write tools are not registered at all when it is unset, by design.

Everything 401s, but npm whoami works in my terminal. The token this server holds is a stale copy. It reads ~/.npmrc once at startup, so an npm login that visibly succeeded does not reach a server that was already running. Call npm_auth_reload — it re-reads the token and reports whether it changed. A 401 also triggers the same re-read automatically and retries once, so this is mostly self-healing now; the tool is for confirming it, and for the case where you would rather not spend a failed call finding out.

One thing a reload cannot fix: if the server started with no token at all, the credentialled tools were never registered, and only a restart adds them.

Connection closed in the client. Run the binary by hand with the same environment; the error the client swallowed is on stderr.

A publish 404s on a package I have published thirty times. npm answers 404 rather than 403 on a write the token may not perform, so this is about the token, not the path. npm_publish reads the packument first and says which of the two stories applies. The usual causes are a granular token whose selected packages do not include this one, and a token with Bypass 2FA enabled — npm refuses those for direct publishing, not only for trusted-publisher writes. npm_auth_login gets a session token without leaving the session.

Every trust call 403s. Read the remedy field on the error. The three causes are a bypass_2fa token, 2FA not enabled on the account, and not being a maintainer.

The browser prompt keeps reappearing. The cached code is being minted for a different npm account than the token belongs to. npm_auth_clear_otp, then check npm_auth_status names the account you expect.

Develop

pnpm install
pnpm lint && pnpm format:check && pnpm typecheck && pnpm test && pnpm build

Check the built server still speaks the protocol and gates what it should:

printf '%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"cli","version":"0"}}}' \
  '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
  '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| node dist/cli.js 2>/dev/null | jq -r '.result.tools[]?.name'

Publish

pnpm dlx release-it       # bump, commit, tag
git push --follow-tags    # CI publishes to npm and GHCR from the tag

CI publishes over OIDC trusted publishing with provenance, so no npm token exists anywhere.

License

MIT — see LICENSE.

Available Tools

3 tools
npm_audit_dependenciesnpm: Audit DependenciesA
Read-only

Check a set of package versions against npm's security advisories — the same data npm audit uses, queried directly. Takes a flat map of package name to the versions you have installed, and returns only the packages with advisories against them. Needs no npm token, so it works on an otherwise unconfigured server. The references field is stripped from each advisory: it is about 1.5 KB of markdown links apiece, and url already points at the write-up.

ParametersJSON Schema
NameRequiredDescriptionDefault
dependenciesYesInstalled versions per package, e.g. {"lodash": ["4.17.20"], "minimist": ["1.2.0", "0.0.8"]}. Exact versions, not ranges — an advisory match is computed against the version you actually have.

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnlyHint annotation, the description discloses meaningful behavior: it returns only packages with advisories, it strips the `references` field for size, and the `url` field remains as the pointer to the write-up. It also explicitly notes no token is needed, which is valuable operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: it opens with the core function, then explains input format, operational prerequisite, and a notable output transformation. Every sentence contributes useful information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter, read-only tool with no output schema, the description adequately covers what input is expected, what the output will contain (only affected packages), and one important field behavior that would otherwise be a surprise. An agent can confidently invoke this tool without needing more context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% coverage and already explains the format, gives an example, and warns that exact versions (not ranges) are required. The description's phrase 'flat map of package name to the versions you have installed' simply repeats the schema's meaning without adding new semantics, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Check') and resource ('package versions against npm's security advisories'), and ties it to the familiar `npm audit` command. The topic is clearly distinct from the sibling `npm_auth_status`, which is about authentication state, not dependency auditing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear context: this is a direct query of npm's advisory data, and it requires no npm token, so it works on an unconfigured server. It doesn't explicitly mention the sibling as an alternative, but the sibling's purpose is obviously different, so an agent can infer when to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

npm_auth_reloadnpm: Reload AuthA
Read-only

Re-read the npm token from ~/.npmrc, NPM_TOKEN and the config file, and report whether it changed. Use this after npm login in a terminal: this server captures the token when it starts, so a login that visibly worked leaves it sending the OLD credential and failing 401 on everything while npm whoami in your shell succeeds. Cheap and safe — it reads three files, sends nothing to npm, and never reports the token itself. It re-reads ONLY the token: the registry, the write gate and the OTP settings stay as they were at startup, so a reload can never quietly widen what this server may do. One limit worth knowing: if the server started with NO token at all, the credentialled tools were never registered, and a reload cannot add them — that case still needs a restart.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Despite readOnlyHint=true, the description adds substantial behavioral context: it reads three files, sends nothing to npm, never reports the token itself, and only reloads the token while preserving registry, write-gate, and OTP settings. It also discloses the startup-without-token limitation. No contradiction with the annotation exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but every sentence earns its place: the core behavior, the recommended trigger, the safety profile, the narrow scope, and the one important limitation. It is front-loaded with the main purpose before caveats.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter, described-safe tool, this is complete: an agent knows what the tool does, why it exists, what side effects it does and does not have, what the return intent is (whether the token changed), and which edge case requires a restart. No output schema is present, but the description covers the needed return semantics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and the schema is an empty object with 100% coverage, so there is nothing for the description to add about parameter meaning. The baseline of 4 applies because no parameters are present.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action and resource: re-reading the npm token from ~/.npmrc, NPM_TOKEN, and the config file, then reporting whether it changed. It clearly distinguishes this from the sibling status tool by focusing on the reload-and-detect-change behavior rather than merely inspecting auth state.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says to use this after `npm login` in a terminal, explains why it is needed (stale token captured at startup causing 401s), and gives a concrete exclusion: if the server started with no token, reload cannot help and a restart is required. This gives an agent clear when-to-use and when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

npm_auth_statusnpm: Auth StatusA
Read-only

Report what this server can and cannot do: whether a token is configured and where it came from, which npm account it belongs to, whether two-factor authentication is on, whether writes are enabled, and whether a one-time password is currently cached. Call this first when a tool you expected is missing — an absent tool means missing configuration rather than a bug. trusted_publishing_available is true, false, or "unknown" when a probe npm refused left the answer undetermined — read blockers and undetermined for which. It is an ACCOUNT-level answer: npm also refuses the trust endpoints per package, which this cannot see, so a true here is not a promise that any particular package will work.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only provide readOnlyHint=true, so the description carries the burden of explaining behavior beyond safety. It does this thoroughly: defines the 'unknown' state, tells the agent to read `blockers` and `undetermined`, and discloses the account-level scope limitation. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but every sentence earns its place: summary of reported fields, call-first instruction, interpretation of 'unknown,' and a crucial scope caveat. The most important usage directive is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must explain the return semantics, and it does: trusted_publishing_available values, blockers/undetermined fields, and the account-level vs package-level distinction. An agent has enough information to call and interpret this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema is empty with zero parameters, so the baseline is 4. The description appropriately focuses on output semantics rather than inventing parameter details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Report what this server can and cannot do,' then enumerates the exact status items it covers: token provenance, npm account, 2FA, write enablement, and cached one-time password. This clearly distinguishes it from sibling tools like npm_auth_reload and npm_audit_dependencies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use guidance: 'Call this first when a tool you expected is missing — an absent tool means missing configuration rather than a bug.' It also provides a when-not-to-over-trust limitation: the answer is account-level and cannot see per-package trust refusals. It does not name specific alternative tools, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev0.2.2
    • Addednpm_auth_reload
  2. 2 tool updatesv0.1.0
    • First observednpm_audit_dependencies
    • First observednpm_auth_status

TDQS

A4.7/5.0

Scored across 3 tools

Disambiguation5/5

The three tools occupy distinct roles: auth status inspection, auth token reload, and dependency audit. There is no meaningful overlap, and the repeated auth prefix only groups related functions.

Naming Consistency5/5

All tools use a consistent npm_ prefix and snake_case: npm_auth_status, npm_auth_reload, npm_audit_dependencies. The pattern is predictable and signals the domain and action clearly.

Tool Count5/5

Three tools is on the lower end but well-scoped for an npm auth/audit helper server; each tool covers a distinct need and none is redundant. The count is within the typical 3-15 range.

Completeness4/5

For the apparent domain of npm authentication and dependency auditing, the set is largely complete: it can inspect auth state, reload credentials, and query advisories. The main gap is the absence of any npm registry/package operations, though the auth-focused intent makes that a minor rather than critical omission.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Enables npm registry operations from MCP clients like Claude Code and Cursor, with 64 tools for package intelligence, security audits, dependency analysis, org/team management, and write operations like deprecate and unpublish.
    64
    197 npm
    2
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Grants AI agents real-time access to the NPM registry, enabling package metadata retrieval, version checks, and dependency auditing for up-to-date code generation.
    8 npm
    3
    -
  • A
    license
    B
    quality
    D
    maintenance
    Provides AI assistants with tools to check npm package versions and security heuristics, including version lookups, signal-based analysis, and batch analysis of package.json files.
    5
    6 npm
    AGPL 3.0
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI coding agents to search the npm registry and retrieve package metadata, READMEs, download stats, GitHub details, and usage snippets via the Model Context Protocol.
    9
    20 npm
    MIT