Skip to main content
The ouroborai MCP (Model Context Protocol) server exposes DeFi tools directly in your AI coding environment. This lets Claude Code, Claude Desktop, or Cursor execute swaps, manage positions, and query portfolio data without switching to a browser.

Available Tools

The MCP server exposes these tools:
ToolDescription
arb_quoteGet swap quote without executing
arb_tradeExecute spot swap (Uniswap V3 / Camelot)
arb_perp_openOpen GMX V2 leveraged position
arb_perp_closeClose GMX V2 position
arb_perp_positionsList open perpetual positions
arb_lend_supplySupply asset to Aave V3
arb_lend_borrowBorrow from Aave V3
arb_lend_healthGet Aave health factor
arb_timeboost_statusExpress lane status
arb_timeboost_bidBid for express lane round
arb_session_keyCreate scoped trading session key
arb_batchAtomic multi-step DeFi execution
arb_portfolioFull portfolio snapshot
arb_rwa_scanScan RWA stocks on Robinhood Chain
arb_prediction_searchSearch Polymarket prediction markets
arb_alchemix_accountAlchemix V2 self-repaying loan data
arb_install_skillInstall a skill from GitHub URL

Setup

First, build the MCP server:
cd apps/mcp-server
bun run build
This produces dist/index.js which runs as a stdio-based MCP server.
// ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
// %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "arbitrum-agent": {
      "command": "node",
      "args": ["/absolute/path/to/apps/mcp-server/dist/index.js"],
      "env": {
        "PRIVATE_KEY": "0xYOUR_PRIVATE_KEY",
        "ARB_RPC_URL": "https://arb-mainnet.g.alchemy.com/v2/YOUR_KEY"
      }
    }
  }
}
The MCP configuration file contains your private key in plaintext. Do NOT commit .mcp.json or claude_desktop_config.json to version control. The repository .gitignore excludes .mcp.json by default.

Usage Examples

After configuration, you can interact with the tools through natural language in your AI client:
"Get me a quote for swapping 500 USDC to ETH"
→ Calls arb_quote with tokenIn=USDC, tokenOut=ETH, amountIn=500

"Open a 10x long on ETH with 200 USDC collateral"
→ Calls arb_perp_open with market=ETH/USDC, side=long, leverage=10

"What's my portfolio?"
→ Calls arb_portfolio, returns balances + Aave + GMX positions

"Check my Aave health factor"
→ Calls arb_lend_health, returns health factor and status

Security Considerations

The MCP server has full access to the configured wallet. Any tool call that modifies on-chain state (trades, lending, perpetuals) will execute using the private key in the environment.
To limit risk:
  • Use a dedicated hot wallet with limited funds
  • Set up session keys via arb_session_key with spending limits and protocol restrictions
  • Review tool calls before confirming execution in your AI client
  • Consider using Arbitrum Sepolia for testing before mainnet

Troubleshooting

Ensure the command path points to a valid node binary and the args path points to the built dist/index.js. Try running the command manually to check for errors:
PRIVATE_KEY=0x... ARB_RPC_URL=https://... \
  node apps/mcp-server/dist/index.js
The server should start without output (it communicates via stdio).
Common causes:
  • PRIVATE_KEY not set or invalid format (must start with 0x)
  • ARB_RPC_URL unreachable or rate-limited
  • Insufficient ETH for gas or USDC for trades
  • Token symbol not recognized (use: USDC, WETH, ETH, ARB, WBTC, PENDLE)