Protect Mcp
Fail-closed Cedar policy gate + Ed25519 signed receipts for agent tool calls. Denies on any error.
- Transport
- Not stated
- Package
- —
- Registry id
- com.scopeblind/protect-mcp
No install snippet on purpose. A working MCP config is a command, its arguments and an environment block — the last two are where API keys live, so this catalogue never stores them and cannot publish them. Follow the link above for the authors' own instructions.
Fail-closed Cedar policy gate plus signed receipts for AI agent tool calls.
protect-mcp is a gate that sits in front of an AI agent's tool calls. It evaluates
each call against a Cedar policy,
blocks what breaks the rules before it runs, and signs an
offline-verifiable Ed25519 receipt of every decision. The configured gateway runs locally and sends no decision telemetry. The
separate coordination adapter connects to ScopeBlind’s hosted collaboration service;
its requests and returned records have the data path described below. Both are
MIT licensed.
For shared repository work, use client projects: people agree on the brief and limits, agents prepare reviews, and both people approve an exact version before the owner's receiver can change the repository. The repository workflow below includes setup and the five bounded agent tools.
Why it is different
- Fail-closed by default. On any policy error, a missing engine, or an
evaluation failure, the decision is DENY. The gate never silently allows. An
observe mode exists for shadow rollout, but even there a call that would be
blocked is flagged
would_deny: true, so a failure is never silent. - It proves its own restraint.
serve --enforceanddoctorrun a startup self-test and refuse to arm the gate unless they can show that a known-forbidden action is actually denied. A gate that cannot prove it denies does not start. - Every decision is a receipt anyone can verify. Decisions are Ed25519-signed
and verifiable offline with
@veritasacta/verify. Signature verification needs no network lookup. Claims about execution still depend on the identified gate operator.
Quickstart: install to first useful proof
# 1. Generate an Ed25519 keypair, config template, and sample policy.
npx protect-mcp init
# 2. Print a shadow-mode client configuration, then apply it in your MCP host.
# This command prints configuration and exits; it does not launch the server.
npx protect-mcp wrap -- node your-mcp-server.js
# 3. Reopen the host and use its tools, then inspect the local-only dashboard.
npx protect-mcp dashboard --open
# 4. Draft a reviewable policy from observed calls.
npx protect-mcp recommend --write
# 5. When reviewed, restart the wrapper in enforce mode with that policy.
npx protect-mcp --policy protect-mcp.recommended.json --enforce -- node your-mcp-server.js
For Claude Desktop, run a dry-run config patch first, then apply it:
npx protect-mcp wrap --claude-desktop
npx protect-mcp wrap --claude-desktop --write
npx protect-mcp dashboard --open
The dashboard binds to 127.0.0.1, reads only local log/receipt files, and does
not upload anything. Use npx protect-mcp connect only if you explicitly want a
hosted ScopeBlind dashboard.
The gate as an MCP server
If you would rather call the gate as tools than wire the Claude Code hooks, run it as an MCP server:
npx protect-mcp mcp
It speaks MCP over stdio and exposes four read-only tools, the whole loop:
From the project's README.