Agent Trade Kit

Finance and commerce

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

Your AI app calls the Agent Trade Kit MCP server, which does the finance and commerce work and sends the result back to the chat.

About Agent Trade Kit

Agent Trade Kit is a community MCP server from okx, filed in our directory under finance and commerce. OKX trading MCP server, connect AI agents to spot, swap, futures, options & grid bots via the Model Context Protocol.

At a glance

Publisher
okx (community)
Runs
See the README for setup
Written in
TypeScript
License
MIT
GitHub stars
526

How to set up Agent Trade Kit

  1. Follow the install steps in the Agent Trade Kit README; it is written in TypeScript, so have that toolchain ready.
  2. Check the Agent Trade Kit README for keys or settings; the registry lists none that Agent Trade Kit requires.
  3. Add Agent Trade Kit to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Agent Trade Kit tools to confirm the connection.
  5. Run one read-only task with Agent Trade Kit first, and keep your app asking before each tool call until the results look right.

Agent Trade Kit compared with similar servers

  • Risk-Aware Trading Agents by jackson-cmd has fewer GitHub stars than Agent Trade Kit (521 against 526); both are community servers, and both run locally.
  • Oracle3 prediction-market agent tools by YichengYang-Ethan has more GitHub stars than Agent Trade Kit (574 against 526); both are community servers, and both run locally.
  • Polymarket Paper Trader by agent-next has fewer GitHub stars than Agent Trade Kit (506 against 526); both are community servers, and both run locally.

Before you connect Agent Trade Kit

  • Give Agent Trade Kit its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Agent Trade Kit tool call until you trust what it does with them.
  • Treat text that Agent Trade Kit fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Agent Trade Kit on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Agent Trade Kit

How marketing and sales teams put Agent Trade Kit to work, by company size. Pick the size closest to yours and start Agent Trade Kit on one use case.

Small business

  • A small business can ask Agent Trade Kit which products and customers drive margin, then plan promotions around them.
  • Owners can use Agent Trade Kit to check refunds, failed payments and churn reasons without opening three dashboards.
  • Agent Trade Kit runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Ecommerce teams can connect Agent Trade Kit to tie campaigns to orders and revenue, not just clicks.
  • Marketing and finance can use Agent Trade Kit to check spend against budget each week and move money to what's working.
  • Start Agent Trade Kit on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should keep Agent Trade Kit read-only for agents, with any money movement handled by people and existing approvals.
  • Large commerce teams can use Agent Trade Kit to answer revenue questions by channel and region with figures finance signs off on.
  • Agent Trade Kit is a community server, so have security review the code and pin a version before Agent Trade Kit touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Agent Trade Kit README

From okx/agent-trade-kit on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

OKX Agent Trade Kit

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
174 tools across 11 modules (17 sub-modules) Full trading lifecycle: market data → orders → algo orders → account management → earn → trading bots → event contracts → news → smart money signals
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 24 Simple Earn: balance, purchase, redeem, lending rate, fixed-term products query, 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 30 Trading bots: Grid (9), DCA, Spot & Contract (9) and Smart Portfolio (12). Sub-modules: bot.grid, bot.dca, bot.smartportfolio. Recurring Buy is available as CLI-only okx bot recurring commands (no MCP tools) →
news 7 Crypto news: latest news, by-coin filter, full-text search, article detail, news sources, coin sentiment (snapshot + trend) →
smartmoney 10 Smart money analytics: leaderboard ranking, trader performance / positions / position history / order history, top-coin signals, single-asset signal (by coin / by traders), signal history (by coin / by traders), all read-only, split by entry mode for AI-agent disambiguation →

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

Naming note, CLI subcommands use spaces (okx swap algo place). AI agents see the same features under underscored MCP tool names (swap_place_algo_order). Do not convert MCP identifiers into hyphen-joined CLI commands, okx swap place-algo is not valid. See CLI reference · CLI vs MCP tool names.

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, DCA (spot & contract), Smart Portfolio and Recurring Buy Yes
okx-cex-earn Earn: Simple Earn, On-chain staking, Dual Investment, AutoEarn Yes
okx-cex-smartmoney Smart Money: trader leaderboard, consensus signals, position analysis 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

Questions about Agent Trade Kit

What is the Agent Trade Kit MCP server?

OKX trading MCP server, connect AI agents to spot, swap, futures, options & grid bots via the Model Context Protocol. Agent Trade Kit is maintained by okx on GitHub at okx/agent-trade-kit, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Agent Trade Kit MCP server?

Agent Trade Kit doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (okx/agent-trade-kit). Like most servers, Agent Trade Kit ends with a command or URL you paste into your AI app's MCP config.

Does Agent Trade Kit need an API key?

The registry lists no required keys for Agent Trade Kit. Check the Agent Trade Kit README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Agent Trade Kit an official MCP server?

No. Agent Trade Kit is a community server maintained by okx. Community servers can be excellent; read the code and the open issues before you give Agent Trade Kit access to company data.

What license is Agent Trade Kit under?

Agent Trade Kit is released under the MIT license, according to its GitHub repository. The license covers the code of Agent Trade Kit; the service it connects to has its own terms.