プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。レビューとアカウント機能は今後のステップで始まります。
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

Pkgtruth

作者:hxckyaバージョン 0.2.2i★ –iパソコンで動く
レジストリ名io.github.hxckya/pkgtruth

インストール

概要

作者による説明(英語の原文)

Catches hallucinated and slopsquatted npm and PyPI packages before an agent installs them.

PopNx MCPの3つの柱

この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。

できること

このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。

  • 接続方法: パソコンで動く
  • トランスポート: stdio
  • カテゴリ: その他

インストール

使っているAIアプリを選んで、設定をコピーしてください。

インストールの前に

  • 基本チェック:1項目中1項目に合格
  • あなたのパソコンで、あなたのユーザーと同じ権限(ファイル、ネットワーク、アプリ)で動きます。
  • 自分で入力するもの: PKGTRUTH_REGISTRY, PKGTRUTH_DOWNLOADS_API, PKGTRUTH_CACHE_DIR, PKGTRUTH_TIMEOUT_MS

必要なもの

  • npmNode.jsのインストール(npxコマンドに必要)

どのアプリを使っていますか?

上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。

Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます

{
  "mcpServers": {
    "pkgtruth": {
      "command": "npx",
      "args": [
        "-y",
        "pkgtruth"
      ],
      "env": {
        "PKGTRUTH_REGISTRY": "your-value",
        "PKGTRUTH_DOWNLOADS_API": "your-value",
        "PKGTRUTH_CACHE_DIR": "your-value",
        "PKGTRUTH_TIMEOUT_MS": "your-value"
      }
    }
  }
}

ターミナルでこれを実行します

claude mcp add pkgtruth --env PKGTRUTH_REGISTRY=your-value --env PKGTRUTH_DOWNLOADS_API=your-value --env PKGTRUTH_CACHE_DIR=your-value --env PKGTRUTH_TIMEOUT_MS=your-value -- npx -y pkgtruth

動かす前に、空欄の値を入力してください。

Cursorで開く

または、設定を自分でコピーする

プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます

