protect-mcp-setup
Skill by wshobson
Configures Cedar policy enforcement and Ed25519 signed receipts for Claude Code tool calls. Aimed at projects that need tamper-evident audit trails and policy-gated tool execution.
Install protect-mcp-setup
Built from the published package, never by AI.
git clone --depth 1 https://github.com/wshobson/agents /tmp/agents && mkdir -p ~/.claude/skills && cp -r /tmp/agents/plugins/protect-mcp/skills/protect-mcp-setup ~/.claude/skills/protect-mcp-setupRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/wshobson/agents /tmp/agents && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/agents/plugins/protect-mcp/skills/protect-mcp-setup ~/.gemini/antigravity-cli/skills/protect-mcp-setupAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
protect-mcp adds policy enforcement and signed audit receipts to Claude Code tool calls. Before each tool runs, a PreToolUse hook evaluates the call against a Cedar policy file, and a deny blocks it. After each tool completes, a PostToolUse hook signs a receipt naming the tool and appends it to a JSONL file. Receipts use Ed25519 signatures and can be verified offline with npx @veritasacta/verify.
It is meant for projects that need cryptographic audit trails, policy-gated tool execution, or compliance-ready evidence of agent actions, such as finance, healthcare, or regulated research. The source notes that the receipt records only the tool name, not its input or output, and that Cedar string matching is best-effort.
Written from the project's SKILL.md and checked against it.
What it can do
- Cedar policy evaluationEvaluates each Claude Code tool call against ./protect.cedar before it runs and blocks calls that Cedar denies.
- Ed25519 signed receiptsSigns a receipt naming each tool that ran and appends it to ./receipts/receipts.jsonl.
- Offline verificationVerifies receipts against a public key with npx @veritasacta/verify, without a server or account.
- Hash-linked receiptsLinks each receipt to the previous one so broken links between surviving receipts can be detected.
- /verify-receipt commandVerifies a single receipt file from inside Claude Code.
- /audit-chain commandAudits the receipt chain from inside Claude Code, for example the last 20 receipts.
What you need
- Claude Code with the protect-mcp plugin installed
- npx to run protect-mcp and @veritasacta/verify
- A Cedar policy file at ./protect.cedar
Try asking
- Audit the last 20 tool calls recorded in this project's receipts
- Verify this receipt.json against the project's public signing key
- Explain which Bash commands my Cedar policy allows and which it forbids
Good to know
- Cedar string matching uses the raw command or path string, not a resolved path, so it is best-effort.
- A truncated tail, or deletion or reordering in the legacy portion of a mixed log, can go undetected.
- Receipts record the tool name only, not the tool input or output.
- An npm* permit runs arbitrary code and is only as safe as the project's scripts.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: plugins/protect-mcp/skills/protect-mcp-setup/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md9 KB -
references/receipt-format.md4 KB
Alternatives to protect-mcp-setup
All alternatives →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
Compare with function_health, windows-privilege-escalation or github-actions-advanced
protect-mcp-setup: common questions
Can the verifier detect a deleted receipt?
It detects broken hash links between surviving receipts, including interior deletion or reordering. A truncated tail can go undetected, so the source advises keeping an externally retained checkpoint or copy.
Does a receipt include the tool input or output?
No. The PostToolUse hook does not pass the tool input or output to the signer, so a receipt names only the tool.
What happens if there is no policy file?
When PROTECT_MCP_POLICY is unset and ./protect.cedar is missing, the PreToolUse hook prints a warning to stderr and allows the call.
How do I install protect-mcp-setup?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is protect-mcp-setup free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is protect-mcp-setup safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to protect-mcp-setup?
Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.
