Reins logo

Reins

Risk-checks and audits AI-agent trades on Hyperliquid with paper mode, live mode, and non-custodial API-wallet signing.

Install Reins

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "reins": {
      "command": "npx",
      "args": [
        "-y",
        "@r2rlabs/reins"
      ],
      "env": {
        "REINS_MODE": "YOUR_VALUE_HERE",
        "REINS_NETWORK": "YOUR_VALUE_HERE",
        "REINS_ACCOUNT_ADDRESS": "YOUR_VALUE_HERE",
        "REINS_PRIVATE_KEY": "YOUR_VALUE_HERE",
        "REINS_LOG_FILE": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env REINS_MODE=YOUR_VALUE_HERE --env REINS_NETWORK=YOUR_VALUE_HERE --env REINS_ACCOUNT_ADDRESS=YOUR_VALUE_HERE --env REINS_PRIVATE_KEY=YOUR_VALUE_HERE --env REINS_LOG_FILE=YOUR_VALUE_HERE --transport stdio reins -- npx -y @r2rlabs/reins

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y @r2rlabs/reins

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Reins MCP server applies external risk checks to AI-agent trading on Hyperliquid, covering position size, leverage, daily loss, markets, rate limits, and stop-losses. It exposes trading and account tools over stdio, with an HTTP option, and records attempted actions, refusals, stated reasons, and exchange fills. Paper mode uses live prices with simulated fills and fees before funds are exposed. Reach for it when an agent needs enforced trading constraints and an append-only audit trail rather than an unrestricted exchange wrapper.

Use cases

  • Paper-trade an AI agent against live Hyperliquid prices
  • Enforce position, leverage, loss, and market limits outside the model
  • Audit accepted, refused, and exchange-generated trading events
  • Run Hyperliquid trading through a restricted API wallet
  • Expose trading operations over HTTP to a non-MCP bot

Key features

  • External risk checks for agent trading
  • Paper trading with simulated fills and fees
  • Append-only JSON Lines decision logs
  • Hyperliquid API-wallet execution
  • stdio and authenticated HTTP entry points
  • Builder-fee approval and live checks

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

Not checked yetLast checked

We have not completed a health check for this listing yet.

10/14 checks healthy over the last 68d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 4d ago via OSV.dev · @r2rlabs/reins (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads524Package downloads in the last 30 days.
Last commit17d agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.

How Reins works

What Reins MCP server does

Reins MCP server sits between an AI agent and Hyperliquid. It checks trading requests before they reach the exchange and records the result. The controls are implemented outside the model, so a prompt or model decision cannot bypass the configured checks.

The risk engine supports position caps, per-trade risk limits, leverage limits, daily-loss halts, market allowlists, rate limiting, and a stop-loss requirement for positions. Orders that fail a check are recorded as refusals rather than disappearing from the history. Trading actions that require an explanation, including placing an order, closing a position, and setting a stop-loss, require a reason.

Paper trading provides a rehearsal path using live Hyperliquid prices, simulated fills, and fees. The same tools and limits are used in paper and live modes. In live mode, Reins sends orders to the user's Hyperliquid account through an API wallet; it does not hold funds or provide an exchange.

How it works

The Reins MCP server can run through stdio, and the project also provides an HTTP mode with token authentication, configurable binding, and JSON responses. The HTTP implementation exposes the same nine tools as routes for clients or bots that do not speak MCP.

Before a tool call, Reins compares account activity with its decision history. This captures fills caused by a stop-loss or resting order, as well as other exchange activity that Reins did not initiate. The resulting append-only JSON Lines log contains the agent's stated reason, request, account context, risk decision, and outcome. Set REINS_LOG_FILE to retain the file across process restarts; otherwise, the log remains in memory.

Paper runs can also be persisted across restarts. Live and paper operation share a trading-client interface, while the exchange client handles orders, cancellations, market data, fills, account state, and builder-code operations.

Setup and configuration

Run npx @r2rlabs/reins init to add a paper-mode Reins entry to .mcp.json. The defaults are paper trading and Hyperliquid testnet access. A local demo can be built and run with npm run build followed by npm run demo -- --scripted; the scripted path does not need an API key.

Live operation requires explicit configuration: set REINS_MODE=live, choose the network with REINS_NETWORK, provide REINS_ACCOUNT_ADDRESS, and provide REINS_PRIVATE_KEY when signing orders is needed. The private key should belong to a Hyperliquid API wallet, not the main account wallet. The account address identifies where positions and fills are read. Without a live key, live mode remains read-only.

On mainnet, the account must approve Reins' 2 bp builder fee before live trading begins. Run npx @r2rlabs/reins approve-builder from the account's own wallet. npx @r2rlabs/reins live-check verifies that the live exchange accepts Reins' requests.

Tools and capabilities

Reins MCP server provides agent-facing operations for trading and account interaction, with every action risk-checked and logged before transmission. The documented actions include placing orders, closing positions, setting stop-losses, and reading recent decisions. The underlying client supports cancellations, order-book and candle data, fills, account state, and builder-code access.

The command-line interface supports serving, initialization, builder-fee approval, live checks, HTTP serving, and platform statistics. The statistics command reports accounts, trades, volume, and fees associated with Reins' builder code.

Limitations and notes

Reins does not choose a strategy, decide which trades are profitable, or guarantee against losses. Stop-losses can slip in fast markets. Hyperliquid remains responsible for matching orders, and Reins is neither a broker nor a custodian.

The project describes itself as early-stage. A reason in the log is the agent's testimony, not independent proof of its intent. The audit record captures what the agent said and what the exchange did, but it does not make a poor decision correct.

The live private key is read only in live mode; paper mode does not sign transactions. API wallets can trade for an account but cannot withdraw, and Hyperliquid may remove expired or replaced API wallets.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Reins

Reins is an MCP server that connects AI agents to Hyperliquid trading through externally enforced risk checks and an audit log. Its main tools cover actions such as placing orders, closing positions, setting stop-losses, and reading recent decisions, with paper and live trading modes.

Run `npx @r2rlabs/reins init` to add a paper-mode server entry to `.mcp.json`. You can also build the project with `npm run build` and run its demo with `npm run demo -- --scripted`.

Set `REINS_MODE=live`, configure the network and account address, and provide an API-wallet key when signing is required. Mainnet live trading also requires approving Reins' 2 bp builder fee with `npx @r2rlabs/reins approve-builder`.

Yes, Reins supports paper trading by default. It uses live Hyperliquid prices with simulated fills and fees, while applying the same tools and risk limits used for live trading.

Reins records attempted actions, stated reasons, risk verdicts, outcomes, refusals, and exchange fills in an append-only JSON Lines log. Set `REINS_LOG_FILE` to persist the log on disk; otherwise it is held in memory.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewReins AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/reins?style=directory)](https://allmcps.com/mcp/reins)
HTML Embed
<a href="https://allmcps.com/mcp/reins"><img src="https://allmcps.com/api/badge/reins?style=directory" alt="Reins on AllMCPs" /></a>