/agentic-awesome-skills:protect-mcp-governancefrom agentic-awesome-skills
Governs MCP tool calls with Cedar policies, shadow-to-enforce rollout, and Ed25519 signed receipt verification. Use for access control and tamper-evident audit trails on agent tool executions.
Ships in agentic-awesome-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Guidance for governing AI agent tool calls using Cedar policies and Ed25519 signed receipts. This skill teaches how to write access-control policies for MCP servers, run them in shadow mode for observation, and verify the cryptographic audit trail.
@security-auditor)@security-audit)protect-mcp intercepts MCP tool calls, evaluates them against Cedar policies (the same policy engine used by AWS Verified Permissions), and signs every decision as an Ed25519 receipt. A valid receipt authenticates the signer’s assertion; it does not independently prove policy execution, timestamp accuracy or execution success.
Agent → protect-mcp → Cedar policy evaluation → MCP Server
↓
Ed25519 signed receipt
Three modes of operation:
Use an approved pinned package version and confirm its actual CLI/config schema before installation. The examples depend on the gateway’s entity schema: validate attribute types and allowed/denied/error cases. Canonicalize paths and resolve symlinks in trusted gateway code before policy evaluation; a src/* string match alone does not prevent traversal. Shadow mode supplies observation, not protection. Changing hooks or enforcement requires the project owner’s authorization.
Cedar is a policy language designed for authorization. Policies are evaluated locally via WASM — no network calls required.
// Allow read-only file operations
permit(
principal,
action == Action::"call_tool",
resource
) when {
resource.tool_name in ["read_file", "list_directory", "search_files"]
};
// Deny destructive operations
forbid(
principal,
action == Action::"call_tool",
resource
) when {
resource.tool_name in ["execute_command", "delete_file", "write_file"]
&& resource has args
&& resource.args.contains("rm -rf")
};
Every policy decision produces a signed receipt:
{
"payload": {
"type": "protectmcp:decision",
"tool_name": "read_file",
"decision": "allow",
"policy_digest": "sha256:9d0fd4c9e72c1d5d",
"issued_at": "2026-04-05T14:32:04.102Z",
"issuer_id": "sb:issuer:de073ae64e43"
},
"signature": {
"alg": "EdDSA",
"kid": "sb:issuer:de073ae64e43",
"sig": "2a3b5022..."
}
}
The receipt format follows IETF Internet-Draft draft-farley-acta-signed-receipts.
# Install and initialize hooks (Claude Code integration)
npx protect-mcp init-hooks
# Or run as a standalone MCP gateway
npx protect-mcp serve
This creates a protect-mcp.config.json and a starter Cedar policy in your project root.
Create policy.cedar in your project:
// Start permissive — allow everything in shadow mode
permit(
principal,
action == Action::"call_tool",
resource
);
# Shadow mode is the default — logs decisions without blocking
npx protect-mcp --policy policy.cedar -- node your-mcp-server.js
Review the shadow log to understand what your agent is doing before writing restrictive policies.
Once you understand the tool-call patterns, write specific policies:
// Allow file reads, deny writes outside src/
permit(
principal,
action == Action::"call_tool",
resource
) when {
resource.tool_name == "read_file"
};
permit(
principal,
action == Action::"call_tool",
resource
) when {
resource.tool_name == "write_file"
&& resource has args
&& resource.args.path like "src/*"
};
// No matching permit means deny by default. Do not add an unconditional forbid:
// it would override both permits above.
Switch to enforce mode:
npx protect-mcp --policy policy.cedar --enforce -- node your-mcp-server.js
# Verify a single receipt
npx @veritasacta/verify receipt.json --key <public-key-hex>
# Verify an audit bundle (multiple receipts + keys)
npx @veritasacta/verify bundle.json --bundle
# Self-test the verifier (proves it works offline)
npx @veritasacta/verify --self-test
Exit codes: 0 = signature valid (proven authentic), 1 = signature invalid (investigate key/input mismatch or tampering), 2 = verifier error (malformed input).
# Initialize hooks
npx protect-mcp init-hooks
# Claude Code now generates a signed receipt for every tool call.
# Receipts are stored in .protect-mcp/receipts/
Explanation: After initialization, every tool call Claude Code makes is logged with a signed receipt. No tool calls are blocked (shadow mode).
// Only allow approved tools; rate limiting requires separate gateway controls
permit(
principal,
action == Action::"call_tool",
resource
) when {
resource.tool_name in [
"get_customer",
"search_orders",
"list_products"
]
};
forbid(
principal,
action == Action::"call_tool",
resource
) when {
resource.tool_name in [
"delete_customer",
"modify_payment",
"execute_sql"
]
};
Explanation: A production MCP server that serves customer data. Read-only operations are permitted; destructive operations are blocked.
# Export the session's audit bundle
npx protect-mcp export-bundle --session sess_abc123 --out audit.json
# Verify every receipt in the bundle
npx @veritasacta/verify audit.json --bundle
# Expected output:
# ✓ Bundle: VALID
# Total: 47
# Passed: 47
# Failed: 0
Explanation: After an incident, export the audit bundle and verify that no receipts have been tampered with. The bundle contains all receipts from the session plus the public verification keys (never private signing keys).
policy_digest to track which policy version produced each decision@veritasacta/[email protected])claimed_issuer_tier without independent verificationno_public_keySymptoms: npx @veritasacta/verify receipt.json returns exit 2 with no_public_key
Solution: Provide the public key explicitly: --key <64 hex chars>. The receipt does not embed the public key by default. Check protect-mcp.config.json for the issuer's public key.
Symptoms: Shadow log shows deny decisions for tools you expected to be allowed
Solution: Cedar policy order does not resolve conflicts: any matching forbid overrides a permit. Inspect determining policies and schema errors.
Symptoms: Agent reports a tool call was denied after switching to enforce mode Solution: Inspect the denial and intended authorization first. A new permit cannot override a matching forbid. Have the policy owner approve the narrow correction; do not disable enforcement merely to get a call through.
@security-auditor — General security auditing and compliance@security-audit — Code vulnerability scanning@mcp-development — MCP server development patternsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
mcp-governance, cedar-policies, ed25519, shadow-mode, access-control
npx claudepluginhub krishnakanthb13/antigravity-awesome-skills --plugin agentic-awesome-skills3 plugins in 2 repositories ship this exact skill · first indexed Oct 23, 2026
2,799 skills in this plugin
/007Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project./00-andruia-consultantUsar al iniciar o mejorar un proyecto de IA: diagnostica código y restricciones, propone skills existentes y redacta tareas y un plan de implementación en español./10-andruia-skill-smithUsar para crear o mejorar una skill de Andru.ia: define entradas y resultados, redacta SKILL.md con ejemplos y límites, valida la estructura y prepara una PR.Other plugins' skills for the same job