{
  "mcpServers": {
    "pkgtruth": {
      "command": "npx",
      "args": [
        "-y",
        "pkgtruth"
      ],
      "env": {
        "PKGTRUTH_REGISTRY": "your-value",
        "PKGTRUTH_DOWNLOADS_API": "your-value",
        "PKGTRUTH_CACHE_DIR": "your-value",
        "PKGTRUTH_TIMEOUT_MS": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

VS Codeで開く

または、設定を自分でコピーする

プロジェクトの .vscode/mcp.json に貼り付けます

{
  "servers": {
    "pkgtruth": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "pkgtruth"
      ],
      "env": {
        "PKGTRUTH_REGISTRY": "your-value",
        "PKGTRUTH_DOWNLOADS_API": "your-value",
        "PKGTRUTH_CACHE_DIR": "your-value",
        "PKGTRUTH_TIMEOUT_MS": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。

選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。

自分で入力する値

  • PKGTRUTH_REGISTRY env
    Alternate npm registry to verify against. Defaults to https://registry.npmjs.org.
  • PKGTRUTH_DOWNLOADS_API env
    Alternate downloads API used for adoption figures. Defaults to https://api.npmjs.org.
  • PKGTRUTH_CACHE_DIR env
    Where adoption figures are cached between runs. Defaults to ~/.cache/pkgtruth.
  • PKGTRUTH_TIMEOUT_MS env
    Per-request timeout in milliseconds. Defaults to 8000.

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月6日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント hxckya で確認済みです

  • … 未チェック

    今もメンテナンスされている

    このリポジトリはまだGitHubから読み取っていません

  • … 未チェック

    ライセンスがある

    このリポジトリはまだGitHubから読み取っていません

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

その他のほかのサーバーとの比較i

  • このカテゴリのほかの32461件のうち0%よりスターが多い
  • このカテゴリのほかの32461件のうち40%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの32461件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

Pkgtruthは安全ですか?

当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は–、最新バージョン(0.2.2)がレジストリに届いたのは2 か月前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。

代わりに使えるものは?

同じカテゴリには:Spec Driven Development, Remote Desktop Commander, dotnet-mcp

代わりの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

Remote Desktop Commander

作者:desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

クラウドで動く★ 211昨日更新
インストール

dotnet-mcp

作者:Skymly

MCP server for .NET symbols, XAML, source generators, and restricted workspace edit

パソコンで動く今日更新
インストール

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

pkgtruth

Ground truth about npm and PyPI packages, for AI coding agents and CI.

Your agent just wrote npm install unused-imports. That package is not the linter plugin it meant. It is a name an attacker registered because models kept inventing it — and npm has since replaced it with a security placeholder.

pkgtruth catches that before it reaches your lockfile — as an MCP server the agent asks, a CLI for CI, a GitHub Action on pull requests, or a Claude Code hook that denies the install command itself.

Why this exists

Large language models invent package names. Measured across models, 19.7% of generated package names were hallucinated, and when researchers re-ran the prompts, 43% of those names came back every single time.

That reproducibility is the whole attack. An attacker does not need to compromise a maintainer, poison a build server, or find a vulnerability. They watch what models invent, register the name, and wait. The technique is called slopsquatting, and it is already happening in the wild.

The standing security advice is that agents with package-management capabilities should not install anything without a review gate. pkgtruth is that gate, in a form an agent can call on its own.

Found in the wild

Two names a model plausibly produces, both live on npm today:

NameWhat it isWeekly installsThe real one
types-node0.0.1-security — npm's placeholder after purging malware10@types/node (429M)
socket-ioDeprecated since 2022, "use the socket.io package instead"1,486socket.io (18M)

types-node is what you get when a model drops the scope from @types/node. npm removed it for malicious code in December 2024 and it is still installed ten times a week.

socket-io is not malicious — it is an abandoned package with a confusable name. That it takes 1,486 installs a week anyway is the point: a dot and a hyphen are enough.

PyPI has the same shape without the placeholder:

NameWhat it isWeekly installsThe real one
sklearnDeprecated shim — its own notice says "use scikit-learn instead"321,887scikit-learn (42.6M)
pytorchA decoy whose only content is "the package named for PyTorch is torch"41,026torch (14.4M)

Neither is spelled anything like the package it stands in for, which is why pkgtruth also reads what a deprecation notice *says*: when it names a far more popular package, that name is the evidence.

npx pkgtruth check types-node socket-io

npx pkgtruth check -e pypi sklearn pytorch

Those two came from a hand check of twenty names. The systematic version — 242 well-known packages, every plausible garbling of each, regenerated every Monday — lives in [SLOPSQUATS.md](SLOPSQUATS.md). Section A there is npm security placeholders alone: names npm purged for malware that are still being installed this week. Weeks in which names enter or leave the list are published as releases, so the releases feed is a way to follow the live list without watching the repository.

Install

As an MCP server (for coding agents)
{

"mcpServers": { "pkgtruth": { "command": "npx", "args": ["-y", "pkgtruth"] } } }

Three tools become available:

ToolUse it when
check_packageAbout to add, import, or recommend one dependency (`ecosystem: "npm" \"pypi"`, default npm)
check_dependenciesAbout to write a package.json / requirements.txt
check_install_commandAbout to run npm install …, npx …, pip install … — hand it the exact command
As a Claude Code hook (the install command itself is stopped)

An MCP tool only helps when the agent remembers to call it. A PreToolUse hook runs on every shell command instead, and denies npm install, npx, pnpm add, yarn add, bun add, pip install, uv add, poetry add and friends when a package they name is hallucinated or dangerous. Add this to ~/.claude/settings.json (every project) or .claude/settings.json (one repository, committable):

{

"hooks": { "PreToolUse": [ { "matcher": "Bash", "hooks": [{ "type": "command", "command": "npx -y pkgtruth hook" }] } ] } }

Commands that install nothing by name — a bare npm install, git, tests, npx of a tool already in node_modules — pass through with no network call. A blocked command comes back to the agent as a denial with the evidence, so it can pick the real package instead:

pkgtruth blocked this command: 1 of 2 package(s) must not be installed as-is.

✖ crossenv DANGER — npm replaced this package with a security placeholder (0.0.2-security). The name was used to publish malicious code. Package is 1 edit(s) from "cross-env", which has 22,155,059 weekly downloads (15,418x this one). Confirm you meant this package and not that one.

Add --fail-on caution to also stop packages that could not be verified. npm install -g pkgtruth with "command": "pkgtruth hook" skips the npx resolution on every call (measured: ~0.2 s per command via npx, ~0.03 s direct). The hook reads tool_input.command from Claude Code's JSON, or a bare command string from any other agent that pipes one in, and exits 2 with a permissionDecision: "deny" when it blocks — there is no environment variable that turns it off, because the agent controls the environment of the command it runs.

As a Claude Code plugin (server + hook in one install)
/plugin marketplace add hxckya/pkgtruth

/plugin install pkgtruth@pkgtruth

The plugin (plugin/) registers the MCP server and the hook above together, pinned to the npm release it ships with.

As a CLI (for humans and CI)
npx pkgtruth check express unused-imports          # npm (default)

npx pkgtruth check -e pypi requests sklearn # PyPI npx pkgtruth scan . # every manifest in the directory

scan reads package.json, requirements*.txt and pyproject.toml (PEP 621 and Poetry), checks each against its own registry, and exits non-zero when something is blocking, so it drops straight into CI.

As a pull-request gate (GitHub Action)

hxckya/pkgtruth-action (on the GitHub Marketplace) runs the scan on every pull request, posts one sticky comment with the evidence, and fails the check on HALLUCINATED or DANGER:

on:

pull_request: paths: ['package.json', '**/package.json'] permissions: contents: read pull-requests: write jobs: pkgtruth: runs-on: ubuntu-latest steps:

  • uses: actions/checkout@v5
  • uses: hxckya/pkgtruth-action@v1

This repository gates itself with it — see .github/workflows/gate.yml, which also proves the gate can fail by running it against a deliberately bad fixture.

What it checks

SignalMeaning
Not in registryThe name is fabricated. Nothing to install.
npm security placeholdernpm removed malicious code published under this name.
Impersonates a popular packageA near-identical name with a fraction of the adoption — or a deprecation notice that itself names the package you meant (sklearn → scikit-learn, pytorch → torch).
Yanked (PyPI)Every file of the latest release was yanked by its maintainer.
Install-time scriptspreinstall/install/postinstall run code on npm install.
DeprecatedUpstream says stop using it.
Very new / almost no adoptionDays old with single-digit installs.
No repositoryNo source to audit.
UnmaintainedNo release in years.

Verdicts are SAFE, CAUTION, DANGER, HALLUCINATED, or UNKNOWN. Every one arrives with the evidence behind it — an agent should never have to take "DANGER" on faith, and neither should you.

Design notes

Network failures never open the gate. If the registry is unreachable, the verdict is UNKNOWN, never SAFE. A degraded network must not silently turn a security check into a no-op.

Popular packages are not flagged — measured, not asserted. The false-positive audit runs the detector over the direct dependency closure of 240 well-known packages: 1,523 real packages, 0 blocking verdicts, 0 UNKNOWN after the built-in second pass, and 40 CAUTION (deprecated or unmaintained — true statements, not blocked by default). A gate that cries wolf gets switched off; this one has a number attached.

No build step. Two direct dependencies — the MCP SDK and zod, both only needed for the server. npx pkgtruth starts immediately.

Limitations

Read these before trusting it:

  • npm and PyPI only. crates.io, Go modules, RubyGems are not covered yet.
  • PyPI has no purge marker. npm leaves a -security placeholder where it removed malware; PyPI deletes the project, so a purged PyPI name simply reads as HALLUCINATED. PyPI also has no search API — near-twins are found against a daily snapshot of the top 15,000 projects by downloads, so an impostor of an obscure package will not be caught.
  • Registry metadata only. It does not analyze package source code, so a legitimate-looking package with a malicious payload can still pass.
  • Not a replacement for `npm audit` or Snyk. Those find known CVEs in code you already trust. pkgtruth asks the earlier question: should this package be here at all?
  • New legitimate packages will get `CAUTION`. That is deliberate. Newness genuinely is a risk signal; use --fail-on danger so it does not block.

Options

--json              Machine-readable output

--fail-on danger (default) | caution

--fail-on caution also blocks packages that could not be verified at all, since "we could not check" is not a pass.

Exit codes: 0 clean, 1 blocking packages found, 2 usage or runtime error.

Configuration

VariableDefaultPurpose
PKGTRUTH_TIMEOUT_MS8000Per-request timeout
PKGTRUTH_RETRIES3Retries for 429/5xx/network errors
PKGTRUTH_MAX_CONCURRENCYper-hostOverride request pacing
PKGTRUTH_REGISTRYnpmAlternate registry
PKGTRUTH_DOWNLOADS_APInpmAlternate downloads API
PKGTRUTH_PYPI / PKGTRUTH_PYPISTATSpypi.org / pypistats.orgAlternate PyPI endpoints
PKGTRUTH_PYPI_TOPhugovk top-pypi-packagesAlternate popularity snapshot for PyPI twins
PKGTRUTH_CACHE_DIR~/.cache/pkgtruthWhere adoption figures are cached
PKGTRUTH_DISK_TTL_MS6 hoursHow long a cached figure stays usable
PKGTRUTH_NO_DISK_CACHEunsetSet to 1 to disable the cache
On speed and rate limits

Adoption figures come from npm's downloads API, which throttles bursts and cannot batch scoped names — a project with several @scope/pkg dependencies would spend its whole budget on every scan.

Three things keep that in check: the bulk endpoint resolves all unscoped names in one request, requests to that host are paced serially, and figures are cached on disk for six hours. Weekly download counts move slowly, so a six-hour-old number is no less true.

A warm scan of ~18 dependencies takes about 1.4 second

冒頭だけを表示しています。続きはリポジトリで読めます

PopNxに聞く