MCP Config Guard

March 8, 2026 ยท View on GitHub

Zero-dependency security linter for MCP configurations.

Scans your .mcp.json for 54 types of security vulnerabilities before any MCP server starts. No API keys. No cloud. No LLM required.

PyPI version Python 3.9+ License: MIT Zero Dependencies

Why?

43% of public MCP servers have command injection flaws (BlueRock TechReport 2026). Every MCP config you use is a trust boundary โ€” and most developers never audit them.

Config Guard catches what humans miss:

  • Typosquatted packages that look like real ones
  • Servers with known CVEs (28 CVEs across 20 packages)
  • 56 confirmed malicious packages (JFrog, Kaspersky, Lazarus APT, SANDWORM_MODE)
  • Secret leakage in environment variables
  • Rug-pull vectors (npx @latest auto-updates)
  • Shadow servers exposing via tunnels

Install

pip install mcp-config-guard

Note: The package was renamed to mcp-config-guard on PyPI. Both config-guard and mcp-config-guard CLI commands work after installation.

Quick Start

# Scan your current directory's .mcp.json
mcp-config-guard

# Scan a specific project
mcp-config-guard --path /my/project

# Auto-discover all MCP configs on your system
mcp-config-guard --discover

# CI/CD integration (SARIF output for GitHub Code Scanning)
mcp-config-guard --sarif > results.sarif

# JSON output for scripting
mcp-config-guard --json

54 Security Checks

Every check is mapped to the OWASP MCP Top 10 and OWASP Agentic Security Top 10. See docs/OWASP-MAPPING.md for full CWE mappings.

#CheckRiskOWASP
1Network exposure (non-localhost URLs)HIGHMCP-03
2Rug pulls (npx @latest auto-update)HIGHMCP-07
3Secret leakage (API keys in args/env)HIGHMCP-04
4Command injection (shell=True)CRITICALMCP-01
5Path traversal (.. in arguments)MEDIUMMCP-05
6Typosquat detection (Levenshtein distance)HIGHMCP-07
7Dangerous permissions (--no-sandbox, sudo)HIGHMCP-06
8Missing authentication on HTTP transportMEDIUMMCP-08
9Sensitive path access (.ssh, .aws, .env)HIGHMCP-04
10Overbroad filesystem access (/, C:\)MEDIUMMCP-06
11Environment variable leaks (hardcoded secrets)MEDIUMMCP-04
12Excessive server count (attack surface)LOWMCP-10
13Known CVEs (28 CVEs across 20 packages)CRITICALMCP-09
14Symlink bypass (CVE-2025-53109)HIGHMCP-05
15Shadow servers (ngrok, cloudflared, 0.0.0.0)HIGHMCP-05
16Code execution (eval/exec patterns)CRITICALMCP-01
17Known malicious packages (56 confirmed malware)CRITICALMCP-07
18Deprecated SSE transport (no per-request auth)MEDIUMMCP-03
19Shell servers (raw shell as MCP server)CRITICALMCP-01
20Unpinned packages (npx/uvx without version)MEDIUMMCP-04

CVE Database

Config Guard tracks known vulnerable MCP packages:

PackageCVESeverity
mcp-remoteCVE-2025-6514Critical (CVSS 9.6)
@modelcontextprotocol/server-gitCVE-2025-68145Critical
mcp-server-gitCVE-2026-27735Medium
@anthropic/mcp-server-filesystemCVE-2025-53109High
gemini-mcp-toolCVE-2026-0755Critical
mcp-vegalite-serverCVE-2026-1977Critical
github-kanban-mcpCVE-2026-0756High
godot-mcpCVE-2026-25546High
fermat-mcpCVE-2026-2008Critical
@anthropic/mcp-inspectorCVE-2026-23744Critical (CVSS 9.8)

Config Guard also detects confirmed malicious packages (e.g., postmark-mcp, @lanyer640/mcp-runcommand-server) that contain reverse shells or malware payloads.

Output Formats

Human-readable (default)

MCP Security Scan Results