Skip to content

Rubin Exchange

by rubin.trade · remote · no sign-in to list tools · v1.0.2 · published by trade.rubin

Rubin: self-custody DEX for crypto perpetuals & spot - trade, read positions, orders, balances.

Deletes · 3Changes · 9

33 tools: 3 can delete or cancel things, 9 change things and 21 only read.

Scanned Oct 21, 2026

No check matched anything in the tool definitions. No finding is not a safety guarantee. How the checks work.

claude mcp add --transport http exchange https://mcp.mainnet.rubin.trade/mcp --header 'Authorization: <your-authorization>'

Tools

Open a tool for its reasons and full description. Descriptions are the publisher's own words, shown as they are.

33 tools

Deletes or cancels 3Claude Code: deny
  • batch_cancelCancel multiple SHORT_TERM orders in one tx.No findings

    Why it is in this group

    • The name "batch_cancel" says "cancel": a word for removing or ending something.
    • The server marks it destructive (destructiveHint: true).
    Description, as the server wrote it
    Cancel multiple SHORT_TERM orders in one tx. SHORT_TERM only (chain limitation) — for stateful/mixed use cancel_all_orders.

    Annotations the server declares

    • readOnlyHint: false
    • destructiveHint: true
    • idempotentHint: true
  • cancel_all_ordersCancel every OPEN order for the subaccount in a market (handles SHORT_TERM and LONG_TERM automatically).No findings

    Why it is in this group

    • The name "cancel_all_orders" says "cancel": a word for removing or ending something.
    • The server marks it destructive (destructiveHint: true).
    Description, as the server wrote it
    Cancel every OPEN order for the subaccount in a market (handles SHORT_TERM and LONG_TERM automatically). Returns `confirmation.remainingOpen` — orders still OPEN after the cancel (0 = all gone); if > 0, retry.

    Annotations the server declares

    • readOnlyHint: false
    • destructiveHint: true
    • idempotentHint: true
  • cancel_orderCancel a single order by clientId.No findings

    Why it is in this group

    • The name "cancel_order" says "cancel": a word for removing or ending something.
    • The server marks it destructive (destructiveHint: true).
    Description, as the server wrote it
    Cancel a single order by clientId. For SHORT_TERM pass goodTilBlock; for LONG_TERM/CONDITIONAL pass goodTilTimeSeconds (the original good-til value, available from get_open_orders). Returns `confirmation` with the verified result (canceled / still_open / filled / pending): `code: 0` only means the cancel was broadcast. If `still_open`, the goodTil value likely did not match the original — retry.

    Annotations the server declares

    • readOnlyHint: false
    • destructiveHint: true
    • idempotentHint: true
