Quick start
Get REIN running with your AI agent in under 90 seconds. This guide covers Claude Code (MCP) — see the sidebar for other runtimes.
Create a vault
Open the REIN dashboard and connect your Solana wallet. Click New vault — this writes a Policy PDA on Solana devnet and gives you a vault address.
Open dashboardSet your policy
In the policy editor, configure your spending rules. These are written to your Policy PDA — not stored in a database.
Install the MCP server (Claude Code / Cursor)
Run rein init in your project root. It auto-detects your runtime and writes the MCP config.
Paste your vault address when prompted. The CLI writes .rein/config.json and injects the MCP server into your Claude Code or Cursor settings.
Make your first spend
Your agent now has access to rein_spend, rein_balance, and rein_history as MCP tools. For the TypeScript SDK:
Funds move. A Receipt PDA is created in the same transaction. Your dashboard updates in real time via WebSocket.
Transaction reverts. No funds move. The agent receives a typed PolicyViolationError with the specific rule that failed.