graygnatconsole / mcp-audit-tool
git clone https://github.com/graygnatconsole/mcp-audit-tool.git
π‘οΈ Security audit CLI for Model Context Protocol (MCP) servers β scan AI agent configs for tool poisoning, rug pulls, hardcoded secrets, command injection & supply-chain risks. Pure Python, SARIF + CI ready.
β
stars, 24h
β
stars, 7 days
+518
stars, 30 days Β· #537
518
β
total
5
forks Β· 1 open issues
Star history starts 2026-10-20; the chart appears after the second daily snapshot.
LanguagePython
LicenseMIT
Created2026-09-26 (24d ago)
Last push24d ago
Watchers1
OwnerUser
GitHub topics
agent-securityagentic-aiai-securitycursorllm-guardrailsllm-securitymcpmcp-auditmcp-scannermcp-securitymcp-servermcp-server-pythonmodel-context-protocolprompt-injectionsecurity-scannersupply-chainsupply-chain-securitytool-poisoningvulnerability-scanner
Links
README excerpt
# π‘οΈ mcp-audit-tool ### The security audit CLI for Model Context Protocol (MCP) servers **Scan your AI agent configs for tool poisoning, rug pulls, hardcoded secrets, command injection, and supply-chain risks β before the model runs something you regret.** Install Β· Quickstart Β· Rules Β· CI Integration Β· Roadmap --- ## π Why audit your MCP setup? The Model Context Protocol (MCP) is the open standard that lets AI assistants β Claude Desktop, Cursor, VS Code Copilot, Windsurf, Cline, Zed β call external tools, read your files, and execute commands. Adoption exploded to **thousands of public MCP servers**, and security research keeps confirming the same story: **the MCP attack surface is real and largely unguarded.** A single line in your `claude_desktop_config.json` or `.cursor/mcp.json` can hand an AI model: - π **Your credentials** β API keys and tokens hardcoded in plaintext `env` blocks - π¦ **Unpinned packages** β `npx -y some-mcp-server` fetches *whatever the latest release is*, every launch (the classic **rug pull**) - π **Arbitrary execution** β `curl β¦ | bash` installers and `bash -c` wrappers - ποΈ **Your whole disk** β filesystem servers rooted at `/` or `~` - π³οΈ **Poisoned tool descriptions** β hidden instructions injected straight into the model's context (**tool poisoning**) - π **Unauthenticated remote servers** β plaintext HTTP endpoints anyone can invoke **`mcp-audit-tool` finds all of these in seconds.** It is a fast, dependency-light, **pure-Python** static analyzer purpose-built for MCP client configurations β no Node.js, no Docker, no LLM API keys required. ## β¨ Features - π§ **12 built-in detection rules** covering the OWASP MCP Top 10 categories: tool poisoning, rug pulls, secrets exposure, command injection, installer spoofing, insecure transport, missing auth, permission creep - π **Zero-config auto-discovery** β finds Claude Desktop, Cursor, Windsurf, Cline, Zed, and VS Code MCP configs on macOS, Linux, and Windows automatically - π **Security score & grade (A+ β F)** with clear, actionable remediation for every finding - π₯οΈ **Beautiful terminal reports** powered by Rich β plus machine-readable **JSON** and **SARIF 2.1.0** output - π€ **CI/CD ready** β fail builds on severity thresholds and upload findings to **GitHub Code Scanning** - π **Pure Python 3.9+** β three tiny dependencies (`typer`, `rich`, `pyyaml`), installs in seconds - π§© **Extensible rule engine** β adding a new rule is one small function (see CONTRIBUTING) ## π Installation ### One-line installer (macOS & Linux) [code] The installer checks for Python 3.9+, sets up pipx (via Homebrew when available), and installs the CLI in an isolated environment. Done. > **Fresh Mac?** You only need Apple's command line tools first: > [code] > Everything else β Python, pipx, the tool itself β is handled by the one-liner above. **No Node.js or nvm required**: mcp-audit-tool is 100% Python. ### pipx (recommended, any platform) [code] ### pip [code] ### From source [code]