protect-mcp-governance
できること
このツールは、AIエージェントが実行できる操作を制御し、それらの操作が安全に記録されるようにします。「ポリシー」と呼ばれるルールを使って操作を許可するかどうかを判断し、each decisionごとに署名付きの記録(レシート)を作成します。
使う場面
- ✓AIエージェントがどのツールを使えるかを定義したいとき。
- ✓エージェントの操作について、安全で改ざんを検知できるログが必要なとき。
- ✓新しいセキュリティルールを実際に適用する前にテストしたいとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/protect-mcp-governance/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“エージェントが「data」フォルダ内のファイルだけを読み取れるように、アクセス制御を設定してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このツールは、AIエージェントが他のツールを呼び出す際の要求を横取りします。その要求を、あなたが定義したルールと照合します。要求が許可されると、署名付きのデジタルレシートを作成し、その操作が行われ承認されたことを証明します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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
…
よくある質問
「Cedarポリシー」とは何ですか?
AIエージェントに何をしてよく、何をしてはいけないかを指示するルールです。Cedarという専用の言語で書かれます。
「署名付きレシート」とは何ですか?
特定のポリシーによって操作が許可または拒否されたことを示すデジタルの記録です。デジタル署名が付いているため、後から改ざんされていないことを確認できます。
「シャドウモード」と「エンフォースモード」の違いは何ですか?
シャドウモードでは、ルールを適用した場合に何が起こるかを観察して記録するだけで、操作はブロックしません。エンフォースモードでは、ルールに違反する操作が実際にブロックされます。
詳細
作者による元の説明
Agent governance skill for MCP tool calls — Cedar policy authoring, shadow-to-enforce rollout, and Ed25519 receipt verification.
人気
- GitHubのスター
- 48k
- ランキング
- #5530
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。