Drop-in policy proxy that adds verifiable delegation to MCP and A2A without rewriting your agents.
Before: Agent --> MCP Server
After: Agent --> AIP Gateway --> MCP Server
pip install aip-gateway
aip-gateway serve --policy policy.yamlOr with Docker:
docker run -v ./policy.yaml:/etc/aip-gateway/policy.yaml -p 8090:8090 sunilp/aip-gatewayThe gateway sits between your agents and MCP servers. Every request is verified:
- Token verification -- Ed25519 signature check against trusted keys
- Policy evaluation -- agent scope, delegation depth, budget limits, workflow rules
- Header injection -- upstream gets verified caller identity (no SDK needed)
- Audit logging -- every allow/deny decision in JSONL
gateway:
upstream: http://localhost:8080
port: 8090
trust_keys:
- z6MkYourTrustKeyHere...
agents:
credit-scorer:
identity: "aip:key:ed25519:zScorer..."
can_delegate:
- tool:check_credit
max_depth: 0
rules:
- action: tool:approve_loan
requires:
- tool:check_credit
- tool:assess_risk
deny_if:
- same_actor: [credit-scorer, loan-approver]cd examples/loan_origination
python run_demo.pyFour scenarios showing scope enforcement, prerequisite checking, and maker-checker separation:
Scenario 1: Valid chain -> ALLOW (proper segregation of duties)
Scenario 2: Scope violation -> DENY (scorer cannot approve loans)
Scenario 3: Missing prerequisite -> DENY (no approval without due diligence)
Scenario 4: Same-actor -> DENY (maker-checker separation enforced)
AIP prevents an AI agent from turning credit scoring authority into loan approval authority.
After verification, the gateway injects identity headers into forwarded requests:
X-AIP-Verified: true
X-AIP-Issuer: aip:key:ed25519:zOrchestrator...
X-AIP-Subject: aip:key:ed25519:zScorer...
X-AIP-Scope: tool:check_credit
X-AIP-Depth: 1
Your MCP server reads these without any AIP SDK dependency.
aip-gateway serve --policy policy.yaml # Start the proxy
aip-gateway validate --policy policy.yaml # Check policy syntax
aip-gateway version # Show version- Paper: arXiv:2603.24775
- IETF: draft-prakash-aip-00
- Spec: sunilprakash.com/aip/
- TypeScript SDK: @aip-sdk on npm
- Python SDK: agent-identity-protocol on PyPI
Apache 2.0