Config Guard
Zero-dependency security linter for MCP configurations.
Scans your .mcp.json for 20 types of security vulnerabilities before any MCP server starts. No API keys. No cloud. No LLM required.
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 (22 CVEs across 20 packages)
- 44 confirmed malicious packages (JFrog, Kaspersky, Lazarus APT, SANDWORM_MODE)
- Secret leakage in environment variables
- Rug-pull vectors (
npx @latestauto-updates) - Shadow servers exposing via tunnels
Install
pip install config-guard
Quick Start
# Scan your current directory's .mcp.json
config-guard
# Scan a specific project
config-guard --path /my/project
# Auto-discover all MCP configs on your system
config-guard --discover
# CI/CD integration (SARIF output for GitHub Code Scanning)
config-guard --sarif > results.sarif
# JSON output for scripting
config-guard --json
20 Security Checks
Every check is mapped to the OWASP MCP Top 10. See docs/OWASP-MAPPING.md for full CWE mappings.
| # | Check | Risk | OWASP |
|---|---|---|---|
| 1 | Network exposure (non-localhost URLs) | HIGH | MCP-03 |
| 2 | Rug pulls (npx @latest auto-update) |
HIGH | MCP-07 |
| 3 | Secret leakage (API keys in args/env) | HIGH | MCP-04 |
| 4 | Command injection (shell=True) |
CRITICAL | MCP-01 |
| 5 | Path traversal (.. in arguments) |
MEDIUM | MCP-05 |
| 6 | Typosquat detection (Levenshtein distance) | HIGH | MCP-07 |
| 7 | Dangerous permissions (--no-sandbox, sudo) |
HIGH | MCP-06 |
| 8 | Missing authentication on HTTP transport | MEDIUM | MCP-08 |
| 9 | Sensitive path access (.ssh, .aws, .env) |
HIGH | MCP-04 |
| 10 | Overbroad filesystem access (/, C:\) |
MEDIUM | MCP-06 |
| 11 | Environment variable leaks (hardcoded secrets) | MEDIUM | MCP-04 |
| 12 | Excessive server count (attack surface) | LOW | MCP-10 |
| 13 | Known CVEs (22 CVEs across 20 packages) | CRITICAL | MCP-09 |
| 14 | Symlink bypass (CVE-2025-53109) | HIGH | MCP-05 |
| 15 | Shadow servers (ngrok, cloudflared, 0.0.0.0) |
HIGH | MCP-05 |
| 16 | Code execution (eval/exec patterns) |
CRITICAL | MCP-01 |
| 17 | Known malicious packages (44 confirmed malware) | CRITICAL | MCP-07 |
| 18 | Deprecated SSE transport (no per-request auth) | MEDIUM | MCP-03 |
| 19 | Shell servers (raw shell as MCP server) | CRITICAL | MCP-01 |
| 20 | Unpinned packages (npx/uvx without version) | MEDIUM | MCP-04 |
CVE Database
Config Guard tracks known vulnerable MCP packages:
| Package | CVE | Severity |
|---|---|---|
mcp-remote |
CVE-2025-6514 | Critical (CVSS 9.6) |
@modelcontextprotocol/server-git |
CVE-2025-68145 | Critical |
mcp-server-git |
CVE-2026-27735 | Medium |
@anthropic/mcp-server-filesystem |
CVE-2025-53109 | High |
gemini-mcp-tool |
CVE-2026-0755 | Critical |
mcp-vegalite-server |
CVE-2026-1977 | Critical |
github-kanban-mcp |
CVE-2026-0756 | High |
godot-mcp |
CVE-2026-25546 | High |
fermat-mcp |
CVE-2026-2008 | Critical |
@anthropic/mcp-inspector |
CVE-2026-23744 | Critical (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
========================================
[!] CRITICAL (1):
[my-server] [MCP-09] Uses package with known CVE (CVSS-9.6): mcp-remote
Fix: Update to latest patched version
[i] INFO (1):
[safe-server] Server 'safe-server' passed all checks
Security Score: 85/100
SARIF (CI/CD)
config-guard --sarif > results.sarif
Upload to GitHub Code Scanning, Azure DevOps, or any SARIF-compatible tool.
JSON
config-guard --json | jq '.score'
GitHub Actions Integration
- name: MCP Config Security Scan
run: |
pip install config-guard
config-guard --sarif > results.sarif
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
Supported Configs
Config Guard scans these MCP configuration formats:
- Claude Code / Claude Desktop (
.mcp.json,claude_desktop_config.json) - Cursor (
.cursor/mcp.json) - VS Code (
.vscode/mcp.json) - Windsurf (
.windsurf/mcp.json)
Use --discover to auto-find all configs on your system.
Scoring
Config Guard calculates a security score from 0-100:
| Finding | Deduction |
|---|---|
| CRITICAL | -25 points |
| HIGH | -15 points |
| MEDIUM | -5 points |
| LOW | -3 points |
100/100 = no findings. 0/100 = critical issues found.
Exit code is 1 if any CRITICAL or HIGH findings exist (useful for CI gates).
Comparison: Config Guard vs Agent Scan (Snyk)
| Feature | Config Guard | Agent Scan (Snyk/Invariant Labs) |
|---|---|---|
| Approach | Deterministic regex + CVE database | LLM-based judges + deterministic rules |
| Dependencies | Zero (stdlib only) | Requires API calls to invariantlabs.ai |
| Offline | Fully offline | Requires internet (sends tool descriptions to cloud) |
| Privacy | No data leaves your machine | Tool names/descriptions sent to Snyk for analysis |
| Checks | 20 static config checks | Prompt injection + tool poisoning + toxic flows |
| CVE database | 22 CVEs across 20 packages | Dynamic (cloud-updated) |
| Malicious packages | 44 confirmed (JFrog, Kaspersky, Lazarus, SANDWORM) | Dynamic detection |
| OWASP mapping | All 20 checks mapped to MCP Top 10 + CWE IDs | Not documented |
| SARIF output | Native SARIF v2.1.0 with CWE tags + fingerprints | Not available |
| CI/CD | GitHub Actions, any SARIF tool | Background mode (MDM/CrowdStrike) |
| Speed | <100ms (no network) | Seconds (API round-trip) |
| Install | pip install config-guard |
uvx mcp-scan@latest |
| Scope | Config files only (pre-start) | Config + runtime tool descriptions |
| License | MIT (open source) | Proprietary (Snyk) |
When to use Config Guard: CI/CD pipelines, air-gapped environments, privacy-sensitive setups, pre-commit hooks. Config Guard runs instantly with zero network access.
When to use Agent Scan: Runtime tool description analysis, prompt injection detection in live MCP servers, enterprise environments with Snyk Evo integration.
Best practice: Use both. Config Guard catches config-level issues before servers start. Agent Scan catches runtime tool poisoning after servers are running.
Zero Dependencies
Config Guard uses only Python standard library modules (json, os, re, sys, pathlib, argparse). No pip install surprises. No supply chain risk from transitive dependencies.
License
MIT License. See LICENSE for details.
Contributing
Issues and PRs welcome at github.com/KGT24k/config-guard.
Metadata
Release files for mcp-config-guard 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_config_guard-2.0.0.tar.gz | 42.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_config_guard-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 74.1 kB
Release files / mcp_config_guard-2.0.0.tar.gz
| Download URL | mcp_config_guard-2.0.0.tar.gz |
|---|---|
| Size | 42.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fb18606e1059988bf019f0ee8d4421b24a4a29e0eb784dc87fb055717f36d0c
|
|
BLAKE2b-256 checksum How to use checksums |
ce37f54cc52f8f35b388bff6358bd8d287b929f1a9cf00365af6db253747af24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / mcp_config_guard-2.0.0-py3-none-any.whl
| Download URL | mcp_config_guard-2.0.0-py3-none-any.whl |
|---|---|
| Size | 31.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d5b55c59c398582dd590b85deb95a3284552a556992213298e743900c5dbc65
|
|
BLAKE2b-256 checksum How to use checksums |
7ad28f8f0629306bc76bf29577b3074e39fd25be4eb9daa234141138a21c9f95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for mcp-config-guard 2.0.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.