본문으로 건너뛰기
Skillpedia
에이전트48k · #5530

protect-mcp-governance

하는 일

이 도구는 AI 에이전트가 수행할 수 있는 행동을 통제하고, 그 행동이 안전하게 기록되도록 합니다. 정책(규칙)을 사용해 행동이 허용되는지 판단하고, 각 결정에 대해 서명된 기록(영수증)을 만듭니다.

사용하는 경우

  • ✓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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/protect-mcp-governance/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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:

  1. Shadow mode (default) — logs decisions without blocking. Use this to observe what your policies would do before enforcing them.
  2. Enforce mode — blocks tool calls that violate policy. Use after shadow-mode validation.
  3. 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.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5530
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