Changes things 9Claude Code: ask
  • close_all_positionsFlatten EVERY open perpetual position with reduce-only MARKET orders (one per market).No findings

    Why it is in this group

    • The name "close_all_positions" says "close": a word for a change.
    Description, as the server wrote it
    Flatten EVERY open perpetual position with reduce-only MARKET orders (one per market). Respects the operator market allowlist (disallowed markets are skipped and reported). Each close is bounded at oracle ± slippageBps mirrored by side (default 500 bps = 5%). Returns a per-market result array — for any market reporting unfilled/partially_filled, re-run with a larger slippageBps.

    Annotations the server declares

    • readOnlyHint: false
    • destructiveHint: false
    • idempotentHint: false
  • close_positionClose all or part of an open perpetual position with a reduce-only MARKET order.No findings

    Why it is in this group

    • The name "close_position" says "close": a word for a change.
    Description, as the server wrote it
    Close all or part of an open perpetual position with a reduce-only MARKET order. Reads the current position, flips the side automatically (LONG→SELL, SHORT→BUY) and sizes the close. percent defaults to 100 (full close); a partial close is floored to the market step size. The close is bounded at oracle ± slippageBps mirrored by side (closing a SHORT buys up to oracle×(1+slip), closing a LONG sells down to oracle×(1−slip); default 500 bps = 5%). Returns the verified `confirmation` outcome — if it is `unfilled` or `partially_filled`, the book was thinner than the cap: re-run with a larger slippageBps to sweep deeper. Errors NOT_FOUND if there is no open position in the market.

    Annotations the server declares

    • readOnlyHint: false
    • destructiveHint: false
    • idempotentHint: false
  • deposit_to_subaccountDeposit USDC from the account's WALLET into its trading SUBACCOUNT so it becomes collateral.No findings

    Why it is in this group

    • Nothing in its name or description says what it does, so it is counted as a write.
    Description, as the server wrote it
    Deposit USDC from the account's WALLET into its trading SUBACCOUNT so it becomes collateral. Without amountUsd it moves everything above the $0.95 gas reserve (what the web app does); with amountUsd it moves exactly that much, as long as $0.95 stays in the wallet. Funds never leave the account — this is an internal transfer the trading key is allowed to make. Use it when the user has sent money to the account and the subaccount collateral is 0 or too low to trade.

    Annotations the server declares

    • readOnlyHint: false
    • destructiveHint: false
    • idempotentHint: false
  • open_positionEnter a NEW position with a MARKET order, sized by base `size` OR quote `notionalUsd` (exactly one required; notionalUsd converts at the oracle price and is floored to the step siz…No findings

    Why it is in this group

    • The name "open_position" says "open": a word for a change.
    Description, as the server wrote it
    Enter a NEW position with a MARKET order, sized by base `size` OR quote `notionalUsd` (exactly one required; notionalUsd converts at the oracle price and is floored to the step size). Optionally attach a reduce-only stopLossPrice and/or takeProfitPrice as conditional orders in the SAME call (the bracket, placed with the opposite/closing side and a 500 bps execution bound past the trigger). slippageBps caps the entry fill vs oracle (default 500). Returns the entry `confirmation` plus any bracket order ids. Bracket legs are placed only if the entry broadcast succeeds; each is reduce-only so it can only close, never flip.

    Annotations the server declares

    • readOnlyHint: false
    • destructiveHint: false
    • idempotentHint: false
  • place_limit_orderPlace a limit order.No findings

    Why it is in this group

    • Nothing in its name or description says what it does, so it is counted as a write.
    Description, as the server wrote it
    Place a limit order. Default timeInForce=GTT (long-term, durable, broadcast-commit so errors return synchronously). Use SHORT_TERM only for latency-sensitive orders (expire within ~20 blocks, broadcast async). NOTE: stateful (GTT) orders are rate-limited to 2/block and 20 per 100 blocks — pace placements. Returns `confirmation` with the REAL outcome verified via the indexer (filled / partially_filled / resting / unfilled / pending) — broadcast `code: 0` only means the tx was accepted, NOT that it filled. Report from `confirmation.outcome`; if it is `pending`, the indexer is lagging — re-check shortly.

    Annotations the server declares

    • readOnlyHint: false
    • destructiveHint: false
    • idempotentHint: false
  • place_market_orderPlace an IOC market order.No findings

    Why it is in this group

    • Nothing in its name or description says what it does, so it is counted as a write.
    Description, as the server wrote it
    Place an IOC market order. It executes as an IOC limit at a worst-acceptable price mirrored around the oracle by side — BUY caps ABOVE the oracle, SELL below — at slippageBps distance (default 500 = 5%). Fills happen at book prices; the cap only limits how deep the sweep goes. reduceOnly closes an existing position. Returns `confirmation` with the REAL outcome verified via the indexer (filled / partially_filled / unfilled / pending): broadcast `code: 0` only means the tx was accepted — an IOC order cancels UNFILLED when the book is entirely beyond the slippage cap (thin/spread market). Always report from `confirmation.outcome`, not `code`; if `unfilled` or `partially_filled`, retry with a larger slippageBps to sweep deeper; if `pending`, the indexer is lagging — wait a few seconds and re-check before concluding.

    Annotations the server declares

    • readOnlyHint: false
    • destructiveHint: false
    • idempotentHint: false
  • place_stop_lossPlace a reduce-only Stop loss (conditional market order) that triggers at triggerPrice.No findings

    Why it is in this group

    • The name "place_stop_loss" says "stop": a word for a change.
    Description, as the server wrote it
    Place a reduce-only Stop loss (conditional market order) that triggers at triggerPrice. Side must be the CLOSING side of the position: SELL closes a LONG, BUY closes a SHORT. Once triggered it executes as an IOC limit bounded at triggerPrice ± slippageBps in the direction of execution (BUY above the trigger, SELL below; default 500 bps) so the close can cross the book.

    Annotations the server declares

    • readOnlyHint: false
    • destructiveHint: false
    • idempotentHint: false
  • place_take_profitPlace a reduce-only Take profit (conditional market order) that triggers at triggerPrice.No findings

    Why it is in this group

    • Nothing in its name or description says what it does, so it is counted as a write.
    Description, as the server wrote it
    Place a reduce-only Take profit (conditional market order) that triggers at triggerPrice. Side must be the CLOSING side of the position: SELL closes a LONG, BUY closes a SHORT. Once triggered it executes as an IOC limit bounded at triggerPrice ± slippageBps in the direction of execution (BUY above the trigger, SELL below; default 500 bps) so the close can cross the book.

    Annotations the server declares

    • readOnlyHint: false
    • destructiveHint: false
    • idempotentHint: false
  • top_up_gasMove a little USDC from the trading subaccount back to the WALLET when the wallet is at or below $0.55 — just enough to restore the $0.95 gas reserve that deposit/withdraw transact…No findings

    Why it is in this group

    • The description's first verb is "move": a word for a change.
    Description, as the server wrote it
    Move a little USDC from the trading subaccount back to the WALLET when the wallet is at or below $0.55 — just enough to restore the $0.95 gas reserve that deposit/withdraw transactions need. Only the gas reserve, only to the account's own wallet; it cannot send funds anywhere else. Use after a transaction fails for lack of gas.

    Annotations the server declares

    • readOnlyHint: false
    • destructiveHint: false
    • idempotentHint: false
Only reads 21Claude Code: allow
  • get_balanceGet the subaccount collateral (USDC asset position) and the on-chain wallet bank balances.No findings

    Why it is in this group

    • The name "get_balance" says "get": a word for reading.
    Description, as the server wrote it
    Get the subaccount collateral (USDC asset position) and the on-chain wallet bank balances. Collateral is what backs trading; the WALLET balance is where money sent to the account lands and is NOT collateral until deposited. `funding` summarizes it: depositableUsdc (wallet minus the $0.95 gas reserve) and a suggestedAction — deposit_to_subaccount when the wallet holds spare USDC, top_up_gas when gas is low.

    Annotations the server declares

    • readOnlyHint: true
  • get_block_heightReturn the latest chain block height.No findings

    Why it is in this group

    • The name "get_block_height" says "get": a word for reading.
    Description, as the server wrote it
    Return the latest chain block height. Useful for SHORT_TERM order goodTilBlock math.

    Annotations the server declares

    • readOnlyHint: true
  • get_candlesGet OHLCV candles for a market at a given resolution.No findings

    Why it is in this group

    • The name "get_candles" says "get": a word for reading.
    Description, as the server wrote it
    Get OHLCV candles for a market at a given resolution. Useful for trend/volatility analysis.

    Annotations the server declares

    • readOnlyHint: true
  • get_candles_multiGet recent OHLCV candles for a market across MULTIPLE resolutions in one call — by default ALL indexer resolutions (1MIN, 5MINS, 15MINS, 30MINS, 1HOUR, 4HOURS, 1DAY) — so the agent…No findings

    Why it is in this group

    • The name "get_candles_multi" says "get": a word for reading.
    Description, as the server wrote it
    Get recent OHLCV candles for a market across MULTIPLE resolutions in one call — by default ALL indexer resolutions (1MIN, 5MINS, 15MINS, 30MINS, 1HOUR, 4HOURS, 1DAY) — so the agent can read the trend across timeframes at once. Returns { candles: { <resolution>: [...] } }, newest first. Lower `limit` (e.g. 20) or pass a `resolutions` subset to keep the payload small.

    Annotations the server declares

    • readOnlyHint: true
  • get_equityGet the subaccount summary: equity, freeCollateral, marginEnabled, open perpetual positions and asset positions.No findings

    Why it is in this group

    • The name "get_equity" says "get": a word for reading.
    Description, as the server wrote it
    Get the subaccount summary: equity, freeCollateral, marginEnabled, open perpetual positions and asset positions.

    Annotations the server declares

    • readOnlyHint: true
  • get_fee_tierThis account's current trading fee tier and conditions: maker/taker fee (% of notional; a negative maker fee is a rebate), the 30-day maker/taker volume it is judged on, any stakin…No findings

    Why it is in this group

    • The name "get_fee_tier" says "get": a word for reading.
    Description, as the server wrote it
    This account's current trading fee tier and conditions: maker/taker fee (% of notional; a negative maker fee is a rebate), the 30-day maker/taker volume it is judged on, any staking discount, the next tier and how much more 30d volume it takes, plus the full fee-tier table. Referred users start at the program's minimum fee tier (see get_referral_program).

    Annotations the server declares

    • readOnlyHint: true
  • get_fillsGet executed fills for the subaccount, including price, size, fee and maker/taker liquidity.No findings

    Why it is in this group

    • The name "get_fills" says "get": a word for reading.
    Description, as the server wrote it
    Get executed fills for the subaccount, including price, size, fee and maker/taker liquidity.

    Annotations the server declares

    • readOnlyHint: true
  • get_funding_statusWhere the account's USDC sits: in the WALLET (bank balance — money sent to the account lands here and is NOT collateral) vs in the trading SUBACCOUNT (equity / free collateral).No findings

    Why it is in this group

    • The name "get_funding_status" says "get": a word for reading.
    Description, as the server wrote it
    Where the account's USDC sits: in the WALLET (bank balance — money sent to the account lands here and is NOT collateral) vs in the trading SUBACCOUNT (equity / free collateral). Returns depositableUsdc (wallet minus the $0.95 gas reserve), whether gas is low, and a suggestedAction (deposit_to_subaccount / top_up_gas / null). Call this when the user says they sent funds, when collateral reads 0, or before any funding decision.

    Annotations the server declares

    • readOnlyHint: true
  • get_leaderboardThe trader PnL leaderboard for a time span (ONE_DAY, SEVEN_DAYS, THIRTY_DAYS, ONE_YEAR, ALL_TIME): rank, username, address, PnL (USD), ROI (%) and current equity per trader, pagina…No findings

    Why it is in this group

    • The name "get_leaderboard" says "get": a word for reading.
    Description, as the server wrote it
    The trader PnL leaderboard for a time span (ONE_DAY, SEVEN_DAYS, THIRTY_DAYS, ONE_YEAR, ALL_TIME): rank, username, address, PnL (USD), ROI (%) and current equity per trader, paginated. Also returns `me` — this account's own row on that board, if it is ranked. Use `search` to find a trader by username or address. For this account's rank across ALL time spans at once, use get_my_rank.

    Annotations the server declares

    • readOnlyHint: true
  • get_marketGet details for one perpetual market (clobPairId, atomicResolution, quantumConversionExponent, tick/step sizes, oracle price, status).No findings

    Why it is in this group

    • The name "get_market" says "get": a word for reading.
    Description, as the server wrote it
    Get details for one perpetual market (clobPairId, atomicResolution, quantumConversionExponent, tick/step sizes, oracle price, status).

    Annotations the server declares

    • readOnlyHint: true
  • get_my_rankWhere THIS account ranks on the PnL leaderboard: rank, board size ("21 of 66"), PnL, ROI and equity — for one time span, or for every time span (ONE_DAY … ALL_TIME) when none is gi…No findings

    Why it is in this group

    • The name "get_my_rank" says "get": a word for reading.
    Description, as the server wrote it
    Where THIS account ranks on the PnL leaderboard: rank, board size ("21 of 66"), PnL, ROI and equity — for one time span, or for every time span (ONE_DAY … ALL_TIME) when none is given. A null entry means the account is not ranked on that board (no qualifying activity in the window).

    Annotations the server declares

    • readOnlyHint: true
  • get_newsFetch the latest headlines from the ritbit news feed (curated crypto / markets / business channels, newest first).No findings

    Why it is in this group

    • The name "get_news" says "get": a word for reading.
    Description, as the server wrote itContains invisible characters, shown as [U+…]
    Fetch the latest headlines from the ritbit news feed (curated crypto / markets / business channels, newest first). Filter by `category` (crypto|markets|business) or explicit `channels`, and/or a free-text `query` (a ticker or keyword, matched in the post text and hashtags, e.g. BTC). Each item returns { source, url, publishedAt, tags (hashtags — where tickers appear), text }. There is NO importance field: judge impact yourself from the content (hacks, regulation, large moves, ⚠[U+FE0F] warnings). Use this to factor sentiment/catalysts into an assessment, or to answer "what's the latest?". Headlines are ru/en.

    Annotations the server declares

    • readOnlyHint: true
  • get_open_ordersGet currently active ORDERS for the subaccount, optionally filtered by market and side.No findings

    Why it is in this group

    • The name "get_open_orders" says "get": a word for reading.
    Description, as the server wrote it
    Get currently active ORDERS for the subaccount, optionally filtered by market and side. Includes OPEN resting orders and UNTRIGGERED conditional orders (TP/SL accepted on-chain but not yet triggered). Returns { orders: [...] }. This does NOT include filled positions — a filled market/limit order leaves NO open order, it becomes a POSITION (see get_positions). When there are 0 orders but open positions exist, the result carries a `note` pointing you there.

    Annotations the server declares

    • readOnlyHint: true
  • get_orderbookGet the live orderbook (bids/asks) for a market, optionally truncated to a depth.No findings

    Why it is in this group

    • The name "get_orderbook" says "get": a word for reading.
    Description, as the server wrote it
    Get the live orderbook (bids/asks) for a market, optionally truncated to a depth.

    Annotations the server declares

    • readOnlyHint: true
  • get_pnlGet historical PnL ticks for the subaccount (equity, totalPnl, netTransfers over time).No findings

    Why it is in this group

    • The name "get_pnl" says "get": a word for reading.
    Description, as the server wrote it
    Get historical PnL ticks for the subaccount (equity, totalPnl, netTransfers over time). Use createdOnOrAfter to bound the range.

    Annotations the server declares

    • readOnlyHint: true
  • get_portfolioOne-call snapshot of everything the account has "open": equity & freeCollateral, every open POSITION (with notional, unrealized PnL and estimated liquidation price), every active O…No findings

    Why it is in this group

    • The name "get_portfolio" says "get": a word for reading.
    Description, as the server wrote it
    One-call snapshot of everything the account has "open": equity & freeCollateral, every open POSITION (with notional, unrealized PnL and estimated liquidation price), every active ORDER (resting + untriggered TP/SL), and account margin risk. Use this to answer "what do I have open?" or "how am I doing?" without worrying whether the user means orders or positions — it returns both.

    Annotations the server declares

    • readOnlyHint: true
  • get_position_riskMargin health for the subaccount: equity, freeCollateral, total maintenance/initial margin, maintenanceMarginBufferUsd (the EXACT liquidation guard — liquidatable when < 0), margin…No findings

    Why it is in this group

    • The name "get_position_risk" says "get": a word for reading.
    Description, as the server wrote it
    Margin health for the subaccount: equity, freeCollateral, total maintenance/initial margin, maintenanceMarginBufferUsd (the EXACT liquidation guard — liquidatable when < 0), marginUsageRatio (1.0 = at liquidation), account leverage, and per-position estimated liquidation price + distance to it. Use before adding risk or to decide whether to protect/close a position.

    Annotations the server declares

    • readOnlyHint: true
  • get_positionsGet perpetual POSITIONS with size, side, entryPrice, unrealizedPnl, realizedPnl and netFunding.No findings

    Why it is in this group

    • The name "get_positions" says "get": a word for reading.
    Description, as the server wrote it
    Get perpetual POSITIONS with size, side, entryPrice, unrealizedPnl, realizedPnl and netFunding. Defaults to OPEN positions. NOTE: a position is what you HOLD after an order fills — it is NOT an open order. When the user asks loosely "what is open?", check BOTH this and get_open_orders (or call get_portfolio for both at once).

    Annotations the server declares

    • readOnlyHint: true
  • get_referral_programThis account's referral / affiliate program status: referral code and link, whether the link is unlocked (lifetime volume threshold, or already an affiliate), current affiliate tie…No findings

    Why it is in this group

    • The name "get_referral_program" says "get": a word for reading.
    Description, as the server wrote it
    This account's referral / affiliate program status: referral code and link, whether the link is unlocked (lifetime volume threshold, or already an affiliate), current affiliate tier and taker-fee share, referred volume (30d / all-time), earnings and referred-user stats, who referred this account, the full affiliate tier table and the program parameters (referee starting fee tier, 30d caps).

    Annotations the server declares

    • readOnlyHint: true
  • list_marketsList all perpetual markets with ticker, status and oracle price.No findings

    Why it is in this group

    • The name "list_markets" says "list": a word for reading.
    Description, as the server wrote it
    List all perpetual markets with ticker, status and oracle price. Use this first to discover valid market tickers (e.g. BTC-USD) before placing orders.

    Annotations the server declares

    • readOnlyHint: true
  • whoamiReport what this session controls: the master account (its address in BOTH forms — cosmos rit1… and EVM 0x…, the same 20 bytes), the subaccount, whether it can trade or is read-onl…No findings

    Why it is in this group

    • The name "whoami" says "whoami": a word for reading.
    Description, as the server wrote it
    Report what this session controls: the master account (its address in BOTH forms — cosmos rit1… and EVM 0x…, the same 20 bytes), the subaccount, whether it can trade or is read-only, and the exact on-chain authorization scope (which messages, which subaccount, and that it CANNOT withdraw/transfer). Also states what this session can NOT do: create wallets, reveal keys/mnemonics, or switch accounts. Call this first, and use it to answer "what is my address?".

    Annotations the server declares

    • readOnlyHint: true

This is not a safety rating, and no finding is not a safety guarantee. The groups and findings come from fixed checks of the tool definitions the server returned on the date shown, not from its code or what it does when called. How the checks work.

Install

Pinned to version 1.0.2. Values in angle brackets are yours to fill in.

claude mcp add --transport http exchange https://mcp.mainnet.rubin.trade/mcp --header 'Authorization: <your-authorization>'

Run in a terminal.

Claude Code permissions

Allow the reads, ask before a change, deny the deletes. Paste into .claude/settings.json.

.claude/settings.json
{
  "permissions": {
    "allow": [
      "mcp__exchange__whoami",
      "mcp__exchange__get_block_height",
      "mcp__exchange__list_markets",
      "mcp__exchange__get_market",
      "mcp__exchange__get_orderbook",
      "mcp__exchange__get_candles",
      "mcp__exchange__get_candles_multi",
      "mcp__exchange__get_balance",
      "mcp__exchange__get_equity",
      "mcp__exchange__get_positions",
      "mcp__exchange__get_open_orders",
      "mcp__exchange__get_portfolio",
      "mcp__exchange__get_position_risk",
      "mcp__exchange__get_fills",
      "mcp__exchange__get_pnl",
      "mcp__exchange__get_funding_status",
      "mcp__exchange__get_news",
      "mcp__exchange__get_leaderboard",
      "mcp__exchange__get_my_rank",
      "mcp__exchange__get_fee_tier",
      "mcp__exchange__get_referral_program"
    ],
    "ask": [
      "mcp__exchange__deposit_to_subaccount",
      "mcp__exchange__top_up_gas",
      "mcp__exchange__place_limit_order",
      "mcp__exchange__place_market_order",
      "mcp__exchange__place_stop_loss",
      "mcp__exchange__place_take_profit",
      "mcp__exchange__close_position",
      "mcp__exchange__close_all_positions",
      "mcp__exchange__open_position"
    ],
    "deny": [
      "mcp__exchange__cancel_order",
      "mcp__exchange__cancel_all_orders",
      "mcp__exchange__batch_cancel"
    ]
  }
}

Tools that only read are allowed, tools that change things ask first, tools that delete or cancel are denied. It assumes the server is installed as exchange. Review it before you use it.