mcp-shield
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-shield π‘οΈ
Zero-overhead runtime security proxy, reversible secret vault, and audit firewall for Model Context Protocol (MCP) servers.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π‘οΈ mcp-shield runtime active: Cursor / Claude Desktop / Windsurf β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β IN [BLOCKED] execute_sql "DROP TABLE users;" (Destructive command) β
β β IN [BLOCKED] read_file "~/.ssh/id_rsa" (Sensitive path protected) β
β β OUT [MASKED] get_user_api "sk-proj-..." -> [[MCP_SHIELD_REF_8f91]] β
β β IN [RESTORE] call_webhook [[MCP_SHIELD_REF_8f91]] -> Re-hydrated β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββWhen AI assistants (Cursor, Claude Desktop, Windsurf, or agent frameworks) connect to local MCP servers, they often receive unrestricted access to system files, shell commands, and databases.
Unlike offline scanners that only check configuration files once, mcp-shield runs in real time between your AI client and any target MCP server. It intercepts destructive tool calls, prevents sensitive file exfiltration, and redacts credentials before they can leak into external LLM prompts.
β‘ 1-Click Protection (Universal Client Support)
Shield your MCP servers across all installed AI editors with a single command:
# Auto-detects and protects Claude Desktop, Cursor, and Windsurf
npx mcp-shield wrap all
# Or target a specific editor:
npx mcp-shield wrap cursor
npx mcp-shield wrap claude
npx mcp-shield wrap windsurfTo revert back at any time:
npx mcp-shield unwrap allRelated MCP server: mcp_Shield
π Why mcp-shield Outperforms Alternative Tools
Capability | Static Config Scanners | Standard Proxies |
|
Real-time Runtime Blocking | β | β | β |
Universal 1-Click Auto-Wrap | β | β | β (Cursor, Claude, Windsurf) |
Reversible Secret Vault | β | β (hard redacts, breaks APIs) | β (masks outbound, re-hydrates inbound) |
Destructive Command Guard | β | Partial | β
( |
Sensitive Path Shield | β | Partial | β
( |
Zero-Corrupt Terminal HUD | β | β | β (Live latency & status to stderr) |
π The Reversible Secret Vault
Standard redactors replace secrets with [REDACTED], which breaks downstream APIs when the tool actually needs the token.
mcp-shield uses an in-memory cryptographic token vault:
Outbound to LLM: Replaces raw API keys, JWTs, and passwords with synthetic placeholders (
[[MCP_SHIELD_REF_8f91]]). The LLM never sees your real credentials.Inbound from LLM: When the LLM calls a downstream tool with the placeholder,
mcp-shieldsecurely re-hydrates the placeholder with the real secret before dispatching to the target service.
π οΈ Manual CLI Usage
You can also run mcp-shield directly as a transparent wrapper:
# Run any MCP server protected through mcp-shield
npx mcp-shield -- npx -y @modelcontextprotocol/server-postgres "postgresql://localhost/mydb"
# Enable persistent JSON audit logging
npx mcp-shield --log /tmp/audit.jsonl -- npx -y @modelcontextprotocol/server-filesystem /path/to/dirOptions
Usage: mcp-shield [options] [command] [args...]
Subcommands:
wrap [target] Inject mcp-shield into AI clients: 'cursor', 'claude', 'windsurf', or 'all' (default: all)
unwrap [target] Restore original configuration
Arguments:
command Target MCP server command (e.g., 'npx', 'node', 'python')
args Arguments to pass to target MCP server
Options:
-l, --log <path> File path to write JSON audit logs
-s, --silent Suppress live terminal HUD to stderr (default: false)
--no-mask Disable automatic secret vault tokenization
-b, --block-tool <tools...> Explicit list of tool names to block completely
-h, --help Display help instructionsπ§ͺ Testing
git clone https://github.com/alexfraser-scotch/mcp-shield.git
cd mcp-shield
npm install
npm testπ€ Contributing & License
Contributions, rules, and security suggestions are warmly welcomed! See our Contributing Guide to get started.
Distributed under the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Real-time MCP & A2A prompt-injection, jailbreak, and tool-schema poisoning firewall for AI agents.
An MCP server for Arcjet - the runtime security platform that ships with your AI code.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenancePolicy-enforcing MCP proxy that blocks dangerous tool calls before they execute. Protects credentials, filesystem, shell, and databases across Claude Desktop, Cursor, Windsurf, and OpenClaw.8 npm41Apache 2.0
- FlicenseNot gradedqualityDmaintenanceThe security runtime for MCP servers. Every tool call inspected. Every attack blocked. Every decision logged.1-
- AlicenseNot gradedqualityDmaintenanceA drop-in proxy that guards MCP servers with policy enforcement, secret redaction, prompt-injection screening, rug-pull detection, rate limiting, and audit logging.8 npmApache 2.0
- FlicenseNot gradedqualityDmaintenanceA secure MCP proxy server with JWT authentication, SQL guardrails, rate limiting, and Kafka audit logging, enabling enterprise-grade access control for MCP clients like Cursor and Claude Desktop.-