pkgtruth
v0.2.2Catches hallucinated and slopsquatted npm and PyPI packages before an agent installs them.
Values you need
| Variable | What it is | |
|---|---|---|
PKGTRUTH_REGISTRY | optional | Alternate npm registry to verify against. Defaults to https://registry.npmjs.org. |
PKGTRUTH_DOWNLOADS_API | optional | Alternate downloads API used for adoption figures. Defaults to https://api.npmjs.org. |
PKGTRUTH_CACHE_DIR | optional | Where adoption figures are cached between runs. Defaults to ~/.cache/pkgtruth. |
PKGTRUTH_TIMEOUT_MS | optional | Per-request timeout in milliseconds. Defaults to 8000. |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add pkgtruth -- npx -y pkgtruth@0.2.2Add to
claude_desktop_config.json{
"mcpServers": {
"pkgtruth": {
"args": [
"-y",
"pkgtruth@0.2.2"
],
"command": "npx"
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"pkgtruth": {
"args": [
"-y",
"pkgtruth@0.2.2"
],
"command": "npx"
}
}
}Add to
.vscode/mcp.json{
"servers": {
"pkgtruth": {
"args": [
"-y",
"pkgtruth@0.2.2"
],
"command": "npx",
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.pkgtruth]
command = "npx"
args = ["-y", "pkgtruth@0.2.2"]For AI agents
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: check_package, check_dependencies, check_install_command.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json