Atlas / MCP servers / hxckya / pkgtruth

pkgtruthBLOCK

mcp/hxckya/pkgtruth

Ground truth about npm packages for AI coding agents. Catches hallucinated and slopsquatted dependencies before they reach your lockfile.

Verdict
BLOCK
Grade
D
Trust score
69 /100
Exposed tools
3 2r · 1w · 0d
Transport
stdio
License
MIT
Stars
4
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

[](https://www.npmjs.com/package/pkgtruth) [](https://github.com/hxckya/pkgtruth/actions/workflows/ci.yml) [](https://nodejs.org) [](LICENSE)

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:

Read from source at commit a44c65d0b994OBSERVED · 2026-10-11
Advertisement
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.

claude-code (npm)
claude mcp add pkgtruth -- npx -y [email protected]
03

Exposed tools (3)

2 read · 1 write · 0 destructive.

ToolRiskDescription
check_dependenciesread
check_install_commandwrite
check_packageread
04

Trust audit

BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
declared (2 observation(s))
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (9)

HIGHPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
src/installcmd.js:58
sudo: /^-(u|g|C|D|p|r|t|T|U|h)$/,
Why it matters. asks for elevated privileges
HIGHPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
src/server.js:143
'including behind `sudo`, `&&` chains and `sh -c`. Extracts the package names (npm and PyPI at once), ' +
Why it matters. asks for elevated privileges
LOWInventory / provenance · inv.hidden_file · CWE-1104
.mcp.json.example
.mcp.json.example
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
test/detect.test.js:47
process.env.PKGTRUTH_DOWNLOADS_API = 'https://127.0.0.1:9';
LOWPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
test/installcmd.test.js:52
assert.deepEqual(npm('FOO=1 sudo -E npm i -g pkgtruth'), ['pkgtruth']);
Why it matters. asks for elevated privileges
LOWPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
test/installcmd.test.js:53
assert.deepEqual(npm('sudo -u deploy npm i left-pad'), ['left-pad']);
Why it matters. asks for elevated privileges
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@modelcontextprotocol/sdk, zod
Why it matters. 2 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
test/fixtures/slopsquat/package.json
lodash, crossenv, imageprocessor-lite
Why it matters. 3 dependency range(s) float
Fix. pin exact versions or ship a lockfile
INFOPrompt injection · scope.undeclared_system · CWE-94, CWE-1427
<declared scope>
system use found in code, not declared in the description
Why it matters. the description does not admit a capability the code has
Fix. declare system use in the description, or remove it

Gates applied: no_behavioural_pass.

Audited 2026-10-11 · audit v0.4.1 · source sha a44c65d0b994full audit observations/trust-audit/mcp-server/hxckya__pkgtruth.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-11a44c65d0b994BLOCKD69first audit
06

Questions

What is the pkgtruth MCP server?

Ground truth about npm packages for AI coding agents. Catches hallucinated and slopsquatted dependencies before they reach your lockfile.

What tools does pkgtruth expose?

3 in total: 2 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is pkgtruth safe to connect to an agent?

No — not without reading the findings first. The audit graded it D (69/100) and found 2 critical or high issues in the source. Each one is listed on this page with the file and line it is on.

What credentials does pkgtruth need?

No credential environment variables were found in its source, so it appears to need none.

How does pkgtruth run?

It speaks stdio, so it runs as a local process your client starts. It is published on npm as fixture-slopsquat at 0.2.2.

How current is this page?

The grade is for one exact copy of the source (a44c65d0b994), read on 2026-10-11. The repository is watched and re-audited when it changes.

Advertisement