OKX Trade

v1.0.0Finance & Fintechstable

OKX trading MCP CLI cryptocurrency spot futures swap AI agent Model Context Protocol Cursor Claude npm automated trading crypto API toolkit TypeScript open-source DeFi CEX

ai-tradingautomated-tradingcexclaudecli
Share:
141
Stars
0
Downloads
0
Weekly
0/5

What is OKX Trade?

OKX Trade is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to okx trading mcp cli cryptocurrency spot futures swap ai agent model context protocol cursor claude npm automated trading crypto api toolkit typescript open-source defi cex

OKX trading MCP CLI cryptocurrency spot futures swap AI agent Model Context Protocol Cursor Claude npm automated trading crypto API toolkit TypeScript open-source DeFi CEX

This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • OKX trading MCP CLI cryptocurrency spot futures swap AI agen

Use Cases

Execute automated cryptocurrency trading across spot, futures, and swap markets.
Analyze and execute trading strategies using AI-driven decisions.
PlaceNL2026

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx okx-trade

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use OKX Trade

OKX Trade MCP is a comprehensive cryptocurrency trading toolkit that connects AI assistants to the OKX exchange via the Model Context Protocol. It exposes 145 tools across 11 modules covering spot, futures, perpetual swaps, options, earn products, grid bots, and market data. Traders can execute orders, monitor positions, run technical analysis across 70+ indicators, and manage portfolio balances entirely through natural language in Claude Desktop or Cursor. A read-only mode makes it safe to explore market data without risking accidental order placement.

Prerequisites

  • Node.js 18 or higher installed
  • An OKX exchange account with API keys (API Key, Secret Key, and Passphrase) generated in OKX account settings
  • An MCP-compatible client such as Claude Desktop or Cursor
  • npm installed for global package installation
1

Install the OKX Trade MCP and CLI packages

Install both the MCP server and the companion CLI tool globally using npm. Both packages are required for full functionality.

npm install -g @okx_ai/okx-trade-mcp @okx_ai/okx-trade-cli
2

Initialize your OKX API credentials

Run the interactive configuration wizard to store your OKX API Key, Secret Key, and Passphrase locally on your machine. Credentials are never sent to any cloud service. You can create multiple profiles for different environments (e.g., live vs. testnet).

okx config init
3

Test the connection with a market data query

Verify your setup is working by fetching the BTC-USDT ticker price from the command line before wiring it into your MCP client.

okx market ticker BTC-USDT
4

Configure your MCP client

Add the OKX Trade MCP server to your Claude Desktop or Cursor configuration file. Use the --read-only flag if you only need market data queries without order execution.

{
  "mcpServers": {
    "okx-trade": {
      "command": "okx-trade-mcp",
      "args": ["--modules", "spot,account,market"]
    }
  }
}
5

Restart your MCP client and verify tools are available

Restart Claude Desktop or Cursor. You should see the OKX tools appear in the available tools list. Try asking for your account balance or the current price of a token to confirm the connection.

OKX Trade Examples

Client configuration (Claude Desktop)

Full claude_desktop_config.json entry enabling spot trading, account management, and market data modules.

{
  "mcpServers": {
    "okx-trade": {
      "command": "okx-trade-mcp",
      "args": ["--modules", "spot,account,market,earn"]
    }
  }
}

Prompts to try

Example natural language prompts you can use with the OKX Trade MCP in Claude or Cursor.

- "What is the current price of ETH-USDT and what do the RSI and MACD indicators show?"
- "Show me my account balance across all currencies."
- "Place a limit buy order for 0.01 BTC at $60,000 on the spot market."
- "What are the top traders on OKX leaderboard doing right now? Show me their positions."
- "Set up a grid trading bot for ETH-USDT between $2,800 and $3,200 with 10 grids."

Troubleshooting OKX Trade

Authentication errors when placing orders

Re-run `okx config init` to re-enter your API credentials. Make sure your OKX API key has 'Trade' permission enabled in your OKX account settings. IP whitelisting on the API key can also cause failures if your IP changes.

Only want to view market data without risk of placing orders

Start the MCP server with the `--read-only` flag: set args to `["--read-only"]` in your config. This disables all order placement and account modification tools while keeping market data tools active.

Too many tools listed and the client is slow to load

Use the `--modules` flag to load only the modules you need (e.g., `--modules spot,account,market`). Loading all 11 modules exposes 145 tools which may overwhelm some MCP clients.

Frequently Asked Questions about OKX Trade

What is OKX Trade?

OKX Trade is a Model Context Protocol (MCP) server that okx trading mcp cli cryptocurrency spot futures swap ai agent model context protocol cursor claude npm automated trading crypto api toolkit typescript open-source defi cex It connects AI assistants to external tools and data sources through a standardized interface.

How do I install OKX Trade?

Follow the installation instructions on the OKX Trade GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with OKX Trade?

OKX Trade works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is OKX Trade free to use?

Yes, OKX Trade is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Finance & Fintech MCP Servers

Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "okx-trade": { "command": "npx", "args": ["-y", "okx-trade"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use OKX Trade?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides