protect-mcp-governance
What it does
This tool helps control which actions an AI agent can perform and ensures these actions are securely logged. It uses rules (policies) to decide if an action is allowed and creates a signed record (receipt) of each decision.
When to use it
- βWhen you want to define which tools an AI agent can use.
- βWhen you need a secure, tamper-evident log of the agent's actions.
- βWhen you want to test new security rules before actually enforcing them.
Skill link
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/protect-mcp-governance/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βSet up access control so the agent can only read files in the 'data' folder.β
5 new skills a week. 1 minute to read.
How it works
The tool intercepts calls the AI agent makes to other tools. It checks these calls against rules you define. If the call is allowed, it creates a signed digital receipt to prove the action happened and was approved.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
MCP Agent Governance with protect-mcp
Overview
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.
When to Use This Skill
- Use when you need to control which MCP tools an agent can call and under what conditions
- Use when you want a tamper-evident audit trail for agent tool executions
- Use when rolling out governance policies gradually (shadow mode first, then enforce)
- Use when authoring Cedar policies for MCP tool access control
- Use when verifying that a receipt or audit bundle has not been tampered with
Do Not Use This Skill
- When you need general application security auditing (use
@security-auditor) - When you need to scan code for vulnerabilities (use
@security-audit) - When you need compliance framework guidance without agent-specific governance
How It Works
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. The receipt is a cryptographic proof that a specific policy was evaluated against a specific tool call at a specific time.
Agent β protect-mcp β Cedar policy evaluation β MCP Server
β
Ed25519 signed receipt
Three modes of operation:
- Shadow mode (default) β logs decisions without blocking. Use this to observe what your policies would do before enforcing them.
- Enforce mode β blocks tool calls that violate policy. Use after shadow-mode validation.
- Hooks mode β integrates with Claude Code hooks for pre/post tool-call governance.
Core Concepts
Cedar Policies
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")
};
Signed Receipts
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.
Step-by-Step Guide
1. Initialize Governance for a Project
# 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.
2. Write Your First Policy
Create policy.cedar in your project:
// Start permissive β allow everything in shadow mode
permit(
principal,
action == Action::"call_tool",
resource
);
3. Run in Shadow Mode (Observe First)
# 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.
4. Tighten and Enforce
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/*"
};
// Deny everything else
forbid(
principal,
action == Action::"call_tool",
resource
);
Switch to enforce mode:
npx protect-mcp --policy policy.cedar --enforce -- node your-mcp-server.js
5. Verify Receipts
# Verify a single receipt
β¦
FAQ
What are 'Cedar policies'?
These are the rules you write to tell the AI agent what it can and cannot do. They are written in a specific language called Cedar.
What is a 'signed receipt'?
It's a digital record that proves an action was allowed or denied by a specific policy. It's digitally signed to ensure it cannot be altered later.
What's the difference between 'shadow mode' and 'enforce mode'?
In 'shadow mode', the tool only observes and logs what would happen if the rules were applied, without blocking actions. In 'enforce mode', actions that violate the rules are actually blocked.
Details
Original description by the author
Agent governance skill for MCP tool calls β Cedar policy authoring, shadow-to-enforce rollout, and Ed25519 receipt verification.
Popularity
- GitHub stars
- 48k
- Ranking position
- #5530
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
00-andruia-consultant
48kHelps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
007
48kLets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
10-andruia-skill-smith
48kHelps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
20-andruia-niche-intelligence
48kLets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.