OKX MCP Server

السجل الرسمي أخرى

MCP Server for okx.com

ماذا يمكنك أن تفعل مع OKX MCP Server؟

  • account_config - Get account configuration
  • account_balance - Get account balance
  • account_positions - Get account positions
  • account_position_risk - Get account position risk
  • 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

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package mcp-okx
Claude Code
claude mcp add okx-mcp-server -- uvx mcp-okx==0.1.0
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "okx-mcp-server": {
            "command": "uvx",
            "args": [
                "mcp-okx==0.1.0"
            ]
        }
    }
}
OCI package ghcr.io/aahl/mcp-okx:latest
Claude Code
claude mcp add okx-mcp-server -- docker run -i --rm ghcr.io/aahl/mcp-okx:latest
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "okx-mcp-server": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/aahl/mcp-okx:latest"
            ]
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

🆗 OKX MCP Server

📲 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

الأسئلة الشائعة

ما هو OKX MCP Server؟

MCP Server for okx.com

كيف أثبّت OKX MCP Server؟

يعمل على جهازك. في Claude Code: claude mcp add okx-mcp-server -- uvx mcp-okx==0.1.0. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج OKX MCP Server إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل OKX MCP Server مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون OKX MCP Server؟

ينشره aahl. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.