Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
wshobson avatar

Protect Mcp Setup

  • 3.8k installs
  • 38.5k repo stars
  • Updated July 22, 2026
  • wshobson/agents

A Cedar policy and Ed25519-signed receipt system that cryptographically records and enforces authorization on every Claude Code tool invocation.

About

protect-mcp adds cryptographic governance to Claude Code by intercepting every tool call (Bash, Edit, Write, WebFetch) with Cedar policy enforcement and Ed25519-signed receipts. Policies are evaluated before execution; denials block the tool outright. Each decision produces a tamper-evident, hash-chained receipt verifiable offline via @veritasacta/verify. Receipts record tool name, input/output hashes, decision, policy digest, and timestamp. No external server required. Designed for regulated environments (finance, healthcare, research) where audit trails must survive third-party verification without trusting the operator.

  • Cedar policy enforcement gates every tool call before execution
  • Ed25519-signed receipts with hash-chain integrity
  • Offline verification via @veritasacta/verify CLI
  • PreToolUse and PostToolUse hooks in .claude/settings.json
  • JCS canonicalization and RFC 8032 signatures

Protect Mcp Setup by the numbers

  • 3,825 all-time installs (skills.sh)
  • +156 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #206 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

protect-mcp-setup capabilities & compatibility

Capabilities
cedar policy evaluation on tool invocation · ed25519 signature generation and verification · hash chained receipt storage · pretooluse/posttooluse hook integration · offline receipt verification · policy digest recording · input/output hashing · timestamp and parent receipt linking
Works with
github
Use cases
security audit
From the docs

What protect-mcp-setup says it does

For compliance contexts (finance, healthcare, regulated research), this is not sufficient. You need tamper-evident evidence that can be verified by third parties without trusting you.
SKILL.md#Problem
npx skills add https://github.com/wshobson/agents --skill protect-mcp-setup

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3.8k
repo stars38.5k
Security audit1 / 3 scanners passed
Last updatedJuly 22, 2026
Repositorywshobson/agents

What it does

Enforce Cedar policies and Ed25519-signed audit trails on Claude Code tool calls for compliance-ready governance.

Who is it for?

Regulated industries (finance, healthcare, research), compliance-required agent deployments, environments requiring cryptographic proof of authorization decisions.

Skip if: Non-compliance-critical projects, systems that cannot afford per-tool-call latency overhead, teams unfamiliar with policy-as-code or cryptographic receipt concepts.

When should I use this skill?

Setting up Claude Code projects that need audit trails, policy-gated tool execution, third-party-verifiable evidence, or compliance readiness.

What you get

Every tool call is evaluated against a Cedar policy before execution and produces an offline-verifiable, hash-chained, Ed25519-signed receipt that third parties can audit without trusting the operator.

  • protect-mcp npm package installation
  • .claude/settings.json hook configuration
  • ./protect.cedar policy file

By the numbers

  • 10K+ monthly npm downloads (protect-mcp v0.5.5)
  • Ed25519 RFC 8032 standard
  • JCS RFC 8785 deterministic canonicalization

Files

SKILL.mdMarkdownGitHub ↗

protect-mcp — Policy Enforcement + Signed Receipts

Cryptographic governance for every Claude Code tool call. Each invocation is evaluated against a Cedar policy and produces an Ed25519-signed receipt that anyone can verify offline.

Overview

Claude Code runs powerful tools: Bash, Edit, Write, WebFetch. By default there is no audit trail, no policy enforcement, and no way to prove what was decided after the fact. protect-mcp closes all three gaps:

  • Cedar policies (AWS's open authorization engine) evaluate every tool call

before execution. Cedar deny is authoritative.

  • Ed25519 receipts record each decision with its inputs, the policy that

governed it, and the outcome. Receipts are hash-chained.

  • Offline verification via npx @veritasacta/verify. No server, no account,

no trust in the operator.

Problem

AI agents make decisions that affect money, safety, and rights. The Claude Code session log records what happened, but the log is:

  • Mutable — anyone with access can edit it
  • Unsigned — there is no way to prove integrity
  • Operator-bound — verification requires trusting whoever holds the log

For compliance contexts (finance, healthcare, regulated research), this is not sufficient. You need tamper-evident evidence that can be verified by third parties without trusting you.

Solution

Add protect-mcp to your Claude Code project:

# 1. Install the plugin (adds hooks + skill to your project)
claude plugin install wshobson/agents/protect-mcp

# 2. Configure hooks in .claude/settings.json (see below)

# 3. Start the receipt-signing server (runs locally, no external calls)
npx protect-mcp@latest serve --enforce

# 4. Use Claude Code normally. Every tool call is now policy-evaluated
#    and produces a signed receipt in ./receipts/

Hook Configuration

Add the following to your project's .claude/settings.json:

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": ".*",
        "hook": {
          "type": "command",
          "command": "npx protect-mcp@latest evaluate --policy ./protect.cedar --tool \"$TOOL_NAME\" --input \"$TOOL_INPUT\" || exit 2"
        }
      }
    ],
    "PostToolUse": [
      {
        "matcher": ".*",
        "hook": {
          "type": "command",
          "command": "npx protect-mcp@latest sign --tool \"$TOOL_NAME\" --input \"$TOOL_INPUT\" --output \"$TOOL_OUTPUT\" --receipts ./receipts/"
        }
      }
    ]
  }
}

