freshcrate
Skin:/
Home > MCP Servers > agent-trade-kit

agent-trade-kit

OKX trading MCP server โ€” connect AI agents to spot, swap, futures, options & grid bots via the Model Context Protocol.

Why this rank:Strong adoptionRecent releaseHealthy release cadence

Description

OKX trading MCP server โ€” connect AI agents to spot, swap, futures, options & grid bots via the Model Context Protocol.

README

OKX Agent Trade Kit

CI codecov npm: mcp npm downloads: mcp npm: cli npm downloads: cli License: MIT

English | ไธญๆ–‡

OKX Agent Trade Kit โ€” an AI-powered trading toolkit with two standalone packages:

Package Description
okx-trade-mcp MCP server for Claude / Cursor and any MCP-compatible AI client
okx-trade-cli CLI for operating OKX from terminal

What is this?

OKX Agent Trade Kit connects AI assistants directly to your OKX account via the Model Context Protocol. Instead of switching between your AI and the exchange UI, you describe what you want โ€” the AI calls the right tools and executes it.

It runs as a local process with your API keys stored only on your machine. No cloud services, no data leaving your device.

Features

Feature Description
140 tools across 10 modules Full trading lifecycle: market data โ†’ orders โ†’ algo orders โ†’ account management โ†’ earn โ†’ trading bots โ†’ event contracts โ†’ news
Algo orders built-in Conditional, OCO take-profit/stop-loss, trailing stop
Safety controls --read-only flag, per-module filtering, built-in rate limiter
Zero infrastructure Local stdio process, no server or database required
MCP standard Works with Claude Desktop, Cursor, openCxxW, and any MCP-compatible client
Agent Skills included Pre-built skill files for AI agent frameworks โ€” drop-in instructions covering market data, trading, portfolio, bots, and earn
Open source MIT license, API keys never leave your machine

Modules

Module Tools Description Docs
market 19 Ticker, orderbook, candles (+history), index ticker, index candles, price limit, funding rate, mark price, open interest, stock tokens, technical indicators (70+ indicators: MA/EMA/RSI/MACD/BB/ATR/KDJ/BTCRAINBOW/AHR999 and more โ€” no auth required), indicator list, market filter (screen by price/change/marketCap/volume/fundingRate/OI), OI history, OI change filter โ†’
spot 13 Place/cancel/amend orders, batch orders, fills (+archive), order history (+archive), conditional orders, OCO โ†’
swap 17 Perpetual trading, batch orders, positions, leverage, conditional orders, OCO, trailing stop โ†’
futures 18 Delivery contract trading, positions, fills, order history, amend/close/leverage, batch orders, algo orders (TP/SL, OCO, trailing stop) โ†’
option 10 Options trading: place/cancel/amend/batch-cancel, order history, positions (with Greeks), fills, option chain, IV + Greeks โ†’
account 14 Balance, bills (+archive), positions, positions history, fee rates, config, position mode, max withdrawal, max avail size, audit log โ†’
event 9 Event contract trading: browse, series, events, markets (query); place, amend, cancel, orders, fills (private). Semantic outcome values: UP/YES/DOWN/NO โ†’
earn 23 Simple Earn: balance, purchase, redeem, lending rate, fixed-term orders (10). On-chain staking/DeFi (6). Dual Currency Deposit/ๅŒๅธ่ตข (6). Flash Earn (1). Sub-modules: earn.savings, earn.onchain, earn.dcd, earn.flash. Included in all. โ†’
bot 10 Trading bots: Grid (5) and DCA โ€” Spot & Contract (5). Sub-modules: bot.grid, bot.dca โ†’
news 7 Crypto news: latest news, by-coin filter, full-text search, article detail, news sources, coin sentiment (snapshot + trend) โ†’

Quick Start

Prerequisites: Node.js >= 18

# 1. Install
npm install -g @okx_ai/okx-trade-mcp @okx_ai/okx-trade-cli

# 2. Configure OKX API credentials (interactive wizard)
okx config init

# 3. Register the MCP server with your AI client
okx-trade-mcp setup --client claude-desktop
okx-trade-mcp setup --client cursor
okx-trade-mcp setup --client claude-code
okx-trade-mcp setup --client vscode          # writes .mcp.json in current directory

Alternative: One-line install script โ€” handles Node.js check, install, and client detection automatically.

For live trading, multiple profiles, or other clients, see configuration โ†’.


okx-trade-mcp

