Skip to content
MCP server

Rein

Policy-check every x402 paywall an AI agent meets before any payment moves

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, API
Runs
Locally
Version
0.8.0
Listing updated
2 days ago

About Rein

Rein is an open-source MCP server for finance and payments. It runs locally on your machine and is started by your AI client.

Rein's MCP server gives an agent a spend-governed fetch. When a vendor answers HTTP 402, the request becomes an intent, is checked against policy and receives a signed decision, and a deny blocks the payment before it exists. Rein is non-custodial: the agent signs its own payments and Rein signs only the decision.

Running npx @reinconsole/init creates a seven-day sandbox on the hosted engine with a starter policy (Base Sepolia, 0.004 USD per-call cap) and a test wallet, and writes rein-agent.json. Without a payer key the server runs in advisory mode: policy is evaluated and reported, nothing is paid. REIN_NETWORK_PROFILE decides whether testnet or mainnet 402s will be paid.

The wider project also covers a gate for pricing your own routes and a reputation graph. The site calls it early open-source infrastructure whose APIs may change before 1.0.

Install

Run in a terminal

claude mcp add rein --env REIN_ENGINE_API_KEY='<REIN_ENGINE_API_KEY>' --env REIN_PAYER_PRIVATE_KEY='<REIN_PAYER_PRIVATE_KEY>' -- npx -y @reinconsole/mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "rein": {
      "command": "npx",
      "args": [
        "-y",
        "@reinconsole/mcp"
      ],
      "env": {
        "REIN_ENGINE_API_KEY": "<REIN_ENGINE_API_KEY>",
        "REIN_PAYER_PRIVATE_KEY": "<REIN_PAYER_PRIVATE_KEY>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "rein": {
      "command": "npx",
      "args": [
        "-y",
        "@reinconsole/mcp"
      ],
      "env": {
        "REIN_ENGINE_API_KEY": "<REIN_ENGINE_API_KEY>",
        "REIN_PAYER_PRIVATE_KEY": "<REIN_PAYER_PRIVATE_KEY>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "rein": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@reinconsole/mcp"
      ],
      "env": {
        "REIN_ENGINE_API_KEY": "<REIN_ENGINE_API_KEY>",
        "REIN_PAYER_PRIVATE_KEY": "<REIN_PAYER_PRIVATE_KEY>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "rein": {
      "command": "npx",
      "args": [
        "-y",
        "@reinconsole/mcp"
      ],
      "env": {
        "REIN_ENGINE_API_KEY": "<REIN_ENGINE_API_KEY>",
        "REIN_PAYER_PRIVATE_KEY": "<REIN_PAYER_PRIVATE_KEY>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "rein": {
      "command": "npx",
      "args": [
        "-y",
        "@reinconsole/mcp"
      ],
      "env": {
        "REIN_ENGINE_API_KEY": "<REIN_ENGINE_API_KEY>",
        "REIN_PAYER_PRIVATE_KEY": "<REIN_PAYER_PRIVATE_KEY>"
      }
    }
  }
}

Configuration

  • REIN_AGENT_FILEPath to the rein-agent.json written by `npx @reinconsole/init` (engine URL, agent id, API key, wallet).
  • REIN_ENGINE_URLPolicy engine base URL. Required unless REIN_AGENT_FILE is set.
  • REIN_AGENT_IDThe one agent this server speaks for. Required unless REIN_AGENT_FILE is set.
  • REIN_ENGINE_API_KEYBearer key for the engine, ideally an evaluate key narrowed to this agent.
  • REIN_PAYER_PRIVATE_KEYAgent wallet key. Omit for advisory mode: policy is checked, nothing is paid.
  • REIN_NETWORK_PROFILEtestnet (default) or mainnet: which network's 402s this server will pay.

What it does

Guarded fetch
Every x402 paywall is policy-checked before payment.
Advisory mode
Evaluate policy without a payer key so nothing is paid.
Budgets and kill switch
Per-transaction caps, allow and deny lists and a freeze control.
Signed receipts
Decisions and payments are receipted and observable.
Testnet sandbox
A free seven-day sandbox with a test wallet.
Network profile
Testnet or mainnet 402s only, set at startup.

Good for

  • Cap what an agent can spend on paid APIs
  • Trial agent payments on testnet
  • Block payments to low-reputation vendors
  • Keep an audit trail of agent spending

Pricing

Open source

Open source; free testnet sandbox

Prices change. Check reinconsole.com before you buy.

Rein FAQ

Does Rein hold my funds?

No. It is non-custodial and governs authority to spend only.

Can I try it without paying?

Yes, the init command creates a free testnet sandbox that lasts 7 days.

What is advisory mode?

With no payer key set, policy is checked and reported but nothing is paid.

How stable is it?

The site calls it early open-source infrastructure with APIs that may change before 1.0.

Is Rein free?

Yes. Rein is open source, so you can use and self-host it for free.

How do I add Rein to Claude Code?

Run this command in your terminal: claude mcp add rein --env REIN_ENGINE_API_KEY='<REIN_ENGINE_API_KEY>' --env REIN_PAYER_PRIVATE_KEY='<REIN_PAYER_PRIVATE_KEY>' -- npx -y @reinconsole/mcp

What are the best alternatives to Rein?

The closest alternatives to Rein are REA, Solana MCP by Vybe, Tapetide - Indian Stock Market MCP, Agent Roast and Midplane.

Alternatives to Rein

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Remote MCP server exposing the Vybe Solana API to AI clients and code editors

    • 44 tools
    • Remote
    • 2.8K GitHub stars
    • Finance and payments
  3. Indian NSE and BSE stock market data for AI assistants through 48 MCP tools

    • 17 tools
    • Remote
    • Freemium
    • 150 GitHub stars
    • Finance and payments
  4. Agent Roast

    MCP server

    Offline review that flags agent changes which weaken tests, assertions or CI

    Runs locally
    • Open source
    • 4 Hacker News points
    • Developer tools
  5. Midplane

    MCP server

    Postgres gateway for AI agents with table grants, column masking and approval for writes

    Runs locally
    • Open source
    • 5 GitHub stars
    • Databases
  6. Budget Tracker

    MCP server

    Local MCP expense ledger that logs receipts and mileage, splits VAT and prepares rebilling

    • 14 tools
    • Remote
    • Freemium
    • 2 GitHub stars
    • Finance and payments