npm-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| NPM_PATH | No | Path to the npm binary. Use this if npm is not in your system PATH. | npm |
| NPM_TOKEN | No | npm authentication token. Can be generated from npmjs.com > Account > Access Tokens. If omitted, the server will use credentials from your ~/.npmrc (from running npm login). |
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
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| publishC | Publish a package to the npm registry |
| stageA | Stage a package, inspect pending versions, download a tarball, or approve/reject a stage. Approval publishes the version; rejection removes the staged version. Requires an npm CLI supporting npm stage. |
| versionB | Bump the package version |
| viewC | View package information from the registry |
| searchC | Search npm registry for packages |
| unpublishB | Remove a package version from the registry |
| deprecateC | Deprecate a version of a package |
| ownerC | Manage package owners |
| dist-tagC | Manage distribution tags |
| packB | Create a tarball from a package (preview what would be published) |
| whoamiA | Check which npm user is currently authenticated. If not logged in, set NPM_TOKEN env var in MCP config. |
| initB | Initialize a new package.json |
| auditB | Run a security audit on the package |
| outdatedC | Check for outdated packages in a project |
| lsC | List installed packages in a project |
| pending-scriptsA | List dependencies whose install scripts need review without changing package.json. Requires npm 12 or later. |
| approve-scriptsB | Approve reviewed dependency install scripts, pinned by npm to installed versions. Only changes policy; does not run scripts. Requires npm 12+. Never approve packages without reviewing them. |
| deny-scriptsA | Deny install scripts for named dependencies across all versions. Only changes package.json policy. Requires npm 12+. |
| installC | Install packages in a project |
| uninstallB | Remove packages from a project |
| updateB | Update packages in a project to their latest semver-compatible version |
| accessC | Set or view access level on published packages |
| tokenC | Manage npm access tokens (list or revoke) |
| pingA | Check connectivity to the npm registry |
| bugsA | Get the bug tracker URL for a package |
| repoB | Get the repository URL for a package |
| docsB | Get the documentation URL for a package |
| diffB | Show diff between package versions or between local and registry |
| pkgC | Manage package.json fields programmatically |
| fundC | Show funding information for installed packages |
| dedupeB | Reduce duplication in the dependency tree |
| explainB | Explain why a package is installed (show dependency chain) |
| sbomB | Generate a Software Bill of Materials (SBOM) for a project |
| profileB | View or modify npm user profile settings |
| ciA | Clean install dependencies from lockfile (for CI environments) |
| run-scriptB | Run a script defined in package.json |
| doctorB | Run diagnostics to check npm environment health |
| cacheC | Manage the npm cache |
| configA | View npm configuration (read-only for safety) |
| pruneB | Remove extraneous packages not listed in package.json |
| linkB | Symlink a local package for development |
| queryB | Query installed packages using CSS-like selectors |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| publish_package | Guide through publishing a new npm package version: version bump, build, pack preview, publish, and git tag |
| audit_package | Audit a package: check vulnerabilities, outdated dependencies, and download stats |
| dependency_health | Comprehensive dependency health check: outdated, audit, explain, and cleanup recommendations |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| npm-whoami | Current authenticated npm user |
TDQS
Scored across 42 tools
Most tools map to distinct npm commands, and descriptions clarify adjacent operations such as install/ci/update/prune and view/search/explain/diff. Some overlap remains among config/profile/token/access/owner and query/ls, but it is generally manageable.
Names consistently use lowercase npm CLI-style commands with hyphens for multiword tools (run-script, pending-scripts, deny-scripts), with no camelCase mixing. They are not uniformly verb_noun, but they are predictable and domain-appropriate.
42 tools is a heavy surface for an agent, though it reflects npm's broad CLI domain and each tool corresponds to a real npm command. It is comprehensive but likely to increase selection burden compared with a tighter curated set.
The surface covers core package lifecycle, registry publishing, dependency management, audits, tokens, and diagnostics. Minor gaps exist around login/logout, team/org/hook management, and rebuild-type operations, but most npm workflows are covered.