ops-cage
README.md
# ops-cage
[](LICENSE) [](#) [](#mcp-firewall-proxy--mcp-mode)
Zero-dependency secret redactor, destructive shell guardrail, **stdio MCP firewall proxy**, and `mcp.json` security scanner for AI coding agents (Claude Code, Cursor, Codex, Gemini CLI, Antigravity).

## Quickstart (Zero Install)
```bash
# Scan .mcp.json / claude_desktop_config.json for leaks & poisoning
npx ops-cage scan ~/.claude/.mcp.json
# Wrap any untrusted or powerful MCP server behind the ops-cage stdio firewall
npx ops-cage proxy -- npx @modelcontextprotocol/server-filesystem /srv/app
# Guard a shell command before execution
npx ops-cage guard "sudo rm -rf /*"
# Redact secrets from logs before sharing with an LLM
cat .env | npx ops-cage redact
```
## Capabilities
- **Transparent Stdio MCP Proxy (`ops-cage proxy -- <cmd>`)**: Intercepts incoming `tools/call` arguments in real time to block `rm -rf /`, `find / -delete`, `mkfs`/`dd of=/dev/...`, `curl|sh`, `iptables -F`, and fork bombs, and automatically redacts leaked API tokens from child tool responses before they enter agent context.
- **Linear-Time Secret Redaction (`ops-cage redact`)**: Scrubs `.env` values, PEM private keys, JWTs, `Authorization: Bearer` headers, PostgreSQL/MySQL/Redis/MongoDB credentials, and Stripe/AWS/GCP/GitHub/Slack/Telegram/SAU keys with ReDoS protection.
- **MCP Config Audit (`ops-cage scan`)**: Detects plaintext tokens, unpinned `npx`/`uvx` runners, `StrictHostKeyChecking=no`, cleartext non-loopback `http://` MCP transports, host-root container mounts (`-v /:/host`), and hidden prompt-injection / Bidi Unicode directives.
## MCP Firewall Proxy & `--mcp` Mode
```json
{
"mcpServers": {
"ops-cage": { "command": "npx", "args": ["ops-cage@1.1.0", "--mcp"] },
"guarded-shell": { "command": "npx", "args": ["ops-cage@1.1.0", "proxy", "--", "my-mcp-server"] }
}
}
```
Prefer instant browser scanning or short-lived 60–3600s Ed25519 SSH leases enforced server-side? Try the [Free MCP Security Scanner](https://serversareup.com/tools/mcp-security-scanner) and [ServersAreUp MCP Docs](https://serversareup.com/docs/mcp).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues