Documentation Index
Fetch the complete documentation index at: https://docs.mandate.md/llms.txt
Use this file to discover all available pages before exploring further.
How to integrate Mandate
Mandate supports three integration patterns. Each one enforces the same policy checks (spend limits, allowlists, approval workflows, reason scanning) but differs in how your agent connects.Hook-based (zero code changes)
Hooks intercept financial tool calls automatically. Your agent does not need to callvalidate() explicitly. The plugin watches for transaction-related commands and blocks them until Mandate approves.
Two plugins use this pattern:
- Claude Code Plugin: Installs as a Claude Code plugin. PreToolUse hook blocks Bash commands and MCP tools that contain wallet keywords. PostToolUse hook records validation tokens. Two-phase, fail-closed, no network calls in the gate.
- OpenClaw Plugin: Installs via
openclaw plugin install. Registers amessage:preprocessedhook that intercepts financial tool calls (Locus, Bankr, Sponge, any swap/transfer/send) even if the agent skipsmandate_validate.
SDK-based (explicit calls)
Your agent callsvalidate() before every transaction. You add the Mandate SDK or a framework-specific plugin to your code and invoke it at the right moment. This works with any wallet.
Available SDK integrations:
- TypeScript SDK:
MandateClientfor validation,MandateWalletfor the full validate-sign-broadcast flow. - GOAT Plugin:
@Tool()decorator pattern. Transfer and x402 payment actions with built-in validation. - AgentKit Provider: Coinbase AgentKit
WalletProviderandActionProviderthat wrap Mandate validation. - ElizaOS Plugin: Three actions (register, validate, transfer) plus a wallet provider for the ElizaOS runtime.
- GAME Plugin: Worker functions for the Virtuals Protocol GAME SDK. Available in TypeScript and Python.
- ACP Plugin: Job payment client for the Agent Commerce Protocol by Virtuals.
API-direct (any language)
Call the Mandate REST API from any programming language. No SDK required. Send HTTP requests tohttps://app.mandate.md/api/validate with your runtime key and transaction details.
- REST API: Direct HTTP calls. Works with Python, Go, Rust, Java, or anything that speaks HTTP.
- CLI:
npx @mandate.md/clifor shell scripts and automation. Also supports MCP server mode for tool-based platforms. - MCP Server: Cloudflare Workers deployment that exposes search and execute tools over the MCP protocol.
Comparison matrix
| Integration | Type | Setup | Languages | Key features |
|---|---|---|---|---|
| Claude Code Plugin | Hook | claude plugin install | Any (via Claude) | Auto-intercept, two-phase gate, session scan |
| OpenClaw Plugin | Hook | openclaw plugin install | Any (via OpenClaw) | 3 tools, safety-net hook, auto-key storage |
| TypeScript SDK | SDK | npm install @mandate.md/sdk | TypeScript/JS | MandateClient + MandateWallet, full control |
| CLI | CLI | npx @mandate.md/cli | Any (shell) | All operations, MCP server mode |
| GOAT Plugin | SDK | npm install | TypeScript | @Tool() pattern, transfer + x402 |
| AgentKit Provider | SDK | npm install | TypeScript | WalletProvider + ActionProvider |
| ElizaOS Plugin | SDK | npm install | TypeScript | 3 actions + wallet provider |
| GAME Plugin | SDK | npm install / pip install | TS + Python | Worker functions |
| ACP Plugin | SDK | npm install | TypeScript | Job payment client |
| MCP Server | API | wrangler deploy | Any (MCP) | search + execute tools |
| REST API | API | None | Any | Direct HTTP calls |
Which integration should you use?
Start here and follow the path that matches your setup:- Using Claude Code? Install the Claude Code Plugin. Zero code changes, automatic enforcement.
- Using OpenClaw? Install the OpenClaw Plugin. Three tools register automatically, safety-net hook included.
- Using a supported framework? Pick the matching plugin: GOAT, AgentKit, ElizaOS, GAME, or ACP.
- Building a custom TypeScript agent? Use the TypeScript SDK.
MandateClientfor validation only,MandateWalletfor the full flow. - Need shell automation? Use the CLI. Works in scripts, CI/CD pipelines, and as an MCP server.
- Using another language (Python, Go, Rust)? Call the REST API directly. No SDK needed.
Next Steps
Claude Code Plugin
Two-phase enforcement for Claude Code agents. Zero code changes.
OpenClaw Plugin
Three Mandate tools plus a safety-net hook for OpenClaw agents.
TypeScript SDK
MandateClient and MandateWallet for full programmatic control.
REST API
Direct HTTP calls from any language. No SDK required.