OKX Agent Trade Kit: AI-Native Trading on the OKX Exchange
OKX trading MCP server — connect AI agents to spot, swap, futures, options & grid bots via the Model Context Protocol.
At a glance
- What is it?
- OKX Agent Trade Kit is an MCP server and CLI that exposes 167 trading tools on OKX directly to AI agents like Claude Desktop and Cursor. It covers spot, perpetual swap, futures, options, grid bots, and smart money signals, running as a local process with no cloud relay.
- Who is it for?
- OKX Agent Trade Kit fits developers and quants who use Claude Desktop, Cursor, or another MCP-compatible client and want direct order execution on OKX without writing API glue code. The 167-tool surface covers the full OKX trading lifecycle, including algo orders and smart money signals.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 8 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 1, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What Problem OKX Agent Trade Kit Solves
Traders who use AI assistants for analysis typically face a workflow gap: the assistant can describe what to do but cannot act without the user switching to a separate terminal, browser, or trading platform. OKX Agent Trade Kit closes that gap for OKX specifically. It implements the Model Context Protocol so that an AI client can call exchange functions as native tools, the same way it would call a calculator or a file search.
The primary target is a developer or quant who already trades on OKX and wants AI assistance that goes beyond advice. The kit handles the full trading lifecycle: pulling market data, placing and amending orders, managing positions, running grid or DCA bots, and reading third-party smart money signals. A trader who uses Binance, Kraken, or any exchange other than OKX will not find support here. The product description also addresses users who want to operate OKX directly from the terminal via the companion CLI, without any AI client involved.
The Two-Package Structure and Local Process Model
The repository ships as a monorepo containing two public packages. The first, `okx-trade-mcp`, is an MCP server that runs as a local stdio process. It exposes OKX API operations as named tools according to the Model Context Protocol specification. An AI client discovers these tools on startup and calls them by name, for example `swap_place_order` or `market_get_ticker`. No network daemon, no database, and no cloud relay are involved. The README describes the design as zero infrastructure.
The second package, `okx-trade-cli`, wraps the same core operations in a terminal command (`okx`) for use without an AI client. Both packages share an internal `@agent-tradekit/core` library for API communication and credential management.
A third layer, the `skills/` directory, contains pre-built skill files for AI agent frameworks. Each skill is a structured instruction set telling an agent when to activate a particular OKX capability and how to invoke the corresponding CLI commands. Five skills are included: market data, trading, portfolio, bots, and earn. These files are drop-in additions to a compatible agent framework and require no custom code.
The local process model means every API call travels from your machine directly to OKX. The README states that API keys are stored only on your machine and no data leaves your device beyond what the OKX API itself receives.
Installing and Starting the MCP Server
Node.js 18 or later is the only prerequisite. Install both packages globally:
npm install -g @okx_ai/okx-trade-mcp @okx_ai/okx-trade-cliRun the interactive credentials wizard to store your OKX API key, secret key, and passphrase:
okx config initThen register the MCP server with your AI client. The `setup` subcommand writes the necessary configuration for each supported 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 vscodeThe `vscode` target writes a `.mcp.json` file in the current working directory. The other targets write to the respective client's own configuration directory.
Control which modules the server exposes by passing `--modules` at startup:
okx-trade-mcp --modules market
okx-trade-mcp --modules spot,account
okx-trade-mcp --profile live --modules all
okx-trade-mcp --read-onlyThe `market` module requires no credentials and is a practical starting point before connecting live API keys. Passing `--read-only` disables all write operations regardless of which modules are loaded.
The companion CLI lets you call the same operations without an AI client:
okx market ticker BTC-USDT
okx spot place --instId BTC-USDT --side buy --ordType market --sz 100
okx account balanceThe README notes an important naming distinction: CLI subcommands use spaces (`okx swap algo place`) while MCP tool names use underscores (`swap_place_algo_order`). Converting between them by substituting hyphens for spaces produces invalid commands.
Eleven Modules and the Scope of 167 Tools
The 167 tools are grouped into 11 modules, each loadable independently. The `market` module (19 tools) provides ticker data, order books, candlestick history, funding rates, mark prices, and open interest tracking. It also includes a technical indicator engine covering over 70 indicators such as MA, EMA, RSI, MACD, Bollinger Bands, and ATR, alongside crypto-specific indicators like BTCRAINBOW and AHR999. A market filter tool lets an AI agent screen instruments by price change, market cap, volume, funding rate, or open interest without authentication.
The `spot`, `swap`, and `futures` modules expose the full order lifecycle for their respective instrument types: place, cancel, amend, batch operations, conditional orders, OCO take-profit/stop-loss combinations, and trailing stop. The `option` module adds options-specific data including the option chain, implied volatility, and Greek values. The `account` module covers balance, position history, fee rates, configuration, and an audit log.
The `bot` module contains nine tools for grid bots and five for DCA bots on both spot and contract products. The `smartmoney` module provides read-only access to trader leaderboard rankings, performance metrics, position history, and single-asset signals split by entry mode for agent disambiguation. The `earn` module covers Simple Earn, on-chain staking, Dual Currency Deposit, and Flash Earn. The `news` module adds crypto news retrieval with per-coin filtering, full-text search, and sentiment snapshots.
Selective module loading is practically important. An agent authorised only for market data starts with `--modules market` and will never have access to order placement, regardless of which credentials are configured.
Limitations and Cases Where This Is the Wrong Tool
The first constraint is exchange exclusivity. OKX Agent Trade Kit covers OKX and nothing else. A trading workflow that spans Binance, Kraken, and OKX simultaneously cannot be handled by this kit alone.
Second, the local process model is intentional, but it means the MCP server runs only while the local machine is running. Automated strategies that must execute continuously, survive reboots, or run on a remote server need a separate process supervisor or a remote deployment arrangement. The README does not document that setup.
Third, the safety controls are binary. The `--read-only` flag restricts the server to query-only tools. There is no built-in per-symbol filter, per-order-size cap, or position-size limit enforced by the kit itself. Teams running AI agents against a live account depend on OKX account-level risk controls rather than anything this kit enforces.
Fourth, credential handling stores the API keys on the local machine after `okx config init`. The repository includes a `.env.example` showing the three relevant variables (`OKX_API_KEY`, `OKX_SECRET_KEY`, `OKX_PASSPHRASE`), which allows credentials to be injected from environment variables rather than a stored config file. Environments with key vault requirements or hardware security module policies would need to adapt the credential layer themselves; the README does not give a procedure for vault-backed delivery.
Comparing to ccxt and the Maintenance Record
The most common alternative for programmatic OKX access is ccxt, a JavaScript and Python library that provides a unified trading API across more than 100 cryptocurrency exchanges. A developer using ccxt writes their own integration layer, constructs tool definitions manually, and handles agent prompting separately. OKX Agent Trade Kit takes the opposite approach: it ships ready-made MCP tool definitions that require no glue code and work with any MCP-compatible AI client without additional setup. The cost is scope. ccxt supports multi-exchange workflows; OKX Agent Trade Kit is OKX-only but goes considerably deeper into OKX-specific features, covering algo orders, event contracts, the Smart Money module, and earn sub-products that ccxt does not expose with the same granularity.
The last push to the repository was on 2026-09-23. The repository is not archived. The root of the repository includes changelog files in both English and Chinese, suggesting that the project tracks changes systematically. The licence is MIT, which permits commercial use and does not require the source to be distributed alongside any derivative product. No GitHub releases exist; the current version is tracked in `package.json` as 1.4.8.
Editorial conclusion
OKX Agent Trade Kit fits developers and quants who use Claude Desktop, Cursor, or another MCP-compatible client and want direct order execution on OKX without writing API glue code. The 167-tool surface covers the full OKX trading lifecycle, including algo orders and smart money signals. Verify first that your workflow can tolerate a locally running process: there is no cloud deployment option, no cross-exchange support, and no built-in position-size guardrail beyond --read-only. The MIT licence permits commercial use without source distribution obligations.
Frequently asked questions
What is a trade agent?
In the context of OKX Agent Trade Kit, a trade agent is an AI assistant connected to exchange operations via the Model Context Protocol. The kit exposes OKX order placement, position management, and market data as callable tools so an AI client can execute trades in response to natural-language instructions.
Does OKX Agent Trade Kit work without OKX API credentials?
The market module runs without authentication and provides ticker data, candlestick history, technical indicators, and market screening. All trading, account, earn, and bot modules require OKX API credentials configured through the okx config init command.
What AI clients does okx-trade-mcp support?
The setup command supports Claude Desktop, Cursor, Claude Code, and VS Code out of the box. The README notes that any MCP-compatible client can also be configured manually.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/okx-agent-trade-kit)