sophiacave avatar

MCP Shield

sophiacave/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 tools

Public 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

CI

License: MIT Python 3.10+ Tests: 28 passing MCP Compatible

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

View the full README on GitHub

Details

Repository
github.com/sophiacave/mcp-shield
Category
Security & Pentesting
Package
@sophiacave/mcp-shield
Transport
STDIO
Registry
MCP registry, active

More from sophiacave

Related Security & Pentesting MCP servers

View all
1srotzin avatarHive Cdnsrotzin/hive-mcp-cdnEdge content delivery for autonomous agents — signed manifests, A2A authentication0stars
2symbioticsec avatarMcpsymbioticsec/mcpSymbiotic CLI MCP Server for security scanning and analysis0stars
3unbearabledev avatarGitHub Actions Auditunbearabledev/github-actions-auditGitHub Actions workflow security audit - 21 checks: pinning, permissions, secrets, injection.0stars
4unbearabledev avatarKubernetes Manifest Auditunbearabledev/k8s-manifest-auditkube-linter audit for Kubernetes manifests — 63 checks: security, availability, RBAC, network.0stars
5wyre-technology avatarAbnormal Securitywyre-technology/abnormal-mcpMCP server for Abnormal Security — AI-powered email threat detection, cases, and remediation.0stars
6wyre-technology avatarKnowBe4wyre-technology/knowbe4-mcpMCP server for KnowBe4 security awareness training — users, groups, training, phishing campaigns.0stars