OKX Agent Trade Kit MCP
OKX's official toolkit for agents: an MCP server with 167 tools, a CLI and skills for market data, orders, bots and earn products on the OKX exchange
- 492 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- A key with Trade permission lets an agent place, amend and cancel orders and launch trading bots with real money
- The tools expose your account's balance, positions and operation history
- API keys sit in the ~/.okx/config.toml file on your computer, and access to it equals access to the account
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/okx-agent-trade-kitDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- A key with Trade permission lets an agent place, amend and cancel orders and launch trading bots with real money
- The tools expose your account's balance, positions and operation history
- API keys sit in the ~/.okx/config.toml file on your computer, and access to it equals access to the account
This is third-party code. Review the repository files before installing.
What it does
The kit has two packages: okx-trade-mcp, an MCP server for Claude, Cursor and other clients, and okx-trade-cli, the okx console utility. Both run locally, with API keys kept in ~/.okx/config.toml on your computer and sent nowhere except the exchange. Instead of switching between an assistant and the exchange interface, you describe a task in words and the agent calls the right tools. Tools are split into 11 modules. Market gives quotes, order books, candles, funding rates, open interest and more than 70 technical indicators. Spot, perpetual swaps, delivery futures and options let you place, amend and cancel orders, including conditional, OCO and trailing stop. Separate modules cover balance and account, trading bots (grid and DCA), earn products (Simple Earn, on-chain staking, dual deposits), event contracts, news and smart money analytics. By default the server enables the spot, swap and account modules. The --modules flag picks another set, and --read-only leaves queries only, with no writes. The skills/ directory holds six ready skills that tell an agent when and how to call the CLI.
Who it is for. For traders and developers of trading scripts with an OKX account who want to run market data, orders and bots from Claude Code, Cursor or Claude Desktop.
Good fit when
- You want BTC-USDT quotes, candles and RSI with MACD without a key: the market module needs no authorization
- You want to rehearse a scenario on a demo profile with a practice key and connect a separate live profile later
- You need a conditional order with take-profit and stop-loss through OCO or a trailing stop
- You want to check balance, positions and account history from a terminal with commands such as okx account balance
- An agent system needs ready skills for market, trading, portfolio, bots and earn products, with notes on when to activate them
Not a fit when
- You need another broker or exchange: the kit works only with OKX, and separate servers exist for many exchanges
- You want personal advice on what to buy: the tool executes commands, recommends nothing itself and is no investment adviser
- You cannot trust an assistant with real money unsupervised: orders and bots on a live profile execute for real
- You need withdrawals: withdrawal permission is neither required nor recommended for the key
- Your account is registered on a regional OKX site you cannot reach: the API works per registration site
Example request
Show the BTC-USDT price and candles for the last day, compute RSI and tell me what positions I have on the demo profile; do not place any orders yetMCP
- Transport
- stdio
- Authentication
- API key
Environment variables
OKX_SITE- The regional OKX site: global, eea, us or tr; global by default
Limitations
You need Node.js 18 or later, and private modules need an OKX API key with Read and Trade permissions, a secret key and a passphrase. Withdrawal permission is not required. Market data is available without authorization.
OKX runs independent regional sites: global, eea, us and tr. You must use the API of the site where the account is registered and set it with the --site flag or the OKX_SITE variable. Only HTTP and HTTPS proxies are supported, not SOCKS. Demo and live trading keys are created separately.
Extra modules are off by default: without --modules, spot, swap and account are enabled, and earn products come in with --modules all. The author does not say whether OKX is reachable from Russia, so check that yourself. This is not investment advice.
How to disable. Delete the okx entry from your client's MCP configuration or the command from Claude Code settings. Packages come off with npm uninstall -g @okx_ai/okx-trade-mcp @okx_ai/okx-trade-cli. Keys sit in ~/.okx/config.toml: delete the file and revoke the key in the API settings on the OKX site.
FAQ
How do I connect OKX to Claude Code through MCP?
Install the packages with npm install -g @okx_ai/okx-trade-mcp @okx_ai/okx-trade-cli, set up keys with okx config init and run okx-trade-mcp setup --client claude-code. For Claude Desktop, Cursor and VS Code use claude-desktop, cursor or vscode.
Can I try it first without real money?
Yes, the demo profile in ~/.okx/config.toml uses an OKX demo trading key, and a separate live profile connects as a second MCP server. The agent switches between them by calling tools on the right server.
How do I stop an agent from placing orders?
Start the server with the --read-only flag: only query tools remain. Also narrow the module set with --modules, for example market or spot,account.
Which permissions does the API key need?
Read and Trade. Withdrawal permission is neither required nor recommended. Market data from the market module works without a key.
How do the MCP server and the skills in this kit differ?
The server gives an agent 167 tools in MCP format. Skills in the skills/ directory teach an agent to use the okx CLI: each says when to activate and which commands to call, and together they cover market, trading, portfolio, bots, earn products and smart money analytics.
Discussion
No questions or reviews yet.
Related
MCP serversThe official CCXT MCP server and skills: market data, balances and opt-in trading across crypto exchanges and prediction markets
Skills and an MCP server for options traders: quotes, technical analysis, Greeks, spreads, scanners and Interactive Brokers portfolio
An MCP server for market data and technical analysis: quotes, indicators, screeners and backtesting for stocks, crypto, forex and futures
An MCP server for agentic trading: backtesting, 462 prebuilt alphas, trade journal analysis and multi-agent research teams
An unofficial Yahoo Finance client with an MCP server, a CLI and an agent skill: quotes, price history, financial statements and options for an agent
MOEX quotes MCP and a Telegram bot
MOEX1-mcp
An MCP server for MOEX quotes and order books via ISS+ and ISS REST, plus a Telegram bot that picks the right tool itself via OpenAI tool calling
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| OKX Agent Trade Kit (this entry) | yes | API key | 492 | |
| CCXT MCP Server | yes | key is optional | 44,612 | a universal MCP server for many crypto exchanges; this kit covers OKX only, with broader modules |
| MetaTrader MCP Server | no | not required | 843 | an MCP server for MetaTrader 5 |
README in short
The document presents two packages, okx-trade-mcp and okx-trade-cli, and explains that the kit runs locally with no server or database. Tables list features and the 11 modules with tool counts. Quick start consists of installation, a key wizard and a setup command for a client, and below it come server launch modes and CLI command examples. It separately describes six skills with a note on whether authorization is needed, error reporting rules with formats for MCP and CLI, a build from source and a documentation list.