o2 Exchange MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@o2 Exchange MCP Serverget the current RSI and MACD for the ETH/USDC market"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
o2-mcp-server
MCP (Model Context Protocol) server for the o2 Exchange - A fully on-chain DEX on the Fuel Network. Provides AI agents with trading capabilities, market data access, and technical analysis tools.
Features
Account Management - Create trading sessions, check balances, manage sessions
Trading Operations - Place, cancel orders with session-based authentication
Market Data - Real-time tickers, order books, trade history, and candlestick data
Technical Analysis - 16+ indicators (RSI, MACD, ADX, BBands, VWAP, etc.) with snapshot/window modes
Related MCP server: Jupiter Perps MCP Server
Available Tools
Tool | Description |
| List all available trading markets |
| Get real-time market ticker data |
| Fetch order book depth (bids/asks) |
| Get recent trade history |
| Calculate technical indicators (RSI, MACD, ADX, BBands, VWAP, etc.) |
| Create a new trading account |
| Check asset balance in trading account |
| Create trading session with owner key |
| List all stored sessions |
| Get details of a specific session |
| Place orders (Spot, Market, FillOrKill, PostOnly) |
| Cancel an existing order |
| Get order history with pagination |
Installation
bun install
bun run buildConfiguration
Environment Variables
O2_NETWORK=devnet # devnet (default), testnet, or mainnet
O2_PRIVATE_KEY=<your_key> # Owner private key for tradingNote: Trading sessions are automatically created and stored in
~/.o2-mcp/sessions.jsonfor reuse across sessions.
Claude Code
claude mcp add-json o2-mcp-server '{
"type": "stdio",
"command": "node",
"args": ["/path/to/o2-mcp/dist/stdio.js"],
"env": {
"O2_NETWORK": "devnet",
"O2_PRIVATE_KEY": "your_private_key"
}
}'Codex
Add to .codex/config.toml:
[mcp_servers.o2_mcp]
command = "node"
args = ["/path/to/o2-mcp/dist/stdio.js"]
env = { O2_NETWORK = "devnet", O2_PRIVATE_KEY = "your_private_key" }Other MCP Clients
Add to your MCP client config (e.g., mcp.json):
{
"mcpServers": {
"o2-mcp": {
"type": "stdio",
"command": "node",
"args": ["/path/to/o2-mcp/dist/stdio.js"],
"env": {
"O2_NETWORK": "devnet",
"O2_PRIVATE_KEY": "your_private_key"
}
}
}
}Usage
IMPORTANT: Always ask the agent to create a trading account and session before making trades. Each session lives upto 48 hours
Technical Analysis with Indicators
// Get comprehensive technical indicators for ETH/USDC
{
marketId: "0x09c17f779eb0a7658424e48935b2bef24013766f8b3da757becb2264406f9e96",
indicators: ["rsi_14", "macd", "adx_14", "bbands", "vwap", "stoch"],
resolution: "5m",
period: "24h",
mode: "snapshot",
microSummary: true
}
// Returns: Current indicator values, trend bias, momentum, volatility assessmentPlace Order
// Buy 5 USDC worth of FUEL at 1.50 USDC per token
{
tradeAccountId: "0x...",
pair: ["FUEL", "USDC"],
side: "Buy",
orderType: "Spot",
rawPrice: "1.50",
rawQuantity: "5.0",
sessionId: "session_123"
}Market Data
// Get ETH/USDC ticker
{
marketId: "0x09c17f779eb0a7658424e48935b2bef24013766f8b3da757becb2264406f9e96"
}
// Get order book depth
{
marketId: "0x09c17f779eb0a7658424e48935b2bef24013766f8b3da757becb2264406f9e96",
precision: "2"
}AI Prompts
Sample Chat: https://claude.ai/share/2fde9575-755e-4623-a651-47c4f0627e86
Create Session
Initialize trading account and create a session to trade ETH/USDC
Note: When creating an account with o2_account_create, the owner address is automatically derived from your O2_PRIVATE_KEY environment variable if not explicitly provided.
Placing order
Market Buy 2 USDC worth of ETH
Analyze Market
Comprehensive technical analysis of a market.
/o2-mcp:Analyze_Market <market_id> <period>Example:
/o2-mcp:Analyze_Market 0x09c17f779eb0a7658424e48935b2bef24013766f8b3da757becb2264406f9e96 24hAnalyzes trend, momentum, volatility, support/resistance, and provides trading recommendations.
Technical Indicators
Supported indicators with o2_indicators tool:
Moving Averages: sma_20, sma_50, ema_12, ema_26, vwap
Momentum: rsi_14, mfi_14, cci_20, stoch
Trend: adx_14, plus_di, minus_di, macd
Volatility: bbands, atr_14
Volume: obv
Snapshot Mode (Default)
Returns latest values with metadata, previous values, deltas, and derived fields (%B, bandwidth, ATR distances).
Window Mode
Returns arrays of historical values aligned to timestamps for charting and analysis.
Order Types
Spot: Standard limit order (default)
Market: Execute at best available price
FillOrKill: Fill completely or cancel (no partial fills)
PostOnly: Maker-only order (adds liquidity)
Learn More
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceEnables AI assistants to perform cryptocurrency trading analysis and execution with 38+ tools including real-time market data, technical indicators, risk management, and support for both paper trading and live execution on Hyperliquid.Last updated6MIT
- FlicenseAqualityCmaintenanceEnables AI agents to trade leveraged perpetual futures on Solana's Jupiter Perpetuals while providing tools for market data and technical analysis. It supports portfolio management, fee estimation, and automated position execution for SOL, ETH, and BTC using USDC collateral.Last updated132
- Alicense-qualityDmaintenanceConnect AI agents to the Aevo trading platform. Retrieve market data, manage accounts, and execute trades easilyLast updatedMIT
- AlicenseAqualityCmaintenanceEnables AI agents to trade forex, metals, indices, and cryptocurrencies via the Model Context Protocol using the XBTFX Trading API. It provides comprehensive tools for managing account balances, retrieving market data, and executing trade operations like opening, modifying, or closing positions.Last updated1526MIT
Related MCP Connectors
Crypto market data for AI agents via x402. 16 tools: prices, funding, DeFi yields, arbitrage, TA.
Build, backtest, and deploy quantitative trading strategies from your AI agent.
Pay-per-use weather, environment, finance, and on-chain intelligence tools for AI agents via x402.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/o2-exchange/o2-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server