OKX Trade
OKX trading MCP CLI cryptocurrency spot futures swap AI agent Model Context Protocol Cursor Claude npm automated trading crypto API toolkit TypeScript open-source DeFi CEX
What is OKX Trade?
OKX Trade is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to okx trading mcp cli cryptocurrency spot futures swap ai agent model context protocol cursor claude npm automated trading crypto api toolkit typescript open-source defi cex
OKX trading MCP CLI cryptocurrency spot futures swap AI agent Model Context Protocol Cursor Claude npm automated trading crypto API toolkit TypeScript open-source DeFi CEX
This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- OKX trading MCP CLI cryptocurrency spot futures swap AI agen
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx okx-tradeConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use OKX Trade
OKX Trade MCP is a comprehensive cryptocurrency trading toolkit that connects AI assistants to the OKX exchange via the Model Context Protocol. It exposes 145 tools across 11 modules covering spot, futures, perpetual swaps, options, earn products, grid bots, and market data. Traders can execute orders, monitor positions, run technical analysis across 70+ indicators, and manage portfolio balances entirely through natural language in Claude Desktop or Cursor. A read-only mode makes it safe to explore market data without risking accidental order placement.
Prerequisites
- Node.js 18 or higher installed
- An OKX exchange account with API keys (API Key, Secret Key, and Passphrase) generated in OKX account settings
- An MCP-compatible client such as Claude Desktop or Cursor
- npm installed for global package installation
Install the OKX Trade MCP and CLI packages
Install both the MCP server and the companion CLI tool globally using npm. Both packages are required for full functionality.
npm install -g @okx_ai/okx-trade-mcp @okx_ai/okx-trade-cliInitialize your OKX API credentials
Run the interactive configuration wizard to store your OKX API Key, Secret Key, and Passphrase locally on your machine. Credentials are never sent to any cloud service. You can create multiple profiles for different environments (e.g., live vs. testnet).
okx config initTest the connection with a market data query
Verify your setup is working by fetching the BTC-USDT ticker price from the command line before wiring it into your MCP client.
okx market ticker BTC-USDTConfigure your MCP client
Add the OKX Trade MCP server to your Claude Desktop or Cursor configuration file. Use the --read-only flag if you only need market data queries without order execution.
{
"mcpServers": {
"okx-trade": {
"command": "okx-trade-mcp",
"args": ["--modules", "spot,account,market"]
}
}
}Restart your MCP client and verify tools are available
Restart Claude Desktop or Cursor. You should see the OKX tools appear in the available tools list. Try asking for your account balance or the current price of a token to confirm the connection.
OKX Trade Examples
Client configuration (Claude Desktop)
Full claude_desktop_config.json entry enabling spot trading, account management, and market data modules.
{
"mcpServers": {
"okx-trade": {
"command": "okx-trade-mcp",
"args": ["--modules", "spot,account,market,earn"]
}
}
}Prompts to try
Example natural language prompts you can use with the OKX Trade MCP in Claude or Cursor.
- "What is the current price of ETH-USDT and what do the RSI and MACD indicators show?"
- "Show me my account balance across all currencies."
- "Place a limit buy order for 0.01 BTC at $60,000 on the spot market."
- "What are the top traders on OKX leaderboard doing right now? Show me their positions."
- "Set up a grid trading bot for ETH-USDT between $2,800 and $3,200 with 10 grids."Troubleshooting OKX Trade
Authentication errors when placing orders
Re-run `okx config init` to re-enter your API credentials. Make sure your OKX API key has 'Trade' permission enabled in your OKX account settings. IP whitelisting on the API key can also cause failures if your IP changes.
Only want to view market data without risk of placing orders
Start the MCP server with the `--read-only` flag: set args to `["--read-only"]` in your config. This disables all order placement and account modification tools while keeping market data tools active.
Too many tools listed and the client is slow to load
Use the `--modules` flag to load only the modules you need (e.g., `--modules spot,account,market`). Loading all 11 modules exposes 145 tools which may overwhelm some MCP clients.
Frequently Asked Questions about OKX Trade
What is OKX Trade?
OKX Trade is a Model Context Protocol (MCP) server that okx trading mcp cli cryptocurrency spot futures swap ai agent model context protocol cursor claude npm automated trading crypto api toolkit typescript open-source defi cex It connects AI assistants to external tools and data sources through a standardized interface.
How do I install OKX Trade?
Follow the installation instructions on the OKX Trade GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with OKX Trade?
OKX Trade works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is OKX Trade free to use?
Yes, OKX Trade is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
OKX Trade Alternatives — Similar Finance & Fintech Servers
Looking for alternatives to OKX Trade? Here are other popular finance & fintech servers you can use with Claude, Cursor, and VS Code.
ValueCell
★ 10.7kValueCell is a community-driven, multi-agent platform for financial applications.
Vibe Trading
★ 8.1k'Vibe-Trading: Your Personal Trading Agent'
Quantdinger
★ 6.2kAI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading
TradingView
★ 2.8kReal-time crypto & stock screening, advanced technical indicators, Bollinger Bands intelligence, candlestick patterns + native Claude Desktop integration. Multi-exchange (Binance, KuCoin, Bybit+). Open-source AI trading infrastructure.
Financial Datasets
★ 2.1kProvides access to comprehensive financial data including income statements, balance sheets, cash flow statements, stock prices, company news, SEC filings, and cryptocurrency information with built-in financial ratio analysis.
Stripe
★ 1.6kThe Stripe Model Context Protocol server allows you to integrate with Stripe APIs through function calling. This protocol supports various tools to interact with different Stripe services.
Browse More Finance & Fintech MCP Servers
Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up OKX Trade in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use OKX Trade?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.