openclaw-security
v1.0.2
Published
Security interceptor MCP server for OpenClaw — intercepts, classifies, and blocks dangerous AI agent actions
Downloads
236
Maintainers
Readme
🛡️ OpenClaw Monitor
Security Interceptor MCP Server for OpenClaw
A proxy gateway that intercepts, classifies, and blocks dangerous AI agent actions before they execute. Built as an MCP (Model Context Protocol) server that sits between OpenClaw and its tools.
Features
- 🔒 Action Interception — Intercepts all tool calls before execution
- 📊 Risk Classification — Categorizes actions by severity (SAFE → CRITICAL)
- 🚫 Policy Engine — Configurable ALLOW/BLOCK decisions with strict mode
- 📧 Email Alerts — Immediate alerts for HIGH/CRITICAL via Resend, digest for MEDIUM
- 📝 Audit Trail — Structured JSONL logging of all intercepted actions
- ⚙️ YAML Policies — Customizable security rules
Security Rules
| Category | Examples |
|----------|----------|
| File System | Blocks .ssh, .env, credentials, sensitive extensions |
| Shell | Blocks rm -rf /, reverse shells, privilege escalation |
| Network | Domain allowlist/blocklist, exfiltration detection |
| Secrets | Detects API keys, private keys, connection strings |
Quick Start
# Install dependencies
npm install
# Set environment variables
export OCM_EMAIL_TO="[email protected]"
export OCM_RESEND_API_KEY="re_..."
# Development
npm run dev
# Production
npm run build
npm startMCP Tools
| Tool | Description |
|------|-------------|
| intercept_action | Core proxy — evaluates any tool call |
| check_file_safety | Quick file path safety check |
| check_command_safety | Quick shell command safety check |
| check_url_safety | Quick URL/domain safety check |
| get_security_stats | View audit statistics |
| get_security_policy | View current policy (keys redacted) |
Connect to OpenClaw
Add to your MCP configuration:
{
"mcpServers": {
"open-claw-monitor": {
"command": "node",
"args": ["/path/to/open-claw-monitor/dist/index.js"]
}
}
}Severity Levels
| Level | Action | Alert | |-------|--------|-------| | 🟢 SAFE | Allow | — | | 🔵 LOW | Allow + Log | — | | 🟡 MEDIUM | Allow + Log | Digest email | | 🟠 HIGH | Block | Immediate email | | 🔴 CRITICAL | Block | Immediate email |
License
ISC
