Skip to main content
Glama
Arena Exchange MCP Server

Arena Exchange MCP Server

Official
by FeraTerra

Arena Exchange — Official Headless Client SDK & MCP Gateway (v4.9.2)

Zero-dependency client connectors and 24-tool MCP gateway for trading on Arena Exchange (feraterra.app) — a 100% headless computational venue with 0 bps maker fees (maker rebates on segmented venues), cross-margined Spot/Perps/FormulaPerps/BoundedClaims/SpreadBooks, stateless POST /order/preview margin dry-runs, $0-capital atomic flash arbitrage & liquidation bounties, live Gladiator Leaderboard (GET /leaderboard), and non-custodial L2 Clearinghouse Merkle-escape solvency.

  • Public Base Sepolia Testnet HTTPS: https://testnet.feraterra.app

  • Public Base Sepolia Testnet WebSocket: wss://testnet.feraterra.app/ws

  • AI Discovery & OpenAPI 3.1: https://testnet.feraterra.app/llms.txt | https://testnet.feraterra.app/openapi.json

  • Gladiator Leaderboard: https://testnet.feraterra.app/leaderboard

Bundle Contents (14 Files)

Path

Purpose

sdk/python/arena_sdk.py

Pure Python 3 stdlib client (ArenaHttpClient, ArenaWsClient, ArenaBinaryClient, ArenaItchClient, ArenaCcxtAdapter, EthWalletSigner, EvmJsonRpcClient, testnet() presets, get_leaderboard() & Merkle/Ledger verifiers)

sdk/python/arena_mcp_server.py

Packaged 24-tool MCP gateway module exposing feraterra-mcp, feraterra-sdk, arena-mcp, and arena-sdk CLI entry points

include/arena_wire.hpp

Canonical 64-byte ArenaWireFrame & ArenaITCH C++23 wire layout (static_assert(sizeof == 64))

include/arena_hft_client.hpp

Header-only C++23 HFT TCP/UDP/ITCH client (namespace arena::sdk, PUBLIC_TESTNET_HTTPS_URL)

scripts/arena_mcp_server.py

24-tool MCP JSON-RPC 2.0 stdio & Streamable HTTP (POST /mcp, GET /mcp/health) gateway script

abi/Clearinghouse.abi.json

L2 Clearinghouse ABI (depositTraderMargin, claimWithdrawalVoucher, claimMerkleEmergencyEscape, depositPolicyConfig)

examples/quickstart_ccxt_and_preview.py

Client-side AI discovery (GET /llms.txt, GET /openapi.json), EIP-191 wallet login, CCXT camelCase & POST /order/preview dry-run

examples/algo_two_sided_quoter.py

Client-side Market-Maker Protection (MMP) + inventory-skewed atomic two-sided quote replacement starter

examples/ai_agent_zero_capital_scanner.py

Client-side zero-capital atomic flash-arbitrage (POST /flash_arb) & auto-liquidation bounty scanner

pyproject.toml

Zero-dependency PEP 621 package manifest (pip install feraterra-sdk / pip install .)

server.json

Official MCP Registry manifest (io.github.FeraTerra/feraterra-sdk)

.gitignore

Clean repository ignore rules for Python bytecode, venvs, and local key files

README.md

Public trader, quant & AI-agent quickstart guide

LICENSE

MIT license for public client connectors

Related MCP server: Papertrade AI

Quickstart

1. Install & Machine-Readable AI Discovery

pip install feraterra-sdk

# Launch the 24-tool MCP gateway directly (via pip or uvx):
arena-mcp --testnet
# or:
uvx feraterra-sdk --testnet

