
OKX MCP Server
io.github.aahlPublished by GitHub account aahlv0.1.0Updated Oct 24, 2026
MCP Server for okx.com
Overview
A local MCP server for the OKX crypto exchange that lets an assistant read account, position and market data and place, cancel or close trades.
- What you can do
- Read account configuration, balances, positions and position risk from an OKX account. Place new orders, cancel open orders, and liquidate all positions. Look up order details, open orders and order history. Retrieve cryptocurrency market tickers and rankings.
- When to use it
- Useful when you want an assistant to check OKX account balances, positions and risk, review order history, or place and manage trades on the exchange, including in demo trading mode.
- Requirements
- Runs locally via uvx (Python package mcp-okx) or Docker. Needs OKX API credentials set as OKX_API_KEY, OKX_API_SECRET and OKX_PASSPHRASE, plus OKX_TRADE_FLAG to choose production or demo trading. Optional OKX_BASE_URL and MCP_AUTH_TOKEN. The Docker setup exposes a Streamable HTTP endpoint protected by a Bearer token.
Installation
In SourceWeft
- Open OKX MCP Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
🆗 OKX MCP Server
📲 Install
Method 1: uvx
Method 2: Docker
⚙️ 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 tradingOKX_BASE_URL: Base URL of OKX. Default:https://www.okx.comMCP_AUTH_TOKEN: Custom token for authentication. Default same asOKX_API_KEY
🛠️ Available Tools
Account Tools
account_config- Get account configurationaccount_balance- Get account balanceaccount_positions- Get account positionsaccount_position_risk- Get account position risk
Trading Tools
place_order- Place a new ordercancel_order- Cancel an incomplete orderget_trade_order- Get order detailsget_order_list- Get incomplete order listget_orders_history- Get Order Historyclose_positions- Liquidate all positions
Market Data
market_tickers- Get cryptocurrency rankings
Source: README.md at commit 063cb50
Tools
0Version history
1- v0.1.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts