AIConnect
03 — Custom AI Agents
October 08, 2026
16 min read

Architecting Fine-Grained Model Context Protocol (MCP) Prompt & Resource Access Control with Cedar Policy Decision Points and Amazon Bedrock

Fine-Grained Prompt Template Delegation, Resource URI Authorization, Zero-Trust Cedar Policies, and Sub-10ms Bedrock Agent Access Gates

S
Sarah Jenkins
Staff DevOps & Cloud AI Engineer

1. The MCP Prompt & Resource Governance Challenge

While early adoption of Anthropic's Model Context Protocol (MCP) focused heavily on tool execution (tools/call), enterprise production deployments must equally govern access to MCP prompts (prompts/get) and resources (resources/read). In multi-tenant environments, MCP resources expose live data streams, file systems, database schemas (e.g. postgres://tenant/orders), and sensitive system prompt templates.

Allowing autonomous LLM agents or unprivileged user sessions to freely inspect arbitrary resource URIs or request administrative prompt templates introduces severe confidentiality and data leak risks. Enforcing true Zero-Trust governance requires validating every single MCP resource request and prompt invocation against a central Policy Decision Point (PDP) like Amazon Verified Permissions (AVP), using expressive Cedar policy language clauses.

By pairing the open Model Context Protocol (MCP) specification with Amazon Verified Permissions and Amazon Bedrock Agents, enterprise platform teams enforce sub-10ms fine-grained access control across all prompt templates and resource URIs. Explore AIConnect's specialized Custom Multi-Agent Orchestration Engine, Security & DevSecOps Solutions, and AWS AI Cloud Automation Architecture.

2. Architecture: MCP Resource Proxy & Cedar Policy PDP

The Zero-Trust MCP resource governance proxy interposes an authorization gateway between client agent orchestrators and underlying MCP resource servers:

// Fine-Grained MCP Prompt & Resource Governance Topology
[Amazon Bedrock Agent] ──(JSON-RPC: resources/read URI)──► [MCP Resource Security Proxy]
                                                                     │
                                                                     ├─► Evaluates [Amazon Verified Permissions] (Cedar PDP)
                                                                     │
                                                                     └─► (Permit / Deny Evaluation)
                                                                             │
                                                                             ▼
                                                                     [Target MCP Resource / Prompt Server]

3. Cedar Schema for MCP Prompts, Resources, and Tools

Cedar policies evaluate principal identities, action types (read_resource, get_prompt, execute_tool), and resource URIs with pattern matching:

mcp_governance.cedar — Fine-Grained Cedar Resource Policy Cedar 3.0
// Permit Finance Agents to read financial resource URIs matching their tenant ID
permit (
    principal in AIConnect::AgentGroup::"finance-auditors",
    action == MCP::Action::"read_resource",
    resource
)
when {
    resource.uri.like("s3://finance-data-lake/tenants/*") &&
    context.tenant_id == resource.tenant_id
};

// Permit Admin users to fetch system initialization prompt templates
permit (
    principal in AIConnect::UserGroup::"platform-admins",
    action == MCP::Action::"get_prompt",
    resource == MCP::Prompt::"system_admin_remediation_v1"
);

4. Resource URI Scoping & Bedrock Guardrail Interception

When an agent requests an MCP resource payload via URI (e.g. postgres://tenant-a/financial_records), the MCP Gateway checks Cedar permissions before fetching content. Once retrieved, the text stream is passed through Amazon Bedrock Guardrails to mask any residual PII (SSNs, credit card numbers, secret keys) prior to prompt inclusion.

5. Production Python Implementation: MCP Resource & Prompt Access Gateway

Below is a complete Python implementation demonstrating an MCP proxy that evaluates Cedar authorization policies for prompt and resource requests:

mcp_resource_gateway.py — Resource & Prompt Access Control Python 3.11 / Boto3 / AVP / MCP
import json
import boto3
from typing import Dict, Any

class MCPResourceAccessGateway:
    def __init__(self, policy_store_id: str, region_name: str = "us-east-1"):
        self.avp = boto3.client("verifiedpermissions", region_name=region_name)
        self.policy_store_id = policy_store_id

    def authorize_resource_read(self, agent_id: str, resource_uri: str, tenant_id: str) -> bool:
        print(f"🔐 [MCP Resource Gateway] Evaluating access for agent '{agent_id}' to URI '{resource_uri}'...")
        try:
            response = self.avp.is_authorized(
                policyStoreId=self.policy_store_id,
                principal={"entityType": "AIConnect::Agent", "entityId": agent_id},
                action={"actionType": "MCP::Action", "actionId": "read_resource"},
                resource={"entityType": "MCP::Resource", "entityId": resource_uri},
                context={
                    "contextMap": {
                        "tenant_id": {"string": tenant_id}
                    }
                }
            )

            decision = response.get("decision")
            if decision == "ALLOW":
                print(f"✓ [AVP ALLOW] Resource URI '{resource_uri}' access granted.")
                return True
            else:
                print(f"🚨 [AVP DENY] Resource URI '{resource_uri}' access rejected.")
                return False

        except Exception as e:
            print(f"🚨 [AVP Error] Authorization check failed: {e}")
            return False

if __name__ == "__main__":
    gateway = MCPResourceAccessGateway(policy_store_id="ps-a1b2c3d4e5f6")
    allowed = gateway.authorize_resource_read(
        agent_id="finance-auditor-agent-01",
        resource_uri="s3://finance-data-lake/tenants/tenant-101/ledger.csv",
        tenant_id="tenant-101"
    )
    print("Resource Read Authorized:", allowed)

6. Architectural Takeaways & Enterprise Security Services

Enforcing fine-grained access control across Model Context Protocol (MCP) prompts and resource URIs using Cedar Policy Decision Points (PDP) ensures comprehensive zero-trust boundary protection for enterprise multi-agent networks.

Looking to implement fine-grained Model Context Protocol (MCP) resource security or deploy Cedar policy authorization? Explore our Custom AI Agents Service Page and Security & DevSecOps Solutions Page, or reach out to our principal cloud security architects.

Indexed Topics & Tech Keywords
#Model Context Protocol#MCP Prompts & Resources#Cedar Policy Language#Amazon Verified Permissions#Amazon Bedrock Agents#Zero-Trust AI#MCP Security

Related Deep-Dive Articles