OpenRung
A free, privacy-first relay network that helps you reach the open internet. Open source and nonprofit-run.
Policy clears the routine. A named human signs the consequential. Each one leaves a signed receipt. Install MCP Guard free, or put your First Gate live in 30 days.
SecurityGitHub @permission-protocolOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Repository information has not been collected yet.
No updates detected yet. GitHub releases will appear here.
MCP middleware that blocks dangerous AI agent actions using a simple YAML config
Loading the full README.
Read the full README ↗MCP Guard is a free guard for coding agents. It checks each shell command and file edit that Claude Code is about to run: destructive ones wait until a named person signs them in Permission Protocol, and only a verified, signed receipt lets them run. Everything else runs as before.
In your project folder, run:
npx -y @permission-protocol/mcp-guard init --preset coding-agent --hook claude-code
This works in any folder. In a folder that already has .claude/ or CLAUDE.md, you can leave out --hook claude-code.
npx.coding-agent policy to pp.config.yaml and adds the hook to .claude/settings.json.It also stores an install token (in the OS keychain, or in a file restricted to your user) and creates a local signing key under ~/.config/mcp-guard/. An existing pp.config.yaml that loads is kept as it is. It does not change any MCP server: init lists the ones it found that are not wrapped yet and prints the command that guards one (init --preset coding-agent --server <name>). The checks that can refuse run before the login, so a refusal changes nothing. Every step in detail: docs/hooks.md.
Approved by <name> through Permission Protocol. Receipt: <link>, and you see the same line.In the project folder:
npx -y @permission-protocol/mcp-guard report
It reads the local log only and sends nothing (details).
In the project folder:
npx -y @permission-protocol/mcp-guard hook uninstall
This removes only the mcp-guard entry from .claude/settings.json. At the end of its run, init prints the exact command for your setup under To undo:. What else init changed:
pp.config.yaml (unless one was already there) and, once calls are checked, the log pp-receipts.jsonl beside it. Delete them if you no longer want them.--server <name>, To undo: names the backup to copy back over that MCP config file.The hook sees Claude Code's Bash, PowerShell, Write, Edit and NotebookEdit calls. The coding-agent preset holds these for a signature (the same rules apply to MCP tools when the preset guards a wrapped server):
| Rule | Holds |
|---|---|
destructive-shell | rm -rf outside the working tree, force pushes, pushes that delete a branch or tag, --mirror and --all pushes, disk writes, destructive SQL through psql -c and similar |
destructive-sql | DROP, TRUNCATE, DELETE / UPDATE without WHERE, in the SQL argument of an MCP database tool (sql, query, ...) |
terraform-destroy | terraform destroy, apply -destroy, apply -auto-approve without a saved plan |
cloud-delete | Cloud and Kubernetes deletes of databases, volumes, buckets, snapshots, clusters, namespaces |
production-target | Any call naming a production target you list under targets: (empty by default, so it matches nothing until you add names) |
guard-tamper* | Changes to the guard itself: its policy, receipt log, keys, install token, the hook entry and Claude Code settings files, killing it |
Secret reads (cat .env, printenv, token printers) are recorded only (secret-read has observe: true) until you delete that line. From 0.6.0 a plain push to main or master (git push origin main) is recorded too (git-push-protected), not held; to hold it again, delete except_kinds: [git_push_protected] and the comma before it from the destructive-shell rule. A policy written by an earlier version is never rewritten by an upgrade, so it keeps holding plain pushes until you edit it or write it again. A command the detectors cannot read (eval, python -c, curl | sh) is held. Everything else runs, and Claude Code's own permission prompts still apply to it: the guard only adds restrictions.
The detectors are heuristics that stop mistakes. They are not a sandbox.
This is the beginning of the README. Read the rest at the original. Read the full README ↗