protect-mcp-governance
यह क्या करती है
यह टूल तय करता है कि AI agent कौन-से काम कर सकता है, और हर काम का सुरक्षित लॉग रखता है। यह नियमों (policies) से तय करता है कि कोई action मंजूर है या नहीं, और हर फैसले का एक signed रिकॉर्ड (receipt) बनाता है।
कब इस्तेमाल करें
- ✓जब आप तय करना चाहें कि AI agent कौन-से tools इस्तेमाल कर सकता है।
- ✓जब आपको agent के कामों का सुरक्षित, छेड़छाड़ से बचा हुआ लॉग चाहिए।
- ✓जब आप नए सुरक्षा नियमों को असल में लागू करने से पहले परखना चाहें।
Skill का लिंक
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 में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“एक्सेस कंट्रोल सेट करो ताकि agent सिर्फ 'data' फोल्डर की फाइलें पढ़ सके।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह टूल उन calls को रोककर देखता है जो AI agent दूसरे tools को करता है। फिर इन calls को आपके बनाए नियमों से मिलाता है। अगर call मंजूर है, तो यह एक signed digital receipt बनाता है, जो साबित करती है कि action हुआ और उसे मंजूरी मिली थी।
तकनीकी सामग्री (मूल 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 policies' क्या हैं?
ये वे नियम हैं जो आप AI agent को बताते हैं कि वह क्या कर सकता है और क्या नहीं। ये Cedar नाम की एक खास भाषा में लिखे जाते हैं।
'signed receipt' क्या है?
यह एक digital रिकॉर्ड है जो साबित करता है कि किसी खास policy के तहत कोई action मंजूर हुआ या ठुकराया गया। इस पर digital signature होता है, इसलिए बाद में इसमें बदलाव नहीं किया जा सकता।
'shadow mode' और 'enforce mode' में क्या फर्क है?
'shadow mode' में टूल सिर्फ देखता और लॉग करता है कि नियम लागू होते तो क्या होता, वह actions को रोकता नहीं। 'enforce mode' में जो action नियम तोड़ता है, उसे सच में ब्लॉक कर दिया जाता है।
जानकारी
लेखक का मूल विवरण
Agent governance skill for MCP tool calls — Cedar policy authoring, shadow-to-enforce rollout, and Ed25519 receipt verification.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #5530
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।