Integrations
Claude Code & Cursor
REIN ships as an MCP server. Claude Code, Cursor, and Claude Desktop pick it up automatically — no code changes required. Your agent gets rein_spend, rein_balance, rein_history, and request_step_up as native tools.
Install
Run rein init in any directory. The CLI detects your runtime (Claude Code, Cursor, or Claude Desktop) and injects the MCP server config automatically.
bash
npx rein init
# Detects Claude Code / Cursor / Claude Desktop automatically
# Prompts for your vault address, writes .rein/config.json
Or add the MCP server manually to your claude_desktop_config.json / .cursor/mcp.json:
json
{
"mcpServers": {
"rein": {
"command": "npx",
"args": ["@rein/mcp"],
"env": {
"REIN_VAULT": "YOUR_VAULT_ADDRESS",
"REIN_NETWORK": "devnet"
}
}
}
}
Available MCP tools
rein_spend(recipient, amount_usdc, memo?)
Submit a USDC payment. Checked against your Policy PDA on-chain. Returns a receipt on success or throws PolicyViolationError.
rein_balance()
Returns current vault balance (USDC), daily spend so far, and remaining daily cap.
rein_history(limit?, offset?)
Returns paginated list of Receipt PDAs for this vault — each with amount, recipient hash, timestamp, and tx signature.
request_step_up(reason, amount_usdc)
Explicitly request human approval for a high-value action. Creates a StepUpRequest PDA and sends push notification to the vault owner.
Example: agent paying for a search
Claude will call rein_spend as part of its tool use. If the spend succeeds, it proceeds with the search result. If your policy rejects it (e.g. daily cap hit), Claude sees the error and can notify you.
Claude prompt
User: Research the latest AI agent frameworks and summarize.
Claude: I'll use rein_spend to pay for a Brave Search query...
> rein_spend("api.brave.com", 0.02, "web search")
✓ Receipt: 3vQW...aBc · $0.02 · api.brave.com
> brave_search("latest AI agent frameworks 2026")
... Claude continues with results