Security audit CLI for MCP (Model Context Protocol) configurations. Find leaked API keys, excessive permissions, and vulnerable servers before attackers do.
Project description
๐ก๏ธ mcp-guard
Security audit CLI for MCP (Model Context Protocol) configurations.
Find leaked API keys, excessive permissions, and vulnerable servers before attackers do.
pip install mcp-guard
mcp-guard scan
What it does
Scans your MCP configuration files and finds:
- ๐ด Hardcoded API keys โ GitHub tokens, OpenAI keys, AWS credentials in plain text
- ๐ Excessive filesystem access โ Servers with access to
/or/home - ๐ Untrusted server sources โ MCP servers from pastebin, raw GitHub gists, etc
- ๐ Known CVEs โ Checks against CVE-2025-49596, CVE-2025-6514, and more
- ๐ก Unpinned versions โ npx packages without version pins (supply chain risk)
- ๐ก Insecure transport โ HTTP without TLS for remote servers
- ๐ต Missing environment variables โ Referenced but undeclared env vars
Quick Start
# Install
pip install mcp-guard
# Scan all found MCP configs
mcp-guard scan
# Scan a specific file
mcp-guard scan --path ~/.cursor/mcp.json
# JSON output (for CI/CD)
mcp-guard scan --json
# Fail CI if critical issues found
mcp-guard scan --ci
Supported Config Locations
Auto-discovers MCP configs in:
- Cursor:
~/.cursor/mcp.json - Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json - Claude Code:
~/.claude/mcp.json,.claude/mcp.json - VS Code:
.vscode/mcp.json - Windsurf:
~/.windsurf/mcp.json
Example Output
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP GUARD โ Security Audit โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ /Users/dev/.cursor/mcp.json
Servers: 5 | Findings: 2 critical, 1 high, 3 other | Score: 42/100 (D)
๐ด [CRITICAL] Hardcoded GitHub Personal Access Token found
/Users/dev/.cursor/mcp.json:12
Found hardcoded credential: ghp_***Ab12. Anyone with access can use this key.
Fix: Replace with environment variable reference: ${GITHUB_TOKEN}
๐ [HIGH] Excessive filesystem access: /
/Users/dev/.cursor/mcp.json (server: filesystem)
MCP server 'filesystem' has access to Root directory โ entire disk exposed.
Fix: Restrict to a specific subdirectory.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Files scanned: 1
Total servers: 5
Total findings: 5
2 CRITICAL
1 HIGH
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๏ธ CRITICAL ISSUES FOUND โ fix immediately
GitHub Action (CI/CD)
- uses: mcp-guard/action@v1
with:
fail-on: critical
Add this to your CI pipeline to block merges if MCP security issues are introduced.
Why this exists
10,000+ MCP servers exist. 53% use static API keys. Developers add MCP servers to their AI coding tools daily โ often without reading the source code or checking permissions.
As AI agents get access to terminals, files, and APIs through MCP, a single misconfigured server becomes a critical attack vector.
mcp-guard is npm audit for the MCP ecosystem.
Roadmap
- Auto-fix mode (
mcp-guard fix) - VS Code extension (real-time warnings in editor)
- Web dashboard for team management (paid)
- Custom rule support (company security policies)
- Integration with Smithery/PulseMCP registry for trust verification
License
MIT ยฉ 2026
Project details
Release history Release notifications | RSS feed
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 mcp_vigil-0.1.0.tar.gz.
File metadata
- Download URL: mcp_vigil-0.1.0.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
301a1b73c430ced810474c213b923ff42dabfae63403a153fb4f013bf5ff8213
|
|
| MD5 |
1a18f5fbfd1116c080693be0513e4d66
|
|
| BLAKE2b-256 |
efe0c5c4706d706a925e89aa114fa9a436767dc0389a2fa314bca4d6488dd6eb
|
File details
Details for the file mcp_vigil-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_vigil-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
161cfc503e66508978618290a0eca383665e2407f98fae865082ea1628bdf298
|
|
| MD5 |
b1da8e98fcd7722dfd18353870381c7c
|
|
| BLAKE2b-256 |
3513a01546462847a4eecfe2da0ce238112acf80ef2881cc20c1de69d41d9d84
|