Agent Trade Kitのロゴ

Agent Trade Kit

組織
okx

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

公開者okx
リポジトリagent-trade-kit
言語TypeScript
フォーク
68
スター
438
利用可能なツール
0
通信方式stdio
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    Agent Trade Kitは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには438件のスターと68件のフォークがあります。

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:

PackageDescription
okx-trade-mcpMCP server for Claude / Cursor and any MCP-compatible AI client
okx-trade-cliCLI 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

FeatureDescription
167 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-inConditional, OCO take-profit/stop-loss, trailing stop
Safety controls--read-only flag, per-module filtering, built-in rate limiter
Zero infrastructureLocal stdio process, no server or database required
MCP standardWorks with Claude Desktop, Cursor, openCxxW, and any MCP-compatible client
Agent Skills includedPre-built skill files for AI agent frameworks — drop-in instructions covering market data, trading, portfolio, bots, and earn
Open sourceMIT license, API keys never leave your machine

Modules

ModuleToolsDescriptionDocs
market19Ticker, 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→
spot13Place/cancel/amend orders, batch orders, fills (+archive), order history (+archive), conditional orders, OCO→
swap17Perpetual trading, batch orders, positions, leverage, conditional orders, OCO, trailing stop→
futures18Delivery contract trading, positions, fills, order history, amend/close/leverage, batch orders, algo orders (TP/SL, OCO, trailing stop)→
option10Options trading: place/cancel/amend/batch-cancel, order history, positions (with Greeks), fills, option chain, IV + Greeks→
account14Balance, bills (+archive), positions, positions history, fee rates, config, position mode, max withdrawal, max avail size, audit log→
event9Event contract trading: browse, series, events, markets (query); place, amend, cancel, orders, fills (private). Semantic outcome values: UP/YES/DOWN/NO→
earn24Simple 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.→
bot14Trading bots: Grid (9) and DCA — Spot & Contract (5). Sub-modules: bot.grid, bot.dca→
news7Crypto news: latest news, by-coin filter, full-text search, article detail, news sources, coin sentiment (snapshot + trend)→
smartmoney10Smart 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

bash
# 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

bash
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

bash
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.

SkillDescriptionAuth
okx-cex-marketMarket data: prices, candles, order books, funding rates, technical indicatorsNo
okx-cex-tradeOrder management: spot, swap, futures, options, algo ordersYes
okx-cex-portfolioAccount: balances, positions, P&L, transfersYes
okx-cex-botTrading bots: grid and DCA (spot & contract)Yes
okx-cex-earnEarn: Simple Earn, On-chain staking, Dual Investment, AutoEarnYes
okx-cex-smartmoneySmart Money: trader leaderboard, consensus signals, position analysisYes

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:

json
{
  "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

bash
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

DocumentDescription
ArchitectureSystem design and module overview
ContributingDevelopment setup and PR guidelines
ChangelogVersion history
Agent SkillsPre-built skills for AI agent frameworks
SecurityVulnerability reporting

Agent Trade KitのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Agent Trade Kitに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Agent Trade Kitをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Agent Trade KitのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "agent-trade-kit": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてAgent Trade KitのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Agent Trade KitのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Agent Trade Kitを使ってこのタスクを手伝ってもらえますか?
Agent Trade Kit
はい、読みました。
Agent Trade Kitで調べた結果をお伝えします。

よくある質問

Agent Trade Kit MCPサーバーは何に使いますか?

Agent Trade Kitは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでAgent Trade Kit MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでAgent Trade Kitを利用できます。

TypingMindでAgent Trade Kit MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Agent Trade Kitを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Agent Trade Kit MCPをTypingMindに接続するにはどうすればよいですか?

Agent Trade KitはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでAgent Trade Kit MCPのどのようなツールを利用できますか?

Agent Trade KitはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Agent Trade Kit MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Agent Trade Kitで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