๐ก๏ธ 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.
โ ๏ธ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
# Add to your Claude Code skills
git clone https://github.com/graygnatconsole/mcp-audit-toolGuides for using ai agents skills like mcp-audit-tool.
See how mcp-audit-tool compares with popular alternatives.
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
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:
env blocksnpx -y some-mcp-server fetches whatever the latest release is, every launch (the classic rug pull)curl โฆ | bash installers and bash -c wrappers/ or ~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.
typer, rich, pyyaml), installs in secondsmkdir -p 'mcpaudittool' && cd 'mcpaudittool' && npm install github:graygnatconsole/mcp-audit-tool
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:
xcode-select --installEverything 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 install git+https://github.com/graygnatconsole/mcp-audit-tool.git
pip install git+https://github.com/graygnatconsole/mcp-audit-tool.git
git clone https://github.com/graygnatconsole/mcp-audit-tool.git
cd mcp-audit-tool
pip install -e ".[dev]"
# Auto-discover and audit every MCP config on this machine
mcp-audit scan
# Audit a specific config file
mcp-audit scan ~/.cursor/mcp.json
# Try it against the intentionally vulnerable example
mcp-audit scan examples/vulnerable-claude-config.json
# JSON report for scripting
mcp-audit scan --format json --output report.json
# SARIF for GitHub Code Scanning
mcp-audit scan --format sarif --output results.sarif
# Fail the build on HIGH or worse (exit code 1)
mcp-audit scan --fail-on high
# List all detection rules
mcp-audit rules
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ MCP Security Audit โ
โ Score: 12/100 Grade: F โ
โ 4 server(s) across 1 config file(s) โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Severity Rule Server Finding
CRITICAL MAT-001 shady-downloader Hardcoded secret in MCP server environment
CRITICAL MAT-004 shady-downloader Pipe-to-shell installer in launch command
CRITICAL MAT-010 remote-api Possible tool poisoning: hidden instruction
HIGH MAT-003 filesystem Unpinned MCP server package (rug-pull risk)
HIGH MAT-007 filesystem Filesystem server granted root-wide access
HIGH MAT-008 remote-api Remote MCP server over plaintext HTTP
โฆ
CRITICAL: 3 HIGH: 4 MEDIUM: 3
Top remediations
โข MAT-001 Move the credential to a secrets manager. Rotate the exposed secret immediately.
โข MAT-004 Download the script, review it, pin its checksum, execute a local copy.
โข MAT-010 Audit the server source; pin and hash tool definitions to detect rug pulls.
| Client | macOS | Linux | Windows |
|---|---|---|---|
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json |
~/.config/Claude/โฆ |
%APPDATA%\Claude\โฆ |
| Cursor | ~/.cursor/mcp.json |
โ | โ |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
โ | โ |
| Cline (VS Code) | โฆ/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json |
โ | โ |
| Zed | ~/.config/zed/settings.json |
โ | โ |
| Project-level | .vscode/mcp.json, .cursor/mcp.json, .mcp.json, mcp.json |
โ | โ |
| ID | Rule | Severity | CWE |
|---|---|---|---|
| MAT-001 | Hardcoded secret in server env (OpenAI/Anthropic/GitHub/AWS/Slack/Google keys, private keys) |
๐ด CRITICAL | CWE-798 |
| MAT-002 | Sensitive host env var passed through to the server process | ๐ด HIGH | CWE-200 |
| MAT-003 | Unpinned npx/uvx/pipx package โ rug-pull & supply-chain risk |
๐ด HIGH | CWE-1357 |
| MAT-004 | curl/wget piped to shell โ installer spoofing / RCE |
๐ด CRITICAL | CWE-494 |
| MAT-005 | Dangerous launch commands (rm -rf, sudo, chmod 777, eval) |
๐ด HIGH | CWE-78 |
| MAT-006 | Shell -c wrapper โ command-injection surface |
๐ก MEDIUM | CWE-78 |
| MAT-007 | Filesystem server rooted at /, ~, or $HOME |
๐ด HIGH | CWE-22 |
| MAT-008 | Remote MCP server over plaintext HTTP | ๐ด HIGH | CWE-319 |
| MAT-009 | Remote MCP server with no authentication configured | ๐ก MEDIUM | CWE-306 |
| MAT-010 | Tool-poisoning indicators in descriptions (hidden instructions) | ๐ด CRITICAL | CWE-74 |
| MAT-011 | Destructive tools on the auto-approve list (no human confirmation) | ๐ก MEDIUM | CWE-862 |
| MAT-012 | Wildcard * permissions |
๐ก MEDIUM | CWE-732 |
Gate pull requests on MCP config security and surface findings in the Security tab:
name: MCP Security Audit
on: [push, pull_request]
permissions:
security-events: write
jobs:
mcp-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pipx install git+https://github.com/graygnatconsole/mcp-audit-tool.git
- name: Audit MCP configs
run: mcp-audit scan .vscode/mcp.json .cursor/mcp.json --format sarif --output results.sarif
- name: Upload to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
| Code | Meaning |
|---|---|
0 |
Scan completed; no finding at or above --fail-on threshold |
1 |
Findings at or above the --fail-on severity |
2 |
Usage error (missing file, parse error, bad options) |
tools/list over stdio/SSE and diff against pinned hashes (rug-pull detection at runtime)mcp-audit fix โ auto-remediate unpinned packages and over-broad paths--baseline) to alert on config drift--ruleset)Contributions welcome โ see CONTRIBUTING.md.
Part of a growing MCP security ecosystem โ also check out:
MIT ยฉ GrayGnatConsole โ use it, fork it, ship it.
**If mcp-audit-tool caught something nasty in your config, โญ s
mcp-audit-tool is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by graygnatconsole. ๐ก๏ธ 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. It has 60 GitHub stars.
mcp-audit-tool's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/graygnatconsole/mcp-audit-tool" and add it to your Claude Code skills directory (see the Installation section above).
mcp-audit-tool is primarily written in Python. It is open-source under graygnatconsole on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh mcp-audit-tool against similar tools.
No comments yet. Be the first to share your thoughts!