mcp-okx
๐ OKX MCP Server for trading
claude mcp add --transport stdio aahl-mcp-okx uvx mcp-okx \ --env OKX_API_KEY="your-okx-api-key" \ --env OKX_BASE_URL="https://www.okx.com" \ --env MCP_AUTH_TOKEN="your-custom-token" \ --env OKX_API_SECRET="api-secret-key" \ --env OKX_PASSPHRASE="api-passphrase" \ --env OKX_TRADE_FLAG="1"
How to use
This MCP server provides a bridge to the OKX exchange, exposing a set of account, trading, and market data tools through a standardized MCP interface. After deploying, you can authenticate with the supplied token (MCP_AUTH_TOKEN or your OKX_API_KEY by default) and make calls to the available tools. The server is organized into three tool categories for convenience: Account Tools (retrieve and inspect your account state), Trading Tools (manage orders and risk exposure), and Market Data (fetch real-time market information). Use the appropriate tool names and parameters as defined in the README to perform common tasks such as checking balances, placing orders, or querying open positions. The HTTP or local IPC access is typically provided via the configured endpoint (default behavior shown in the Docker example uses a streamable HTTP endpoint).
How to install
Prerequisites:
- Ensure you have uvx installed and accessible in your environment.
- Have OKX API credentials ready (API Key, Secret, and Passphrase).
- Optionally set MCP_AUTH_TOKEN if you want a custom token for authentication.
Step-by-step installation (uvx method):
- Prepare environment variables and configuration by creating your environment or passing them at runtime.
- Run the MCP server using the uvx configuration provided in the README:
- Ensure you have the required environment variables set (OKX_API_KEY, OKX_API_SECRET, OKX_PASSPHRASE, OKX_TRADE_FLAG, OKX_BASE_URL, MCP_AUTH_TOKEN).
- Start the server with the following command structure (adjust as needed for your shell): uvx mcp-okx
- Verify the service is reachable at the intended endpoint (for example http://localhost:8811/mcp for the Docker example, or the UVX-provided endpoint in your environment).
- If you prefer Docker, follow the Docker method in the README to spin up the container and access the same tools via the provided HTTP endpoint.
Notes:
- Ensure network access to OKX if using the real API (base URL may be customized via OKX_BASE_URL).
- If you change MCP_AUTH_TOKEN, update your clients accordingly.
Additional notes
Tips and common considerations:
- Environment variables: Keep API keys and tokens secure. Do not commit them to version control.
- MCP_AUTH_TOKEN defaults to the same value as OKX_API_KEY if not overridden, but you can customize it for additional security.
- If you run in demo trading mode, set OKX_TRADE_FLAG to 1 to avoid real trading actions.
- The Available Tools section defines the exact tool names you can call (e.g., account_balance, place_order). Ensure you pass the correct parameters for each tool according to your MCP client implementation.
- When using Docker, the provided docker-compose.yml and HTTP endpoint are designed to be accessible from your network; adjust ports and network settings as needed for your environment.
Related MCP Servers
web-eval-agent
An MCP server that autonomously evaluates web applications.
mcp-neo4j
Neo4j Labs Model Context Protocol servers
mcp-aktools
๐ ๆไพ่ก็ฅจใๅ ๅฏ่ดงๅธ็ๆฐๆฎๆฅ่ฏขๅๅๆๅ่ฝMCPๆๅกๅจ
Gitingest
mcp server for gitingest
fhir
FHIR MCP Server โ helping you expose any FHIR Server or API as a MCP Server.
unitree-go2
The Unitree Go2 MCP Server is a server built on the MCP that enables users to control the Unitree Go2 robot using natural language commands interpreted by a LLM.