# Rein

> Rein is an open-source MCP server for finance and payments. Policy-check every x402 paywall an AI agent meets before any payment moves. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API
- **Website:** https://reinconsole.com
- **Repository:** https://github.com/bugiiiii11/rein/tree/HEAD/services/mcp
- **MCP Registry name:** io.github.bugiiiii11/rein
- **Categories:** finance and payments, security
- **Listing updated:** 2026-11-15

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
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
```

### Claude Desktop (claude_desktop_config.json)

```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>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```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>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```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>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```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>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```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>"
      }
    }
  }
}
```

## 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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Solana MCP by Vybe](https://ai-powered.com/mcp/solana-mcp-by-vybe): Solana MCP by Vybe is an MCP server for finance and payments.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [Agent Roast](https://ai-powered.com/mcp/agent-roast): Agent Roast is an open-source MCP server for developer tools.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [Budget Tracker](https://ai-powered.com/mcp/budget-tracker-2): Budget Tracker is a freemium MCP server for finance and payments.
- [Leash](https://ai-powered.com/mcp/leash): Leash is a free MCP server for security.
- [Tinplate Edge AI Safety, Security & EU Compliance](https://ai-powered.com/mcp/tinplate-edge-ai-safety-security-and-eu-compliance): Tinplate Edge AI Safety, Security & EU Compliance is a freemium MCP server for security.

---
Source: https://ai-powered.com/mcp/rein
