OKX × Claude Desktop — AI-powered Crypto Trading, no coding required
Connect Claude AI directly to your OKX account · Spot · Futures · Options · Grid Bot · Natural language commands
5 roadblocks between you and AI Crypto Trading
OKX MCP already exists — but getting it installed correctly so Claude can "see" it is a journey of its own:
📦 #1 — Install Node.js
npm uses Node, not Python. LTS or Current? Is PATH set correctly?
🔑 #2 — Create an OKX API key
DEMO or LIVE? Sub-account or main? Where's the passphrase? IP whitelist?
📝 #3 — Edit config.toml
File lives at %USERPROFILE%\.okx\ — one wrong line and auth fails.
⚙️ #4 — Register MCP with Claude
Edit claude_desktop_config.json with exact JSON syntax.
🔌 #5 — Signature / 50113 errors
Picked the wrong DEMO/LIVE → bad signature → no clue where to fix it.
Code2trade wraps everything into 1_SETUP_chay_mot_lan.bat
A single .bat file does it all: installs Node.js, installs okx-trade-mcp, opens a wizard popup where you paste your API key — no hand-editing of any config file. The wizard verifies against OKX in real time as you type, with clear error messages before anything is saved.
Visit nodejs.org, download Node.js LTSnpm install -g @okx_ai/okx-trade-mcpCreate the %USERPROFILE%\.okx\ folderHand-write config.toml with api_key / secret / passphraseOpen claude_desktop_config.json, add the MCP entryRestart Claude Desktop, hope there's no JSON errorError 50113 → figure out how DEMO and LIVE differ
- Step 1: Double-click 1_SETUP_chay_mot_lan.bat
- Step 2: Wait for Node.js + OKX package auto-install (~3 minutes)
- Step 3: Wizard pops up → choose DEMO/LIVE → paste 3 keys → Test → Save
✓ Auto-installs okx-trade-mcp from npm
✓ Wizard verifies the API key with OKX as you type
✓ Auto-writes config.toml in the correct format
✓ Auto-registers the MCP with Claude Desktop
✓ Creates an "OKX + Claude AI" shortcut on your Desktop
4 steps from download to your first crypto command
Follow in order. Total time: ~5 minutes (first run).
Prepare your OKX account & API key
Sign in to okx.com → go to My Account → API → create a new API key.
For safety, start with Demo Trading (toggle in the top corner of the OKX page). Tick Read + Trade permissions. Save your API Key, Secret Key, and Passphrase — the Passphrase is set by you at creation and cannot be recovered later.
Extract & run 1_SETUP_chay_mot_lan.bat
Download OKX-MCP-Setup.rar from the button below, extract it to any folder.
Double-click 1_SETUP_chay_mot_lan.bat. If Windows SmartScreen warns you → "More info" → "Run anyway". The script runs through 4 stages automatically:
Enter the API key in the wizard popup
The wizard window appears — no need to open Notepad or hand-edit any file:
- Select DEMO or LIVE
- API Key — ~32-character string from OKX
- Secret Key — ~32-character string
- Passphrase — the password you set when creating the key
Click "Test Connection" → the wizard calls the OKX API to verify immediately. If you see "✓ Connected" → click "Save & Continue". Setup writes the config and registers the MCP with Claude Desktop. When you see "SETUP COMPLETE!" → you're done.
Open Claude Desktop & start trading
Click the "OKX + Claude AI" shortcut on your Desktop (created during setup) to open Claude Desktop with the MCP already connected.
Verify with your first command:
If AI returns the balance → you're connected. If there's an error → re-run 0_WIZARD_doi_API_KEY.bat to recheck your keys.
Sample commands — speak naturally, Claude understands
Chat in Claude Desktop like any normal conversation. Try these right away:
Account
Balance, open positions, history, trading fees
Market
Realtime prices, orderbook, candles, funding rate
Spot & Futures
Market/limit orders, SL/TP, close positions
Grid / DCA Bot
Create, list, stop bots automatically
The full feature set once setup is done
The OKX Agent Trade Kit unlocks 30+ operations — from market data to automated bots:
💼 Account & balance
Check balance, equity, margin, trading history, fees, daily/weekly P&L.
📊 Market data
Realtime prices, orderbook depth, OHLCV candles on any timeframe, funding rate, open interest.
🛒 Spot Trading
Market, limit, IOC orders. OCO-style Stop Loss / Take Profit. Cancel single or all orders.
⚡ Futures / Swap
Long/short with leverage, cross/isolated margin. Close positions, adjust leverage, trailing stop.
🎲 Options
View option chains and Greeks (Delta, Gamma, Theta, Vega) by expiry and strike price.
🤖 Grid & DCA Bot
Create grid bots with range/grids/capital. Create DCA bots. List and stop running bots.
- Windows 10 / 11 64-bit
- Claude Desktop installed with a Claude Pro / Team account — download at claude.ai/download
- OKX account with KYC completed + an API key (DEMO or LIVE)
- Node.js — not required, the script auto-installs via winget
Download OKX MCP Setup — Code2trade
Includes 1_SETUP_chay_mot_lan.bat, 0_WIZARD_doi_API_KEY.bat, GUI installer · Supports Windows 10/11
⬇ Download — OKX-MCP-Setup.rar.rar file · Free · Updated June 2026