0xAuto OKX MCP Server

by Buidl-Land

457 downloads
Not rated
GitHub

Description

# 0xAuto OKX MCP Server This server is based on the Model Context Protocol (MCP), providing a tool interface layer for OKX V5 API and OKX DEX API, offering AI agents simplified access to OKX exchange (CEX) and decentralized exchange (DEX) functionalities. ## Features ### CEX…

About

# 0xAuto OKX MCP Server This server is based on the Model Context Protocol (MCP), providing a tool interface layer for OKX V5 API and OKX DEX API, offering AI agents simplified access to OKX exchange (CEX) and decentralized exchange (DEX) functionalities. ## Features ### CEX (Centralized Exchange) Features - Hides…

Details

Author
Buidl-Land
Downloads
457
Categories
Other

- Hides OKX API authentication and signature complexity
- Covers CEX account, market, trading, and funding operations
- Provides DEX aggregator access for multi‑chain swaps
- Standardized JSON responses and error handling
- Supports MCP session management and streaming
- Simulated trading mode for testing

Install dependencies with pnpm install, copy .env.example to .env, and fill in your OKX API credentials (OKX_API_KEY, OKX_SECRET_KEY, OKX_PASSPHRASE). Set SIMULATED_TRADING=0 (live) or 1 (demo). Start the server with pnpm start (or pnpm dev). MCP clients connect via /mcp, /sse, or /messages endpoints. Use the listed MCP tools (e.g., okx_get_balance, okx_place_order, okx_swap) to interact with CEX and DEX features.

0xAuto OKX MCP Server

This server is based on the Model Context Protocol (MCP), providing a tool interface layer for OKX V5 API and OKX DEX API,
offering AI agents simplified access to OKX exchange (CEX) and decentralized exchange (DEX) functionalities.

Features

CEX (Centralized Exchange) Features

- Hides complex OKX API authentication and signature logic - Provides standard MCP tool interfaces - Covers core functionalities: - Account information (balances, positions, history) - Market data (quotes, K-lines) - Trading operations (place orders, cancel orders, order management) - Funding operations (deposit addresses, withdrawals)

DEX (Decentralized Exchange) Features

- Provides access to OKX DEX aggregator - Supports multi-chain transactions and token exchanges - Covers functionalities: - Token quote retrieval - Token price queries and K-line data - On-chain balance queries - Token authorization operations - Intra-chain and cross-chain swaps

- Standardized JSON responses and error handling
- Support for MCP protocol session management and streaming

System Requirements

- Node.js (v16 or higher)
- pnpm

Installation Steps

1. Install dependencies:

   pnpm install

2. Set up environment variables:
Create a .env file by copying the contents from .env.example:

   cp .env.example .env

Edit the .env file and fill in your OKX API credentials and other settings:
   # OKX API Configuration
OKX_API_KEY=your_okx_api_key
OKX_SECRET_KEY=your_okx_secret_key
OKX_PASSPHRASE=your_okx_api_password
OKX_API_BASE_URL=https://www.okx.com
OKX_DEX_API_BASE=https://web3.okx.com/api/v5/dex

# Simulated trading: 0 for live trading, 1 for demo account
SIMULATED_TRADING=0

SERVER_PORT=3000
LOG_LEVEL=info

Important note: Ensure your OKX API Key has the necessary permissions (read, trade).

Running the Server

```bash
pnpm start

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.