sickn33/agentic-awesome-skills/protect-mcp-governance
Claude Code and agent skill by sickn33/agentic-awesome-skills
- community
Checking that the SKILL.md file is still in the repository.
Agent governance skill for MCP tool calls — Cedar policy authoring, shadow-to-enforce rollout, and Ed25519 receipt verification.
Install
npx vskill@latest install sickn33/agentic-awesome-skills/protect-mcp-governanceSKILL.md
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. A valid receipt authenticates the signer’s assertion; it does not independently prove policy execution, timestamp accuracy or execution success.
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
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 Policies
Cedar is a policy language designed for authorization. Policies are evaluated locally via WASM — no network calls required.
Signed Receipts
Every policy decision produces a signed receipt:
The receipt format follows IETF Internet-Draft draft-farley-acta-signed-receipts.
Step-by-Step Guide
1. Initialize Governance for a Project
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:
3. Run in Shadow Mode (Observe First)
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:
Switch to enforce mode:
5. Verify Receipts
Exit codes: 0 = signature valid (proven authentic), 1 = signature invalid (investigate key/input mismatch or tampering), 2 = verifier error (malformed input).
Examples
Example 1: Governance for a Claude Code Session
Explanation: After initialization, every tool call Claude Code makes is logged with a signed receipt. No tool calls are blocked (shadow mode).
Example 2: Restrict a Production MCP Server
Explanation: A production MCP server that serves customer data. Read-only operations are permitted; destructive operations are blocked.
Example 3: Verify an Audit Bundle After an Incident
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).
Best Practices
- ✅ Do: Start in shadow mode and observe before enforcing
- ✅ Do: Use
policy_digestto track which policy version produced each decision - ✅ Do: Store receipts alongside your application logs for correlation
- ✅ Do: Pin the verifier version when integrating into CI (
@veritasacta/verify@0.2.5) - ❌ Don't: Skip shadow mode and go straight to enforce in production
- ❌ Don't: Trust
claimed_issuer_tierwithout independent verification - ❌ Don't: Treat a valid signature as proof the signer is trustworthy — it only proves the receipt has not been tampered with since signing
Troubleshooting
Problem: Receipts fail verification with no_public_key
Symptoms: 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.
Problem: Shadow mode shows unexpected denials
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.
Problem: Enforce mode blocks a legitimate tool call
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.
Related Skills
@security-auditor— General security auditing and compliance@security-audit— Code vulnerability scanning@mcp-development— MCP server development patterns
Additional Resources
- protect-mcp on npm — MIT licensed
- Cedar Policy Language — AWS open-source policy engine
- IETF Draft: Signed Receipts — Receipt format specification
- @veritasacta/verify — Apache-2.0 verifier, works offline
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/protect-mcp-governance/SKILL.md
Popularity
- Repository stars
- 47,056
- Repository forks
- 6,853
- 7-day trend score
- 54
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sickn33/agentic-awesome-skills/protect-mcp-governance)