@mgcrea/mcp-npm
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| NPM_OTP | No | A one-time password code. Almost always wrong — see note in .env.example. | |
| NPM_DEBUG | No | Set to '1' to log to stderr. | |
| NPM_TOKEN | No | Overrides the ~/.npmrc lookup. Needed in Docker and CI. | |
| NPM_OTP_MODE | No | One of 'web' (default), 'static', or 'none'. See Two-factor section. | web |
| NPM_REGISTRY | No | Defaults to https://registry.npmjs.org. The .npmrc token is looked up for this host. | https://registry.npmjs.org |
| NPM_MCP_CONFIG | No | Path to a JSON config file. If not set, defaults to $XDG_CONFIG_HOME/npm-mcp/config.json or ~/.config/npm-mcp/config.json. | |
| NPM_MAX_RETRIES | No | Retry budget for 429/5xx. Defaults to 3. | 3 |
| NPM_ALLOW_WRITES | No | Set to '1' to register the write tools. Off by default. | |
| NPM_OTP_MAX_USES | No | Calls one code covers. Defaults to 80, npm's own guidance. | 80 |
| NPM_DOWNLOADS_URL | No | Defaults to https://api.npmjs.org. A different host, never authenticated. | https://api.npmjs.org |
| NPM_OTP_TTL_SECONDS | No | How long a confirmed code is reused. Defaults to 300, npm's own window. | 300 |
| NPM_AUTO_OPEN_BROWSER | No | Set to '0' to print the URL instead of launching a browser. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| npm_auth_statusA | 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. |
| npm_auth_reloadA | Re-read the npm token from ~/.npmrc, NPM_TOKEN and the config file, and report whether it changed. Use this after |
| npm_audit_dependenciesA | Check a set of package versions against npm's security advisories — the same data |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 3 tools
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.
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.
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.
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.