Run a real policy decision and verify its signed receipt
This runs the built-in local demo, then verifies its receipt chain offline.
npx -y @agentguard-run/[email protected] demo && npx -y @agentguard-run/[email protected] verify
The built-in demo reports the decision and verifier checks separately:
status BLOCKED
saved +$622.41
✓ spend cap enforced
✓ receipt tamper-evident
✓ provider never charged
entries 1
policy agentguard-demo-policy-v1
action block
✓ full chain valid
✓ entry hashes match canonical JSON
✓ signatures match supplied public key
✓ no sequence gaps (ledger appears complete)
The source manifest identifies version 0.16.0. The source constant used by some internal version output still says 0.15.12, so the manifest is the version authority for this instruction.
Add the local MCP server to this Claude Code project
Run this in the project where Claude Code should see AgentGuard. The server communicates over local standard input and output.
npm install -D @agentguard-run/[email protected] && claude mcp add -s local agentguard node ./node_modules/@agentguard-run/mcp/dist/index.js
A connected local registration is reported in this form:
agentguard:
Scope: Local config (private to you in this project)
Status: ✔ Connected
Type: stdio
Command: node
Args: ./node_modules/@agentguard-run/mcp/dist/index.js
Important: MCP exposes spend_decide, receipt verification, export, pricing, provenance preview, and status tools. MCP alone does not force every host or model call through spend_decide. Use the SDK wrapper or a mandatory host hook when you need an unavoidable brake.
The rogue agent hits every line
This recording is a deterministic SDK run. Its fixture blocks $96.00 of projected API spend. Separately, it blocks a simulated $9,000.00 wire because the declared capability is insufficient. A zero-cap policy blocks later calls, the receipt chain verifies, and a tampered receipt fails.