
MCP Shield
A static analysis tool that scans MCP server code for security vulnerabilities before they hit production. Exposes three tools: shield_scan_file, shield_scan_directory, and shield_scan_code. It runs 20 rules across SSRF detection, path traversal checks, injection patterns (eval/exec, SQL, subprocess), hardcoded secrets, and missing auth. Each finding maps to a CWE ID and includes a specific fix. You get an A to F grade based on severity distribution. Pure Python with zero dependencies, so you can clone and run it immediately. Useful during code review or before deploying a new MCP server, especially given that 36.7% of servers are apparently SSRF-vulnerable according to their research.
- tools
- 3
- transport
- STDIO
- last updated
- Jun 9, 2026
Tools
3 toolsPublic tool metadata for what this MCP can expose to an agent.
shield_scan_fileScan a single MCP server file for security issues.
Scan a single MCP server file for security issues.
No parameter schema in public metadata yet.
shield_scan_directoryScan an MCP server project directory for security issues.
Scan an MCP server project directory for security issues.
No parameter schema in public metadata yet.
shield_scan_code
No parameter schema in public metadata yet.
Sponsors
Readme
MCP Shield
Open-source security scanner for MCP servers. 20 rules across 6 categories. Scan any server in seconds. Get a grade from A to F.
36.7% of MCP servers are SSRF-vulnerable (BlueRock, 2026). 82% have path traversal flaws. Only 17% are production-ready. MCP Shield finds the vulnerabilities before attackers do.
Quick Start
git clone https://github.com/sophiacave/mcp-shield
cd mcp-shield
# Scan a file
python3 src/cli.py scan path/to/mcp_server.py
Details
- Repository
- github.com/sophiacave/mcp-shield
- Category
- Security & Pentesting
- Package
@sophiacave/mcp-shield- Transport
- STDIO
- Registry
- MCP registry, active