pkgtruth for VS Code
io.github.hxckya/pkgtruth
Catches hallucinated and slopsquatted npm and PyPI packages before an agent installs them.
client:VS Code
transport:stdio
runtime:npm
Install pkgtruth in VS Code
.vscode/mcp.json
{
"inputs": [
{
"type": "promptString",
"id": "pkgtruth-registry",
"description": "PKGTRUTH_REGISTRY",
"password": true
},
{
"type": "promptString",
"id": "pkgtruth-downloads-api",
"description": "PKGTRUTH_DOWNLOADS_API",
"password": true
},
{
"type": "promptString",
"id": "pkgtruth-cache-dir",
"description": "PKGTRUTH_CACHE_DIR",
"password": true
},
{
"type": "promptString",
"id": "pkgtruth-timeout-ms",
"description": "PKGTRUTH_TIMEOUT_MS",
"password": true
}
],
"servers": {
"pkgtruth": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"pkgtruth"
],
"env": {
"PKGTRUTH_REGISTRY": "${input:pkgtruth-registry}",
"PKGTRUTH_DOWNLOADS_API": "${input:pkgtruth-downloads-api}",
"PKGTRUTH_CACHE_DIR": "${input:pkgtruth-cache-dir}",
"PKGTRUTH_TIMEOUT_MS": "${input:pkgtruth-timeout-ms}"
}
}
}
}
VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs