aperion-shield is a local MCP middleman that blocks destructive AI agent actions โ
DROP DATABASE, rm -rf /, git push --force,
unscoped UPDATE โ before they reach your database, repo, or filesystem.
Free. Open source. Apache 2.0. No cloud account, no telemetry.
# Agent decides to "clean up" the prod database
agent> tools/call execute_sql {"query": "DROP DATABASE prod;"}
[shield] BLOCK rule=sql.drop_database severity=Critical tool=execute_sql
[shield] reason="DROP DATABASE forbidden โ open a DBA ticket."
agent (received shield_blocked, picks a different plan)
agent> tools/call execute_sql {"query": "UPDATE users SET deleted=true"}
[shield] APPROVAL REQUIRED rule=sql.unscoped_update tool=execute_sql
[shield] reason="Unbounded UPDATE โ add a WHERE clause or get approval."
[shield] ticket=shld_4f1c2a... (60s timeout)
# in a second terminal, the engineer:
$ echo "deny shld_4f1c2a..." >> .aperion-shield/inbox
agent (receives shield_approval_denied, asks the user instead)
AI coding agents are powerful, and they also confidently make catastrophic
mistakes โ running DROP TABLE on the wrong database,
force-pushing over main, rm -rf'ing the wrong
directory. Shield is a tiny, fast, local guardrail that lives between
your IDE and the real tools.
13 default rules cover SQL, git, and filesystem destruction. DROP DATABASE, rm -rf /, git push --force to main โ blocked at the MCP layer, never reach the upstream tool.
High-severity actions (unscoped UPDATE/DELETE, history rewrite) pause and wait 60 s for you to approve in a terminal. Default-deny on timeout.
Runs as a stdio MCP server. Single binary, ~3 MB. No cloud account, no API key, no telemetry. Bundled defaults work out of the box.
The free standalone and the paid Smartflow gateway use the same YAML rule language. Author once, deploy anywhere.
Start with --shadow to log what Shield would have blocked without actually blocking it. Walk to enforce mode at your pace.
Drop a shield.yaml in ~/.aperion-shield/. Regex matchers, named SQL predicates, anomaly detectors โ all documented.
Pick one. Then point your IDE's MCP config at Shield.
# macOS / Linux (Homebrew) brew install AperionAI/tap/aperion-shield # any platform (Cargo) cargo install aperion-shield # pre-built binaries (any platform) # https://github.com/AperionAI/shield/releases
~/.cursor/mcp.json{
"mcpServers": {
"postgres": {
"command": "aperion-shield",
"args": [
"--",
"npx", "-y",
"@modelcontextprotocol/server-postgres",
"postgresql://user:pass@localhost:5432/mydb"
]
}
}
}
~/.claude/config.json{
"mcpServers": {
"shell": {
"command": "aperion-shield",
"args": ["--", "npx", "-y", "@modelcontextprotocol/server-shell"]
}
}
}
Full walk-throughs: Cursor quickstart ยท Claude Code quickstart ยท Custom rules
13 rules across SQL, git, filesystem, LLM plans, and anomaly detection. All in config/shieldset.yaml; all overridable.
DROP DATABASE, DROP TABLE, TRUNCATE, unscoped UPDATE / DELETE, GRANT ALL.
git push --force to main / master, git filter-repo, git reset --hard HEAD~, git branch -D.
rm -rf /, rm -rf $HOME, dd if=โฆ of=/dev/sda, deletes under /etc, /var, /usr.
The assistant mentions a destructive plan in its reply text, even before it reaches for a tool. Enterprise seam.
5+ destructive ops by the same actor in 5 minutes. Catches "agent went rogue" loops.
Layer company-specific rules on top via YAML. Regex + named SQL predicates + anomaly detectors.
The free product is great on its own. The paid product (Smartflow) adds the team / compliance layer for regulated industries.
| aperion-shield free, Apache 2.0 |
Smartflow paid, commercial |
|
|---|---|---|
| Local rule engine + 13 defaults | โ | โ |
| Cursor / Claude Code MCP wrapper | โ | โ |
| Custom rules (YAML) | โ | โ |
| Shadow / enforce / audit modes | โ | โ |
| Local stderr audit log | โ | โ |
| Hosted approval queue + dashboard | โ | โ |
| Tamper-evident audit chain (RFC 3161) | โ | โ |
| WORM connectors (S3 Object Lock, etc.) | โ | โ |
| EU AI Act conformity console + AI-BOM | โ | โ |
| Shared team rules + role-based approval | โ | โ |
| MCP trust registry (signed servers) | โ | โ |
| Sigstore-signed binaries + admission policies | โ | โ |
Need the team layer? Explore Smartflow โ
The free standalone product does not phone home. There is no
telemetry, no usage counters sent to APERION, no account ever created.
Logs are written to your local stderr only.
An optional opt-in public "block ticker" (a counter of how many destructive ops Shield
blocked across the entire user base โ never including SQL, prompts, or payloads) is
under design. If/when it ships, it will be explicitly opt-in at install
time and gated on legal + DPO review.