agent-custody — Claude Code MCP server: audit and setup
Checks agent tool calls against signed grants and policy, then issues signed receipts. Use it when actions need an offline-verifiable audit trail.
claude mcp add receipts -- npx -y @agent-custody/receiptsWhat agent-custody does
agent-custody can sit between an agent and the systems it may affect, including MCP servers, REST APIs exposed as tools, and agents reached through A2A. For every allowed or denied call, the gateway checks a signed delegation grant, requests human approval for exact arguments when required, evaluates a Cedar policy, and forwards the call only after an allow decision. It then appends a signed receipt to a Merkle transparency log.
The package also includes an SDK interceptor for calls made inside the agent process. It has Claude Code hooks and adapters for several agent SDKs, while marking those receipts as self-reported. Anyone with the public keys can verify a receipt offline; selected call fields can be withheld as commitments or encrypted with a chosen key.
The SDK package requires Node 22 or later and @agent-custody/receipts. Create a signing key with npx agent-custody keygen. Node 22 or later is required for the published package.
What it helps with
- check each tool call against a signed delegation grant
- append allowed and denied actions to a Merkle log
- verify receipts offline with public keys
- enforce Cedar policy before forwarding a call
- withhold or encrypt selected call fields
Example prompts for the agent
- Use
receiptsto inspect this tool call and issue a signed receipt. - Show me how to verify the agent’s recorded actions offline with a public key.
- Route this delegated action through the Cedar policy and allow it only after the grant check passes.
How to install agent-custody
Platform CLI
claude mcp add receipts -- npx -y @agent-custody/receiptsPlatform CLI
codex mcp add receipts -- npx -y @agent-custody/receiptsConfig file
{
"mcpServers": {
"receipts": {
"command": "npx",
"args": [
"-y",
"@agent-custody/receipts"
]
}
}
}Config file
{
"servers": {
"receipts": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@agent-custody/receipts"
]
}
}
}Platform CLI
gemini mcp add receipts npx -y @agent-custody/receiptsStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about agent-custody
How do I install agent-custody in Claude Code?
Run claude mcp add receipts -- npx -y @agent-custody/receipts.
What does agent-custody do?
It checks agent tool calls against signed grants and a Cedar policy, forwards calls after an allow decision, and produces signed receipts that can be audited offline.
What does agent-custody require?
The SDK package requires Node 22 or later. Signing receipts also requires a key generated with npx agent-custody keygen --dir keys --name app.