okx-trade-mcp                                        # default: spot, swap, account
okx-trade-mcp --modules market                       # market data only (no auth needed)
okx-trade-mcp --modules spot,account                 # spot trading + account
okx-trade-mcp --profile live --modules all           # all modules including earn
okx-trade-mcp --read-only                            # query tools only, no writes

Startup scenarios โ†’ โ€” VS Code ยท Windsurf โ†’


okx-trade-cli

okx market ticker BTC-USDT
okx spot place --instId BTC-USDT --side buy --ordType market --sz 100
okx account balance

Full CLI reference โ†’


Agent Skills

Pre-built skill files for AI agent frameworks are included in the skills/ directory. Each skill tells the agent when to activate and how to use the okx CLI for a specific task category.

Skill Description Auth
okx-cex-market Market data: prices, candles, order books, funding rates, technical indicators No
okx-cex-trade Order management: spot, swap, futures, options, algo orders Yes
okx-cex-portfolio Account: balances, positions, P&L, transfers Yes
okx-cex-bot Trading bots: grid and DCA (spot & contract) Yes
okx-cex-earn Earn: Simple Earn, On-chain staking, Dual Investment, AutoEarn Yes

Skills documentation โ†’


Reporting Issues

If a tool call or CLI command fails, open an issue and include the full error output.

MCP โ€” copy the structured error block shown in your AI client:

{
  "tool": "swap_place_order",
  "error": true,
  "type": "OkxApiError",
  "code": "51020",
  "message": "Order quantity invalid",
  "endpoint": "POST /api/v5/trade/order",
  "traceId": "abc123def456",
  "timestamp": "2026-03-03T10:00:00.000Z",
  "serverVersion": "1.0.4"
}

CLI โ€” paste the full stderr output:

Error: Order quantity invalid
TraceId: abc123def456
Hint: Check order size against instrument minSz.
Version: okx-trade-cli@1.0.4

See FAQ โ†’ for common issues.


Build from Source

git clone https://github.com/okx/agent-tradekit.git && cd okx-trade-mcp
pnpm install && pnpm build

See CONTRIBUTING.md for the full development guide.

packages/
โ”œโ”€โ”€ core/    # shared client & tools
โ”œโ”€โ”€ mcp/     # MCP Server
โ””โ”€โ”€ cli/     # CLI tool

Documentation

Document Description
Architecture System design and module overview
Contributing Development setup and PR guidelines
Changelog Version history
Agent Skills Pre-built skills for AI agent frameworks
Security Vulnerability reporting

Release History

VersionChangesUrgencyDate
github-main@2026-06-02Latest activity on github-main branchHigh6/2/2026
0.0.0No release found โ€” using repo HEADHigh4/8/2026
master@2026-04-08Latest activity on master branchHigh4/8/2026
master@2026-04-08Latest activity on master branchHigh4/8/2026
master@2026-04-08Latest activity on master branchHigh4/8/2026
master@2026-04-08Latest activity on master branchHigh4/8/2026
master@2026-04-08Latest activity on master branchHigh4/8/2026
master@2026-04-08Latest activity on master branchMedium4/8/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

pdf-reader-mcp๐Ÿ“„ Production-ready MCP server for PDF processing - 5-10x faster with parallel processing and 94%+ test coveragev2.4.3
polymarket-trader-mcpThe most comprehensive MCP server for Polymarket โ€” 48 tools spanning direct trading, market discovery, smart money tracking, copy trading, backtesting, risk management, and portfolio optimization. Worv1.6.7
cesium-mcp-runtimeCesium MCP Runtime Server โ€” AI Agent ้€š่ฟ‡ MCP ๅ่ฎฎๆ“ๆŽงๆต่งˆๅ™จ Cesiumcesium-mcp-dev@1.142.0
justoneapi-mcpProduction-ready MCP server exposing JustOneAPI endpoints to AI agents with raw JSON responses.main@2026-06-06
microsandbox-mcpMCP server for microsandbox โ€” manage microVM sandboxes from any AI agentmain@2026-06-05

More in MCP Servers

PlanExeCreate a plan from a description in minutes
agentroveYour own Claude Code UI, sandbox, in-browser VS Code, terminal, multi-provider support (Anthropic, OpenAI, GitHub Copilot, OpenRouter), custom skills, and MCP servers.
ProxmoxMCP-PlusEnhanced Proxmox MCP server with advanced virtualization management and full OpenAPI integration.
node9-proxyThe Execution Security Layer for the Agentic Era. Providing deterministic "Sudo" governance and audit logs for autonomous AI agents.