For single-click MCP clients and the Official MCP Registry (io.github.FeraTerra/feraterra-sdk), a zero-dependency MCP Bundle (arena-sdk.mcpb) is also attached to every GitHub Release (https://github.com/FeraTerra/feraterra-sdk/releases/download/v4.9.2/feraterra-sdk.mcpb).

Point any LLM, autonomous agent, or HTTP client at https://testnet.feraterra.app (or local http://127.0.0.1:8088):

  • GET /llms.txt — Concise machine-readable protocol specification, fixed-point scales (1 tick = $0.01, 1 lot = 1e-4 base, 1 micro = $1e-6), EIP-191 auth flow, and zero-capital endpoints.

  • GET /openapi.json — Full OpenAPI 3.1.0 JSON schema for automatic tool/client generation.

  • GET /leaderboard — Live Gladiator Leaderboard ranking active wallets (masked 0x1234...abcd) by equity, PnL, maker BBO streak, volume, or ROI.

  • GET /faucet/status — Base Sepolia (chain_id=84532) Clearinghouse contract address, collateral token address, and faucet limits.

2. One-Line Public Testnet Onboarding, Faucet, L2 Deposit & CCXT Adapter

from arena_sdk import ArenaHttpClient, ArenaCcxtAdapter, EthWalletSigner

client = ArenaHttpClient.testnet()  # https://testnet.feraterra.app

# 1) Generate a local secp256k1 wallet & authenticate via EIP-191 (no browser or KYC)
signer = EthWalletSigner()
login = client.login_with_wallet(signer)
account_id = int(login["account_id"])

# 2) Optional: mint Base Sepolia testnet USDC + L2 gas drip, then deposit on-chain
# client.request_testnet_faucet(signer.address, amount="10000", asset="USD", drip_gas=True)
# client.deposit_onchain_margin(signer, "10000", account_id=account_id, wait_for_credit=True)

# 3) Drop-in CCXT camelCase adapter + stateless pre-trade margin/fill simulation (zero WAL mutation)
exchange = ArenaCcxtAdapter(client, account_id=account_id)
markets = exchange.loadMarkets()
print("BTC Perp   :", markets["BTC/USD:USD"]["symbol"])
print("Preview    :", exchange.previewOrder("BTC/USD:USD", "limit", "buy", "0.0100", "50000.00", {"postOnly": True}))
print("Leaderboard:", exchange.fetchLeaderboard(limit=5, sort="equity")[:3])

3. Autonomous AI Agent 24-Tool MCP Server (stdio & Streamable HTTP)

Claude Desktop / Cursor / Windsurf (mcpServers JSON via uvx or arena-mcp):

{
  "mcpServers": {
    "arena-exchange": {
      "command": "uvx",
      "args": [
        "arena-sdk",
        "--testnet",
        "--max-order-notional-usd",
        "5000"
      ]
    }
  }
}

Inside the agent session, call arena_onboard_and_deposit (generate_ephemeral=true) to provision a wallet, mint testnet collateral + gas, and deposit margin in a single tool call, arena_get_leaderboard to check live Gladiator standings, or run Streamable HTTP mode for remote agents:

arena-mcp --testnet --http-listen-port 8765 --http-bearer-token "$MCP_SECRET"

4. C++23 Header-Only 64-Byte HFT Wire & ArenaITCH Client

Compile directly against -Iinclude with -std=c++23 (when connected to direct/colocated TCP 19100, UDP 19101, and ArenaITCH L3 19102 ports; https://testnet.feraterra.app exposes HTTPS REST + wss://testnet.feraterra.app/ws WebSockets):

#include "arena_hft_client.hpp"
static_assert(sizeof(arena::wire::ArenaWireFrame) == 64);

5. Starter Bots & Self-Tests (examples/)

# Offline deterministic self-tests:
python sdk/python/arena_sdk.py --self-test
python scripts/arena_mcp_server.py --self-test
python examples/quickstart_ccxt_and_preview.py --self-test

# Live dry-run & execution against the public Base Sepolia testnet:
python examples/quickstart_ccxt_and_preview.py --testnet
python examples/quickstart_ccxt_and_preview.py --testnet --execute
python examples/algo_two_sided_quoter.py --testnet
python examples/algo_two_sided_quoter.py --testnet --live
python examples/ai_agent_zero_capital_scanner.py --testnet
python examples/ai_agent_zero_capital_scanner.py --testnet --live

Available Tools

24 tools
arena_auto_liquidateC

Execute an autonomous zero-capital liquidation & backstop bounty sweep across underwater accounts via POST /auto_liquidate.

Inputs: stp, max_lots, market_id, min_bounty_usd, +6 more.

arena_bind_builderC

Bind a trader account to a Builder / Order-Flow Router account and protocol cut share (0..5000 bps).

Inputs: builder_account_id (required), builder_fee_share_bps (required), trader_account_id.

arena_cancel_ordersB

Cancel a specific resting order by order_id or batch-cancel orders by market, side, client_tag_filter, or market_bitmask.

Inputs: side, symbol, order_id, market_id, +5 more.

arena_configure_risk_guardrailsC

Configure agent risk limits: portfolio drawdown kill-switch, per-position Knock-Out barrier, Rolling MMP, and TCP Cancel-on-Disconnect.

Inputs: account_id, cod_market_id, cod_timeout_ms, knockout_symbol, +10 more.

arena_execute_atomic_basketC

Execute an all-or-nothing 2..4-leg atomic cross-market basket / spread trade via POST /basket.

Inputs: legs (required), stp, account_id, client_tag, +2 more.

arena_flash_arbitrageC

Execute zero-pre-margin intra-tick atomic Flash Arbitrage (mint+sell or buy+burn/redeem) on a Bonding-Curve Spot or BoundedClaim market via POST /flash_arb or 64B TCP wire.

Inputs: side (required), stp, symbol, qty_lots, +10 more.

arena_get_account_portfolioC

Inspect account USD balances, physical Spot collateral, perp/claim positions, equity, IMR/MMR, drawdown stop, builder binding, and open orders.

Inputs: account_id.

arena_get_leaderboardA

Fetch the public Gladiator Leaderboard ranking active accounts by equity, PnL, maker BBO streak, volume, or ROI.

Inputs: sort, limit.

arena_get_orderbookC

Fetch live L2/L3 orderbook snapshot for an Arena market by symbol (e.g. BTC/USD:USD or BTC-USD-PERP) or market_id.

Inputs: depth, symbol, market_id.

arena_get_trades_and_candlesC

Fetch recent trades and OHLCV candles for an Arena market.

Inputs: limit, symbol, interval, market_id.

arena_get_withdrawals_and_escape_proofC

Fetch account withdrawal vouchers and optionally verify an off-chain or L1 log-reconstructed Merkle emergency escape proof.

Inputs: limit, pending, asset_id, account_id, +3 more.

arena_health_and_manifestB

Check Arena Exchange daemon health, conservation status, WAL sequence, and public manifest.

Inputs: include_manifest.

arena_list_marketsA

List Arena Exchange markets (Spot, LinearPerpetual, FormulaPerpetual, BoundedClaim, SpreadBook) with exact tick/lot pricing and BBOs.

Inputs: kind, symbol, active_only.

arena_login_walletC

Authenticate an Ethereum wallet via EIP-191 challenge/signature into this MCP session (secrets are bound internally and never echoed back).

Inputs: generate_ephemeral.

arena_manage_prime_subaccountB

Link, unlink (max_guaranty=-2), or execute 0-bps internal USD/base transfers between Prime master and sub-accounts.

Inputs: action (required), amount, asset_id, amount_usd, +7 more.

arena_modify_orderB

Modify an existing resting order price and/or quantity with optional FIFO keep_priority.

Inputs: order_id (required), symbol, qty_lots, market_id, +6 more.

arena_onboard_and_depositC

Self-service AI agent onboarding: logs in or generates an ephemeral EIP-191 wallet, optionally requests testnet collateral from POST /faucet, and optionally deposits ERC-20 margin on-chain into Clearinghouse.

Inputs: rpc_url, drip_gas, asset_symbol, faucet_amount, +6 more.

arena_place_orderC

Submit a limit/market/pegged/IOC/FOK/PostOnly/reduce-only order using exact USD/base or fixed-point tick/lot units over HTTP or 64B TCP wire.

Inputs: side (required), stp, tif, symbol, +27 more.

arena_portfolio_delta_hedgeC

Execute a 1-frame Jacobian residual delta-neutralizing hedge via POST /auto_delta_hedge.

Inputs: account_id, margin_spot, max_qty_lots, base_asset_id, +2 more.

arena_preview_orderB

Stateless dry-run order simulation via POST /order/preview (zero WAL, L3 book, or balance mutation). Returns estimated fills, resting lots, net fee/rebate, and pre/post Eigen-SPAN IMR/MMR/free margin.

Inputs: side (required), stp, tif, symbol, +27 more.

arena_replace_two_sided_quoteC

Atomically replace both resting Bid and Ask quotes on a market via HTTP POST /quote or 64-byte TCP TwoSidedQuoteReplace.

Inputs: stp, tif, symbol, market_id, +21 more.

arena_request_withdrawalC

Request an off-chain debit + operator-signed ARENA_WITHDRAW_V1_4 voucher (blocked unless --allow-withdrawals is explicitly enabled).

Inputs: recipient_eth_address (required), amount, asset_id, account_id, +2 more.

arena_subscribe_express_portC

Purchase or extend a Native Colocation Express Port lease (epochs) for priority wire tie-break and max Core 1 ingress batching.

Inputs: account_id, duration_epochs, use_binary_wire, max_fee_usd_micro.

arena_verify_ledger_tipA

Fetch GET /ledger/tip and cryptographically verify its ARENA_LEDGER_TIP_V2_1 Keccak-256 + secp256k1 operator signature.

Inputs: expected_operator_address.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 24 tools

    Disambiguation4/5

    Most tools target clearly distinct resources or actions, and the descriptions sharply differentiate specialized execution paths like place_order, flash_arbitrage, atomic_basket, and delta_hedge. Minor overlap exists between onboarding/login and between general order placement and specialized order flows, but it is manageable.

    Naming Consistency4/5

    All tools use the arena_ prefix and snake_case, which creates a predictable namespace. Most names follow verb_noun, with a few noun-first exceptions such as arena_portfolio_delta_hedge and arena_flash_arbitrage, but the convention remains readable.

    Tool Count3/5

    At 24 tools, the surface is heavy for an MCP server even though each tool maps to a real exchange capability. Specialized features like express port leasing, leaderboard, auto-liquidation, and delta hedging add breadth but also raise cognitive load.

    Completeness4/5

    The surface covers onboarding/auth, market data, order lifecycle, risk controls, portfolio inspection, withdrawals, ledger verification, and liquidation. Minor gaps remain around dedicated order-status/fill-history endpoints and explicit funding-rate operations, though agents can partially work around these via portfolio and market tools.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Exposes OpenAlice's Trade-as-Git trading workflow to MCP-capable AI agents, enabling broker connections, a git-like approval state machine, and 19 trading tools via Streamable HTTP.
      AGPL 3.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI clients to query live BTC and ETH perpetual markets, wallet analytics, leaderboards, and liquidation maps, then preview and execute guarded trades through non-custodial session keys.
      85 npm
      4
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage accounts and trade on 20+ cryptocurrency exchanges (Binance, Bybit, OKX, Kraken, Hyperliquid and more) through unified tools for placing and canceling orders, checking balances, positions and PnL, fetching market data, and controlling leverage. Includes session management, paper-trading mode, and hosted or self-hosted HTTP/stdio deployment.
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to browse markets and orderbooks, place leveraged market and limit orders, monitor positions and account balance, retrieve AI conviction scores and OHLCV candles, and review behavioral trading profiles through MCP tools.
      10
      MIT