
Npm
io.github.mikusnuz由 GitHub 账号 mikusnuz 发布v1.4.0更新于 Oct 24, 2026
MCP server for npm package management — publish, version, search, audit, and more
概览
本地 MCP 服务器,让助手在编辑器内发布、改版本、搜索、审计和管理 npm 包与依赖。
- 可以做什么
- 发布、暂存、改版本、弃用、取消发布和打包,并可预览将要发布的内容
- 查询注册表信息:查看、搜索、缺陷跟踪、仓库、文档和版本差异
- 安装、卸载、更新、去重、清理、列出和解释依赖,查询依赖树并审查安装脚本
- 运行安全审计、生成 SBOM、检查环境健康与注册表连通性
- 管理认证与元数据:当前用户、令牌、访问级别、所有者、分发标签、个人资料和配置
- 项目初始化:创建 package.json、编辑字段、干净安装、运行脚本、本地链接和缓存管理
- 适用场景
- 适合在支持 MCP 的编辑器中开发库或应用时,让助手直接发布版本、升级版本号、检查过期依赖或执行安全审计,无需切换到终端。
- 运行要求
- 作为本地进程在桌面运行;需要 Node.js 20 或更高版本以及 npm(可用 NPM_PATH 指定路径)。认证使用 NPM_TOKEN 中的 npm 细粒度访问令牌,或使用本地 npmrc 中已有的 npm login 凭据。暂存发布需要更新的 npm 与 Node.js 版本。
安装
README
npm-mcp
MCP server that lets AI assistants manage npm packages. Publish, version, search, audit, install, and more -- all through Claude Code or any MCP client.
The MCP server requires Node.js 20 or newer. Individual npm CLI features may require a newer Node.js/npm combination as noted below.
When to Use
For AI agents: See
llms.txtfor a machine-readable summary. Copytemplates/CLAUDE.mdortemplates/AGENTS.mdinto your project to teach your agent about this MCP.
Why
You're in Claude Code building a library. You finish the code, and now you need to publish it. Instead of switching to a terminal:
That's it. No context switching.
Setup
1. Install
2. Get npm token
Go to npmjs.com > Account > Access Tokens and create a
granular access token with access to the packages you need. Classic and
Automation tokens are no longer supported. A stage-only token uses the stage
workflow below. Existing npm login credentials also work.
3. Add to Claude Code
Edit ~/.claude/settings.json:
Or if you've already run npm login locally, skip NPM_TOKEN -- it uses your ~/.npmrc automatically.
Tools
Publishing & Versioning
Package Info
Dependency Management
Security & Diagnostics
npm 12 blocks unapproved dependency install scripts. Call pending-scripts with
an absolute project path, review the packages, then pass explicit package names
to approve-scripts or deny-scripts. These commands update policy without
running scripts; rerun the intended install/build separately. There is no bulk
approval option. npm pins approvals when a trusted resolved version is available;
check its warnings if an older lockfile forces a name-only approval. For global
installs only, install.allowScripts accepts an explicit list of reviewed names.
Older npm versions do not support these options; select npm 12+ using NPM_PATH.
See npm script approval.
Configuration & Auth
Project Setup
Examples
Publish a scoped package:
Bump version and publish:
Check what's inside before publishing:
Search for existing packages:
View package details:
Install packages:
Check outdated dependencies:
Compare versions:
Generate SBOM:
Query dependencies:
Auth
Staged publishing
Staged publishing requires npm CLI 11.15.0 or later and Node.js 22.14.0
or later. Check npm stage --help; NPM_PATH can select a separate npm
installation. See the staged publishing prerequisites.
Staging does not publish the package; approval does. Approval and rejection
require maintainer 2FA. dryRun applies only to stage with action: "publish".
A direct publish with a stage-only token returns E_STAGE_REQUIRED. npm plans
to remove direct publishing with granular tokens in January 2027.
See npm staging and
token requirements.
pkg accepts JSON values directly: value: "my-package", value: true,
value: ["keyword"], or value: { test: "node --test" }. Strings stay strings;
do not stringify arrays or objects before passing them.
Pass otp when npm requires 2FA, including staged approval/rejection and package
maintainer or token changes. Since August 2026, bypass-2FA tokens cannot bypass
the second factor for account or governance operations. Tokens expire; renew
the configured token when needed or refresh local credentials with npm login.
Environment Variables
License
MIT
来源:README.md,提交 d061935
工具
0版本历史
3- v1.4.0最新Oct 19, 2026
- v1.3.0Oct 8, 2026
- v1.2.1Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分