What each hook does

PreToolUse — Runs BEFORE the tool executes. Evaluates the tool call against your Cedar policy file. If Cedar returns deny, the hook exits with code 2 and Claude Code blocks the tool call entirely.

PostToolUse — Runs AFTER the tool completes. Signs a receipt containing the tool name, input hash, output hash, decision, policy digest, and timestamp. Writes the receipt to ./receipts/<timestamp>.json.

Cedar Policy File

Create ./protect.cedar at the project root:

// Allow read-only tools by default
permit (
    principal,
    action in [Action::"Read", Action::"Glob", Action::"Grep", Action::"WebFetch"],
    resource
);

// Require explicit allow for destructive tools
permit (
    principal,
    action == Action::"Bash",
    resource
) when {
    // Allow safe commands only
    context.command_pattern in ["git", "npm", "ls", "cat", "echo", "pwd", "test"]
};

// Never allow recursive deletion
forbid (
    principal,
    action == Action::"Bash",
    resource
) when {
    context.command_pattern == "rm -rf"
};

// Require confirmation for writes outside the project
forbid (
    principal,
    action in [Action::"Edit", Action::"Write"],
    resource
) when {
    context.path_starts_with != "."
};

Verification

Verify a single receipt:

npx @veritasacta/verify receipts/2026-04-15T10-30-00Z.json
# Exit 0 = valid
# Exit 1 = tampered
# Exit 2 = malformed

Verify the entire chain:

npx @veritasacta/verify receipts/*.json

Use the plugin's slash commands from within Claude Code:

/verify-receipt receipts/latest.json
/audit-chain ./receipts/ --last 20

Receipt Format

Each receipt is a JSON file with this structure:

{
  "receipt_id": "rec_8f92a3b1",
  "receipt_version": "1.0",
  "issuer_id": "claude-code-protect-mcp",
  "event_time": "2026-04-15T10:30:00.000Z",
  "tool_name": "Bash",
  "input_hash": "sha256:a3f8...",
  "decision": "allow",
  "policy_id": "autoresearch-safe",
  "policy_digest": "sha256:b7e2...",
  "parent_receipt_id": "rec_3d1ab7c2",
  "public_key": "4437ca56815c0516...",
  "signature": "4cde814b7889e987..."
}
  • Ed25519 signatures (RFC 8032)
  • JCS canonicalization (RFC 8785) before signing
  • Hash-chained to the previous receipt via parent_receipt_id
  • Offline verifiable — no network call, no vendor lookup

Why This Matters

BeforeAfter
"Trust me, the agent only read files"Cryptographically provable: every Read logged and signed
"The log shows it happened"The receipt proves it happened, and no one can edit it
"You'd have to audit our system"Anyone can verify every receipt offline
"Logs might be different by now"Ed25519 signatures lock the record at signing time

Standards

  • Ed25519 — RFC 8032 (digital signatures)
  • JCS — RFC 8785 (deterministic JSON canonicalization)
  • Cedar — AWS's open authorization policy language
  • IETF draftdraft-farley-acta-signed-receipts

Related

Related skills

How it compares

Compared to unsigned session logs or operator-controlled audit systems, protect-mcp provides cryptographic proof via Ed25519 that survives offline verification and third-party audit without trusting the operator.

FAQ

What does protect-mcp-setup enforce on Claude Code?

protect-mcp-setup configures Cedar policy evaluation and Ed25519-signed receipts for Claude Code tools including Bash, Edit, Write, and WebFetch, gating each invocation and recording verifiable evidence of allow or deny decisions.

Can protect-mcp-setup receipts be verified offline?

protect-mcp-setup issues Ed25519-signed receipts for every evaluated tool call that anyone can verify offline, providing cryptographic proof of policy decisions without relying on live server logs.

Is Protect Mcp Setup safe to install?

skills.sh reports 1 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

AI & Agent Buildingauditcompliance

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.