Listed from the MCP registry; nobody on Odel publishes it.
MCP gateway that checks each agent tool call against a signed grant and policy, and signs a receipt
Runs on your machine from its package; the steps are below.

Not assessed yet.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y @agent-custody/receipts
MCP client config
{
"mcpServers": {
"agent-custody": {
"command": "npx",
"args": [
"-y",
"@agent-custody/receipts"
]
}
}
}Proof of what your AI agents did.
Give your agents real power, without losing control of them. Your policy checks your agent's actions before they run. What it forbids does not run. Each action that it checks leaves a signed receipt that anyone can verify.
An agent cleared an alert, and its own log was the only record. Replayed through agent-custody, the call is denied, and an auditor can prove it. Watch the 30-second film with sound.
agent-custody is infrastructure to authorize the actions of AI agents and to account for them. A gateway sits between your agents and their tools: MCP servers, REST APIs, and other agents over A2A. A person signs a grant that names the agent, its tools, and how long it may act, and a Cedar or Rego policy decides each call before the tool runs, on facts that the gateway looks up itself. Each call, allowed or denied, gets a signed receipt in a Merkle transparency log, and an auditor verifies it offline, with public keys only. A hook brings the same check to Claude Code, and governed memory ties each belief of an agent to the receipt that produced it.
Do you run a website or an API? The door does the same job in front of your own site: put the door in front of a site in about fifteen minutes, with Docker and curl only.
Before you rely on any part, read the threat model. It lists what each part defends, and what it does not.
Prerequisites. Node 22 or later and Bun 1.3 (CI pins 1.3.2). For the Python package, uv with Python 3.10 or later. For the gateway container, Docker. Go, Java, Rust, and Ruby are optional, for the language examples; the tests skip a language whose toolchain is missing.
git clone https://github.com/svayatta/agent-custody && cd agent-custody
bun install
bun run build
bun run demo
bun run build writes each package's dist/; the state package imports receipts from there. The demo sends a support agent's refunds through a real gateway to a stand-in Stripe server. A £500 refund to a verified customer runs; a refund over the limit, a refund to an unverified customer, and a payout outside the grant are refused. An auditor verifies all four receipts with public keys, and a receipt edited afterwards fails. The refund demo walks through the output.
bun run demo:refund runs Demo 1, the refund, on both halves. A shop has the door in front of its refund API and pays through the gateway. A shopping agent with a passport is paid once, even when it retries. Over the limit, or with a forged passport, it is refused at the door. An agent with no passport waits until a person approves that exact refund. An auditor with public keys and a read-only view of Stripe verifies every receipt and finds a refund made in Stripe directly. It needs no key and no network. Tutorial 59 is the source.
bun run demo:admitted runs Demo 3, agent admitted. A marketplace has the door in front of its order API and admits only the agents on its partners list. An agent-commerce company's agent, sending only its signature, is blocked. The company registers the agent at the registry and gets a passport. The door then knows who the agent is and who owns it, and still blocks it, because the marketplace has not listed it. The marketplace finds the agent by searching the registry for a capability and lists it, and the next order goes through. The merchant then verifies every receipt with the door's public key and reads who each agent was, who owns it, and what it did. It needs no key and no network. Tutorial 65 is the source.
npm install @agent-custody/receipts @agent-custody/state
pip install agent-custody
The APIs are in each package's README: receipts, state, and Python, a client of the sidecar (agent-custody serve --config sdk.json). Getting started on the site has every framework and the whole loop from receipt to belief in one file.
In a container. From deploy/gateway, copy .env.example to .env and set AGENT_CUSTODY_GATEWAY_VERSION to a release version; there is no default. Then write a starter config, edit its upstream, and start the gateway on 127.0.0.1:8790. Delete config/demo/ before production. deploy/gateway has the image, its signature, Kubernetes, systemd, and egress lockdown.
mkdir config && sudo chown 10001:10001 config && docker compose --profile init run --rm init
docker compose up -d
From source. At the repository root, after bun install, point an alias at the CLI (with the package installed globally, agent-custody is already the command). Then, in an empty directory, make the gateway's key and a principal's key, and sign a grant. In production the principal's private key stays on the principal's own machine.
alias agent-custody="node $PWD/packages/receipts/src/cli.ts"
agent-custody keygen --dir keys --name gateway && agent-custody keygen --dir keys --name principal
agent-custody grant --key keys/principal.key --principal ops-lead --agent support-agent --scopes orders.refund --ttl-hours 8 --out grant.json
Write policy.cedar (writing policies) and gateway.json, here with one REST tool whose credential comes from the environment (configuring the gateway):
permit(principal, action == Action::"orders.refund", resource) when { context.args.amount <= 100000 };
{
"identity": { "keyFile": "keys/gateway.key" },
"upstream": { "rest": { "baseUrl": "https://api.example.com", "headerEnv": { "authorization": "APP_API_AUTHORIZATION" }, "tools": [{
"name": "orders.refund", "method": "POST", "path": "/v1/orders/{order_id}/refund",
"inputSchema": { "type": "object", "properties": { "order_id": { "type": "string" }, "amount": { "type": "integer" } }, "required": ["order_id", "amount"] } }] } },
"grantFile": "grant.json", "trustedPrincipalKeys": ["keys/principal.pub"], "policyFile": "policy.cedar",
"receiptsDir": "receipts", "logFile": "log.jsonl"
}
Set APP_API_AUTHORIZATION in the environment, check the config, and run the gateway: on stdio, for an MCP host to spawn, or with --http as one shared gateway at http://127.0.0.1:8790/mcp, where each agent presents its own grant.
agent-custody check --config gateway.json --connect
agent-custody gateway --config gateway.json --http
See what the starter deny list would have caught in your last week of Claude Code; this reads local transcripts and writes nothing. Then install the hook, which starts in observe mode and blocks nothing until you say so. Claude Code has the options, the report, and what the hook does not stop.
npx -y @agent-custody/receipts audit-sessions --since 7d
npm install -g @agent-custody/receipts && agent-custody init claude-code
bun run test and bun run typecheck run across the packages. The gate before anything goes to main is bun run ci, with uv pinned to the Python that CI uses. The Python tests run on their own with uv, after bun run build. Working in the repository has the rest.
UV_PYTHON=3.12 bun run ci
cd packages/python && uv run --extra test pytest -q
bun run site:dev
Concepts
Guides
Reference
Operations
Project
| package | what it is |
|---|---|
@agent-custody/receipts | Signed receipts for tool calls: the gateway with Cedar or Rego policy, the Merkle transparency log, the in-process SDK with framework adapters, the door, the egress witness, an OWASP ACS Guardian (a spike), the offline verifier, and the GitHub Action |
agent-custody on PyPI | The Python client of the sidecar, with adapters for LangChain, the OpenAI Agents SDK, the Claude Agent SDK, CrewAI, Google ADK, and Hermes Agent; Go, Java, and Rust clients are in examples/languages |
@agent-custody/state | Governed memory: a fact ledger where every write cites the receipt that caused it, carries valid time and transaction time, and can be superseded or rolled back |
Receipts are the unit. State is the ledger of what the agent came to believe from them. Both append to the same kind of signed log and are checked by the same kind of verifier.
Report a vulnerability privately to partha@charioteerconsulting.com; SECURITY.md has the scope, the response times, and how keys and tokens are protected. The threat model lists what each part defends, and what it does not.
CONTRIBUTING.md has the commands, the layout, and the rules for a change. Every change lands by pull request. agent-custody is licensed under Apache-2.0.