Skip to main content

Choose your integration

Pick the path that matches how you build:

Claude Code

One command. Auto-intercepts all wallet transactions.

OpenClaw

Install from ClawHub. Three tools, safety-net hook.

TypeScript SDK

Full control. MandateClient + MandateWallet.

CLI

Validate from scripts, CI, or MCP server mode.

Python / Any Language

REST API. Works with Python, Go, Rust, or any HTTP client.

Claude Code Plugin

The fastest path. Two commands, zero code changes. The plugin intercepts all wallet transactions Claude executes and validates them against your policy. Step 1: Add the marketplace and install the plugin:
Step 2: Register your agent:
Claim at the printed URL, then set policies at app.mandate.md. The plugin gates every financial tool call. No valid Mandate token, no transaction.
  • Agent calls mandate validate with action + reason
  • If allowed: plugin records a 15-minute token, transaction proceeds
  • If blocked: agent gets counter-evidence explaining why, stops voluntarily
  • If no validation attempted: plugin blocks the tool call entirely
  • Auto-scan on startup finds unprotected wallet calls in your project
  • Works with any wallet: Bankr, MCP payment tools, direct RPC, custom CLIs
GitHub: SwiftAdviser/claude-mandate-plugin

Full Claude Code guide

Two-phase enforcement, gate triggers, token TTLs, and advanced configuration.

OpenClaw Plugin

Install from ClawHub or npm. Your agent gets three Mandate tools automatically.
The plugin adds these tools to your agent: A safety-net hook blocks any financial tool call that skips mandate_validate. GitHub: SwiftAdviser/mandate-openclaw-plugin ClawHub: clawhub.ai/swiftadviser/mandate

Full OpenClaw guide

Tool parameters, safety-net hook details, and configuration options.

TypeScript SDK

For custom agents. Full control over the validate, sign, broadcast flow.

Install

Register your agent

Store the runtimeKey in your .env file (MANDATE_RUNTIME_KEY=mndt_test_...). Never commit it to git. Share the claimUrl with the wallet owner to link the agent to the dashboard.

Test validation (no wallet needed)

You can test the policy engine without a private key or wallet. This is the fastest way to verify your setup works.

Execute the transfer

MandateWallet handles the full flow: validate, sign locally, broadcast, confirm. Your private key never leaves your machine.
validate() accepts amounts in USD (e.g., '50' means $50). wallet.transfer() accepts raw token units (e.g., '5000000' means 5 USDC, because USDC has 6 decimals). The policy engine always evaluates in USD.
npm: @mandate.md/sdk

CLI

Run directly with npx. No install needed.

Register

Validate

Scan your codebase

Find unprotected wallet calls before they reach production:
The scanner detects sendTransaction, transfer, approve, and other financial calls missing Mandate validation. Exit code 1 if any found. Use it in CI.

MCP server mode

Turn the CLI into an MCP server for AI assistants:
npm: @mandate.md/cli

Full CLI reference

All 10 commands, flags, credential storage, and MCP configuration.

Python / Any Language

No SDK needed. Call the REST API directly with any HTTP client.

Register

Validate

This pattern works with Python, Go, Rust, Ruby, or any language with an HTTP client. See the REST API reference for all endpoints.

Default policy

After registration, every agent starts with: Customize in the Dashboard policy builder.

What happens under the hood

  1. Validate. Your agent sends action + reason to Mandate. The policy engine runs 14 checks.
  2. Sign locally. After validation passes, the agent signs with its own key. Mandate never sees it.
  3. Broadcast. Signed transaction goes to the chain.
  4. Verify. Mandate confirms the on-chain tx matches what was validated. Mismatch trips the circuit breaker.

Resources

Next Steps

How It Works

Validation flow, intent lifecycle, and state machine.

Handle Errors

PolicyBlockedError, CircuitBreakerError, and 12 block reason codes.

Handle Approvals

Wait for human approval with polling, timeouts, and callbacks.

All Integrations

GOAT SDK, AgentKit, ElizaOS, GAME, ACP, MCP Server, and more.