
OKX MCP Server
Connects Claude to the OKX cryptocurrency exchange API, exposing both trading operations and market data retrieval. You get account management tools for checking balances, positions, and risk metrics, plus order execution capabilities including placing orders, canceling them, and liquidating positions. The server supports both production and demo trading modes through environment flags, and can run via uvx or Docker with HTTP transport. Includes market ticker data for tracking cryptocurrency rankings. Requires OKX API credentials with key, secret, and passphrase. Useful when you need Claude to monitor crypto positions, execute trades based on analysis, or pull real-time market data from OKX without switching contexts.
- GitHub stars
- 2
- tools
- 11
- transport
- STDIO
- last updated
- Nov 10, 2025
Tools
11 toolsPublic tool metadata for what this MCP can expose to an agent.
account_configGet account configuration
Get account configuration
No parameter schema in public metadata yet.
account_balanceGet account balance
Get account balance
No parameter schema in public metadata yet.
account_positionsGet account positions
Get account positions
No parameter schema in public metadata yet.
account_position_riskGet account position risk
Get account position risk
No parameter schema in public metadata yet.
place_orderPlace a new order
Place a new order
No parameter schema in public metadata yet.
cancel_orderCancel an incomplete order
Cancel an incomplete order
No parameter schema in public metadata yet.
get_trade_orderGet order details
Get order details
No parameter schema in public metadata yet.
get_order_listGet incomplete order list
Get incomplete order list
No parameter schema in public metadata yet.
get_orders_historyGet Order History
Get Order History
No parameter schema in public metadata yet.
close_positionsLiquidate all positions
Liquidate all positions
No parameter schema in public metadata yet.
market_tickersGet cryptocurrency rankings
Get cryptocurrency rankings
No parameter schema in public metadata yet.
Sponsors
Readme
🆗 OKX MCP Server
📲 Install
Method 1: uvx
{
"mcpServers": {
"mcp-okx": {
"command": "uvx",
"args": ["mcp-okx"],
"env": {
"OKX_API_KEY": "your-okx-api-key",
"OKX_API_SECRET": "api-secret-key",
"OKX_PASSPHRASE": "api-passphrase",
"OKX_TRADE_FLAG": "1", # 0: Production trading, 1: Demo trading
"OKX_BASE_URL": "https://www.okx.com", # Optional
"MCP_AUTH_TOKEN": "your-custom-token" # Default same as OKX_API_KEY
}
}
}
}
Method 2: Docker
mkdir /opt/mcp-okx
cd /opt/mcp-okx
wget https://raw.githubusercontent.com/aahl/mcp-okx/refs/heads/main/docker-compose.yml
docker-compose up -d
{
"mcpServers": {
"mcp-okx": {
"url": "http://0.0.0.0:8811/mcp", # Streamable HTTP
"headers": {
"Authorization": "Bearer your-okx-api-key-or-custom-token"
}
}
}
}
⚙️ Environment variables
Details
- Repository
- github.com/aahl/mcp-okx
- Package
mcp-okx- Transport
- STDIO
- Registry
- MCP registry, active