MCP server giving Claude Code native security scanning superpowers
Project description
The Problem
On March 30, 2026, two malicious versions of axios โ one of the most downloaded npm packages on the planet โ were quietly published to npm.
They contained zero suspicious code inside axios itself. Any developer who inspected the source would have found nothing wrong.
Instead, they silently injected a fake dependency called plain-crypto-js that ran a postinstall script the moment you ran npm install. That script phoned home to a command-and-control server and dropped a remote access trojan tailored to your OS.
After delivering the payload, it deleted itself and swapped its own package.json for a clean decoy. No trace. No warning. No audit trail.
npm audit reported nothing. GitHub Dependabot reported nothing. Standard code review caught nothing.
This is the new shape of supply chain attacks โ and your existing tools aren't built to catch them.
What Security Autopilot Does
Security Autopilot is an MCP server that plugs directly into Claude Code and gives it real security scanning superpowers. You talk to Claude naturally โ it runs the scans.
It catches the class of attacks that traditional tools miss:
| What it catches | How it catches it |
|---|---|
| ๐ด Known-malicious packages (axios@1.14.1, plain-crypto-js@4.2.1) | Blocklist checked before any install |
| ๐ Maintainer account hijacks | Detects publisher email changes between versions |
| ๐ Postinstall script injection | Flags any preinstall, install, postinstall, prepare lifecycle scripts |
| ๐ก Recently published versions | 72-hour cooldown gate on new releases |
| ๐ต Floating version pins | Flags ^ and ~ pins that allow silent upgrades |
| ๐ต Missing SLSA provenance | Detects packages published without cryptographic build attestations |
| ๐ Exposed secrets & credentials | Gitleaks scans every file for hardcoded API keys, tokens, passwords |
| ๐ก CVEs in your dependencies | Trivy scans against the full NVD vulnerability database |
| ๐ก Code-level security bugs | Semgrep catches eval(userInput), SQL injection, XSS, and 1000+ other patterns |
How It Works
You type: "is my supply chain safe?"
โ
โผ
Claude Code calls scan_repo()
โ
โโโโโโโโโโโดโโโโโโโโโโโ
โ 4 scanners run โ โ all in parallel, ~10 seconds total
โ simultaneously โ
โโโโโโโโโโโฌโโโโโโโโโโโ
โ
โโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Supply Chain โ Trivy โ Gitleaks โ Semgrep โ
โโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
Claude summarises findings in plain English
with severity, location, and exact fix steps
Missing a scanner? Security Autopilot installs it for you automatically โ no setup required.
Quick Start
1. Install (one command)
curl -fsSL https://get.securityautopilot.dev | sh
This installs uv, the MCP server, all scanner CLIs (trivy, gitleaks, semgrep), and automatically patches ~/.claude/claude.json to register the plugin. Safe to run twice.
Telemetry: On first run you'll be asked whether to share anonymous usage data (OS + Python version). You can opt out at any time by deleting
~/.security-autopilot/telemetry_consent.
2. Restart Claude Code
That's it โ no manual config needed.
3. Just talk to Claude
"scan this project for security issues"
"any secrets exposed in this codebase?"
"is my supply chain safe?"
"check my dependencies for known vulnerabilities"
"watch this project and alert me to new issues"
What a Scan Looks Like
## Security Scan: `/your/project`
Scanners: supply_chain, trivy, gitleaks, semgrep | Duration: 8.3s
Found: 4 issues โ ๐ด 1 critical ๐ 2 high ๐ก 0 medium ๐ต 1 low
### ๐ด [CRITICAL] Known-malicious package: axios@1.14.1
Location: package.json
Scanner: supply_chain
axios@1.14.1 is on the known-bad blocklist.
Reason: supply chain RAT March 2026 โ postinstall dropper
Remediation: Remove axios@1.14.1 immediately. Downgrade to axios@1.14.0.
Rotate all secrets on affected machines โ this version installs a
remote access trojan.
### ๐ [HIGH] Exposed aws-secret-access-key secret in .env
Location: .env:3
Scanner: gitleaks
Rotate this credential immediately โ assume it is compromised.
Add `.env` to .gitignore to prevent future commits.
MCP Tools
Claude gets access to 4 tools automatically:
| Tool | What it does |
|---|---|
scan_repo(path) |
Full scan โ all 4 scanners in parallel |
scan_file(filepath) |
Scan a single file |
get_findings(severity) |
Retrieve cached findings from previous scans |
watch_project(path) |
Start a background daemon that re-scans on file changes |
The background watcher also sends a desktop notification the moment a new critical or high finding is detected โ even if Claude Code isn't open.
Scanners
| Scanner | What it catches | Auto-installed? |
|---|---|---|
| Supply Chain | Known-bad versions, account hijacks, lifecycle scripts, floating pins, SLSA gaps | โ Built-in |
| Trivy | CVEs in npm, pip, Go, Rust, Java dependencies | โ Auto-installed |
| Gitleaks | Hardcoded secrets, API keys, tokens, passwords | โ Auto-installed |
| Semgrep | 1000+ SAST rules: injection, XSS, insecure patterns | โ Auto-installed |
For Contributors
# Run tests
uv run pytest tests/ -v
# Start the MCP server manually
python -m mcp_server.server
# Add a new scanner
# โ see CLAUDE.md for the exact pattern to follow
Adding a scanner takes ~50 lines
Every scanner follows the same pattern:
# mcp_server/tools/my_scanner.py
from .installer import ensure_installed
async def scan(project_path: str) -> list[dict]:
if not await ensure_installed("my-tool"):
return [_not_installed_finding()]
# ... run subprocess, parse output, return findings
See schemas/finding.json for the unified finding schema all scanners must conform to.
Known-Bad Versions
The supply chain scanner ships with a blocklist that is updated as attacks are discovered:
# mcp_server/tools/supply_chain.py โ KNOWN_BAD
[
{"name": "axios", "version": "1.14.1", "reason": "supply chain RAT March 2026"},
{"name": "axios", "version": "0.30.4", "reason": "supply chain RAT March 2026"},
{"name": "plain-crypto-js", "version": "4.2.1", "reason": "axios attack dropper"},
]
PRs to extend this list are welcome.
License
MIT โ free to use, modify, and distribute.
Built in response to the March 2026 axios supply chain attack.
Because npm audit wasn't enough.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file security_autopilot-0.1.0.tar.gz.
File metadata
- Download URL: security_autopilot-0.1.0.tar.gz
- Upload date:
- Size: 73.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e5ffd861e428a5931ed93953ef2ac4626d4bd5d2b2c2e7e8b6611a0821cdd1d
|
|
| MD5 |
b0c9572d40377352a3c5029ba5f69968
|
|
| BLAKE2b-256 |
cc26611dbc81ba11ea7109f3bb1372874826daa5591d5096ee5d61addbff103e
|
File details
Details for the file security_autopilot-0.1.0-py3-none-any.whl.
File metadata
- Download URL: security_autopilot-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1249139d5736b2cc3de6c1b6cea568959db5a27f4b135873ce96714e7f9c6856
|
|
| MD5 |
6de9daebedf6032eb4230dc10351b9a9
|
|
| BLAKE2b-256 |
65decb9c928f7802510ac52cea2fdabcf2e8a21d8cbc0e9c2eeb600cdd99f188
|