Skip to main content
Glama
mgcrea

@mgcrea/mcp-npm

by mgcrea

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NPM_OTPNoA one-time password code. Almost always wrong — see note in .env.example.
NPM_DEBUGNoSet to '1' to log to stderr.
NPM_TOKENNoOverrides the ~/.npmrc lookup. Needed in Docker and CI.
NPM_OTP_MODENoOne of 'web' (default), 'static', or 'none'. See Two-factor section.web
NPM_REGISTRYNoDefaults to https://registry.npmjs.org. The .npmrc token is looked up for this host.https://registry.npmjs.org
NPM_MCP_CONFIGNoPath 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_RETRIESNoRetry budget for 429/5xx. Defaults to 3.3
NPM_ALLOW_WRITESNoSet to '1' to register the write tools. Off by default.
NPM_OTP_MAX_USESNoCalls one code covers. Defaults to 80, npm's own guidance.80
NPM_DOWNLOADS_URLNoDefaults to https://api.npmjs.org. A different host, never authenticated.https://api.npmjs.org
NPM_OTP_TTL_SECONDSNoHow long a confirmed code is reused. Defaults to 300, npm's own window.300
NPM_AUTO_OPEN_BROWSERNoSet 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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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. The trusted_publishing_available field and its blockers list answer, without spending a call, whether the trusted-publisher tools can work at all.

npm_audit_dependenciesA

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.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mgcrea/mcp-npm'

If you have feedback or need assistance with the MCP directory API, please join our Discord server