@pkgradar/mcp
v0.1.2
Published
PkgRadar MCP server — check npm, PyPI and other packages for malware from inside your AI coding assistant (Claude Code, Cursor, Copilot, Windsurf) before you install them.
Maintainers
Readme
@pkgradar/mcp
Check packages for malware from inside your AI coding assistant — before you install them.
@pkgradar/mcp is a Model Context Protocol server that
gives Claude Code, Cursor, GitHub Copilot, Windsurf, and any other MCP-aware assistant a
direct line into PkgRadar's supply-chain malware intelligence.
When your assistant is about to add a dependency, install a package, or apply a diff that
touches package.json / requirements.txt, it can call PkgRadar first and get a one-line
verdict:
⚠️ MALICIOUS — do not install
Package: npm/@diagrammo/[email protected]
Risk: high Score: 24
Known-malicious — attributed to campaign: Clob dropper
Top signals: install_lifecycle_remote_or_exec (high); large_javascript_payload (low)It wraps PkgRadar's public, free, no-auth API. Open source, MIT licensed.
Install
Claude Code
claude mcp add pkgradar -- npx -y @pkgradar/mcpCursor / Windsurf / generic mcp.json
{
"mcpServers": {
"pkgradar": {
"command": "npx",
"args": ["-y", "@pkgradar/mcp"]
}
}
}Environment
| Variable | Default | Purpose |
| -------------------- | --------------------- | ----------------------------------------- |
| PKGRADAR_API_BASE | https://pkgradar.com| Override the API base (self-host / proxy). |
No API key is required — it uses the public API.
Tools
| Tool | What it does |
| --------------------- | ------------ |
| check_package | Check one package ({ecosystem, name, version?}). Returns a verdict — MALICIOUS / Review / clean / not-yet-scanned — plus risk, score, campaign attribution, lead time vs public disclosure, and top detection signals. The core tool. |
| check_dependencies| Paste a whole package.json or requirements.txt ({manifest}). Checks every dependency (capped at 50) and returns only the flagged ones, with a checked N, flagged M summary. The pre-install gate. |
| list_campaigns | List the named malware campaigns PkgRadar tracks, with attributed-package counts. |
| get_campaign | Detail for one campaign ({id}): description, attribution basis, sample members. |
| coverage_stats | PkgRadar's transparency numbers — detections, how often it flagged first, and median lead time. |
Ecosystems
npm, pypi, cargo, rubygems, maven, nuget, composer, go, pub. For scoped
npm packages, pass the full name (e.g. @scope/pkg).
How it works
Each tool call hits the PkgRadar public API with a 15s timeout and a pkgradar-mcp/<version>
user-agent. Transport/HTTP errors are returned as error-shaped tool results — the server
never crashes the host assistant. A "not yet scanned" verdict means PkgRadar has no scan on
record yet; it is not a clean bill of health.
Develop
There is no runtime beyond Node ≥ 18.
npm install
npm run build # tsc → dist/
npm test # node --test on the compiled parser testsSmoke-test the server over stdio (initialize + list tools):
printf '%s\n%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"t","version":"1"}}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| node dist/index.jsPublish (maintainers)
npm run build
npm publish --access publicLicense
MIT — see LICENSE.
