Skip to main content

🛡️ 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-vigil
mcp-vigil scan

Demo

$ mcp-vigil scan

╔══════════════════════════════════════╗
║       MCP GUARD — Security Audit     ║
╚══════════════════════════════════════╝

📄 ~/.cursor/mcp.json
   Servers: 5  |  Findings: 0 critical, 3 high, 1 other  |  Score: 67/100 (C)

🟠 [HIGH] Excessive filesystem access: /
   Server 'filesystem' has --directory set to / — entire disk exposed.
   Fix: Restrict to a specific subdirectory.

🟠 [HIGH] Secret in env block of MCP config
   Server 'github', env: GITHUB_PERSONAL_ACCESS_TOKEN
   Contains a hardcoded secret value in the config file.
   Fix: Move to .env file.

🟠 [HIGH] Secret in env block of MCP config
   Server 'slack', env: SLACK_BOT_TOKEN
   Contains a hardcoded secret value in the config file.
   Fix: Move to .env file.

🟡 [MEDIUM] MCP server using HTTP without TLS
   Server 'insecure-remote' connects via http:// — data not encrypted.
   Fix: Use https:// instead.

────────────────────────────────────────
  Files scanned:  1
  Total findings: 4  (3 HIGH, 1 MEDIUM)

⚠️  High-severity issues found — fix soon

mcp-vigil demo


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

Metadata

Release files for mcp-vigil 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-vigil 0.3.0
File Size Uploaded Provenance
mcp_vigil-0.3.0.tar.gz 17.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-vigil 0.3.0
File Interpreter ABI Platform
mcp_vigil-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 35.0 kB

Release files / mcp_vigil-0.3.0.tar.gz

Download URL mcp_vigil-0.3.0.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
729e5e4fc6a2e48238f6bf1056775da84902b35dc65602736ee0b7119d74d87a
BLAKE2b-256 checksum
How to use checksums
de2a161883f393d36ab9614d551cc2314299b3becd56544b65fa87e002a682d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / mcp_vigil-0.3.0-py3-none-any.whl

Download URL mcp_vigil-0.3.0-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ebcb3ff386284c41172d42b0943458074d00e5cf42ed92c6dd5ec6a07fd26bc
BLAKE2b-256 checksum
How to use checksums
7f83fc2bd2c6d6b4047b9412058c5bddc6085c263bad71f92624fdab0d9aafb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for mcp-vigil 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page