Skip to main content

Overview

The ouroborai MCP server exposes Arbitrum DeFi tools through the Model Context Protocol, a standard for connecting AI assistants to external capabilities. This lets you use ouroborai’s trading, lending, and portfolio tools directly from Claude Desktop, Cursor, or any MCP-compatible client. The server runs as a local stdio process and communicates with the AI client over stdin/stdout. No HTTP server or port binding is required.

Available tools

The MCP server provides 17 tools organized by function:
Parameters for arb_quote:Parameters for arb_trade:
Parameters for arb_perp_open:
Parameters for arb_lend_supply / arb_lend_borrow:
Parameters for arb_timeboost_bid:
Parameters for arb_session_key:

Configuration

Claude Desktop

Add the server to your claude_desktop_config.json:
The PRIVATE_KEY controls the wallet used for all on-chain operations. Use a dedicated trading wallet, not your primary wallet. Never commit this value to version control.

Cursor

Add the server to your Cursor MCP settings (.cursor/mcp.json in your project root):

Claude Code

Add the server to your project’s .mcp.json:

Environment variables

Building from source

The MCP server must be compiled before use:
The build produces dist/index.js which is the entry point for MCP clients. Dependencies like @zerodev/*, permissionless, and tslib must be marked as external during the build.
The build order matters in the monorepo. Build the SDK package first, then adapters, skills, timeboost, and smart-account packages, and finally the MCP server.

Tool usage examples

Here are example interactions showing how Claude uses the MCP tools:
User: Swap 100 USDC for ETHClaude calls: arb_quote with { tokenIn: "USDC", tokenOut: "WETH", amountIn: "100" }Tool returns:
Claude calls: arb_trade with { tokenIn: "USDC", tokenOut: "WETH", amountIn: "100" }Tool returns:
User: What is my Aave health factor?Claude calls: arb_lend_health with {}Tool returns:
User: Open a 10x long on ETH/USDC with 500 USDC collateralClaude calls: arb_perp_open with:
Tool returns:
User: Show me my portfolioClaude calls: arb_portfolio with {}Tool returns:

Token resolution

Tools that accept token symbols resolve them to on-chain addresses automatically. Supported symbols: You can also pass full contract addresses (starting with 0x) instead of symbols.

Architecture

The MCP server is a standalone stdio process that:
  1. Receives tool call requests from the AI client over stdin
  2. Initializes a ArbWallet instance from the PRIVATE_KEY environment variable
  3. Dispatches tool calls to the appropriate protocol adapter (Uniswap, GMX, Aave, etc.)
  4. Returns JSON results over stdout
The server uses the @modelcontextprotocol/sdk package with StdioServerTransport. It does not open any network ports or accept HTTP connections — all communication happens through the parent process’s stdio pipes.