Command Palette

Search for a command to run...

UnylyUnyly
Browse all

OKX

FreeNot checked

Trading and portfolio management for OKX cryptocurrency exchange

GitHubEmbed

About

Trading and portfolio management for OKX cryptocurrency exchange

README

📲 Install

Method 1: uvx

{
  "mcpServers": {
    "mcp-okx": {
      "command": "uvx",
      "args": ["mcp-okx"],
      "env": {
        "OKX_API_KEY": "your-okx-api-key",
        "OKX_API_SECRET": "api-secret-key",
        "OKX_PASSPHRASE": "api-passphrase",
        "OKX_TRADE_FLAG": "1", # 0: Production trading, 1: Demo trading
        "OKX_BASE_URL": "https://www.okx.com", # Optional
        "MCP_AUTH_TOKEN": "your-custom-token"  # Default same as OKX_API_KEY
      }
    }
  }
}

Method 2: Docker

mkdir /opt/mcp-okx
cd /opt/mcp-okx
wget https://raw.githubusercontent.com/aahl/mcp-okx/refs/heads/main/docker-compose.yml
docker-compose up -d
{
  "mcpServers": {
    "mcp-okx": {
      "url": "http://0.0.0.0:8811/mcp", # Streamable HTTP
      "headers": {
        "Authorization": "Bearer your-okx-api-key-or-custom-token"
      }
    }
  }
}

⚙️ Environment variables

  • OKX_API_KEY: API key of your OKX account. Please refer to my api page regarding API Key creation.
  • OKX_API_SECRET: API secret key of your OKX account.
  • OKX_PASSPHRASE: API passphrase of your OKX account.
  • OKX_TRADE_FLAG: 0: Production trading, 1: Demo trading
  • OKX_BASE_URL: Base URL of OKX. Default: https://www.okx.com
  • MCP_AUTH_TOKEN: Custom token for authentication. Default same as OKX_API_KEY

🛠️ Available Tools

Account Tools
  • account_config - Get account configuration
  • account_balance - Get account balance
  • account_positions - Get account positions
  • account_position_risk - Get account position risk
Trading Tools
  • place_order - Place a new order
  • cancel_order - Cancel an incomplete order
  • get_trade_order - Get order details
  • get_order_list - Get incomplete order list
  • get_orders_history - Get Order History
  • close_positions - Liquidate all positions
Market Data
  • market_tickers - Get cryptocurrency rankings

from github.com/aahl/mcp-okx

Installing OKX

This server has no published package — it is built from source. Open the repository and follow its README.

▸ github.com/aahl/mcp-okx

FAQ

Is OKX MCP free?

Yes, OKX MCP is free — one-click install via Unyly at no cost.

Does OKX need an API key?

No, OKX runs without API keys or environment variables.

Is OKX hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install OKX in Claude Desktop, Claude Code or Cursor?

Open OKX on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare OKX with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All development MCPs