npm pack checker (what npm publish ships)

io.github.Lawatch由 GitHub 帳號 Lawatch 發布v1.0.0更新於 Nov 16, 2026

Exact files npm publish ships, which rule decides each, and leaks (.env, keys) to fix first.

發布方自己的服務:check.tattoo: tattoo size and placement guide

已驗證STDIO僅桌面

概覽

npm pack checker (what npm publish ships) 的本機 MCP 服務;無需登入;STDIO。

暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 npm pack checker (what npm publish ships),將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

npm-pack-check — MCP server

Which files will npm publish really ship, and which rule decides each one? The exact answer npm 10 gives, before you publish, without touching the registry.

npm's packing rules are full of traps that AI assistants (and humans) get wrong:

  • Adding a .npmignore makes npm ignore the .gitignore of that folder completely: your git-ignored .env, keys and coverage reports get published.
  • A "files" field disables the root .npmignore and .gitignore, but not the ones in sub-folders.
  • README, LICENSE, package.json, "main" and "bin" are always shipped; node_modules, .npmrc and lockfiles never.
  • A "files" entry pointing to a file that is not built yet silently matches nothing, and users get Cannot find module.

Tools

ToolWhat it does
check_npm_packThe exact file list of the tarball (same files and order as npm pack --dry-run), what is left out (count by folder, or the full list), and warnings: secrets that would be published, .npmignore overriding .gitignore, useless root ignore files, "files" entries that match nothing, main / bin / browser / types that will not ship, tests and coverage shipped by mistake.
why_npm_packFor each path: shipped or not, and the exact rule: .npmignore / .gitignore file and line, "files" entry, or npm's built-in rule. Says when a whole folder is skipped.

Example

json
{ "name": "check_npm_pack", "arguments": {  "package_json": { "name": "demo", "version": "1.0.0", "main": "dist/index.js" },  "paths": ["src/index.ts", "dist/index.js", ".env", "README.md", "coverage/lcov.info"],  "ignore_files": { ".gitignore": "node_modules\n.env\ncoverage\ndist\n", ".npmignore": "src\n" } } }

Result: npm ships .env, coverage/lcov.info, dist/index.js, package.json, README.md. Warnings: .env would be published, and it is only because the .npmignore replaces the .gitignore.

Pass the file list from git ls-files --cached --others (plus untracked build output such as dist/) and the content of every .npmignore / .gitignore.

How exact is it?

engine.js is a line-by-line port of npm-packlist 9.0.0 and ignore-walk 7.0.0 (the code npm 10 runs), working on a list of paths instead of the disk, with the same package.json normalisation (bin) and the same workspaces quirk. Globs use the exact engine npm uses: minimatch.js is an unmodified bundle of minimatch 9.0.9 + brace-expansion 2.0.2 (ISC/MIT). test.js builds random projects on disk and compares with npm's own code: about 23,000 projects (240,000 files), 0 differences, plus the real npm pack --dry-run on a few hundred, 0 differences. Re-run on every release. Not modelled: files added from bundleDependencies (a warning says so), symlinks (npm never ships them).

Install

  • Claude Desktop: open npm-pack-check-1.0.0.mcpb from the GitHub release.
  • Any MCP client (Docker): {"command": "docker", "args": ["run", "-i", "--rm", "ghcr.io/lawatch/npm-pack-check:1.0.0"]}
  • From source (Node 18+, no dependency): {"command": "node", "args": ["/path/to/server.js"]}

Offline, read-only, no file access, nothing is published.

Built by AI agents (project 10aday). MIT license.

來源:products/mcp/npm-pack-check/README.md,提交 c4f7761

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:該軟體包類型無法在沙箱中執行。

版本歷史

1
  1. v1.0.0最新Nov 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。

其他 Check 整合