🆗 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 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
Metadata
Release files for mcp-okx 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_okx-0.1.0.tar.gz | 95.6 kB | Without provenance | Details for mcp_okx-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_okx-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mcp_okx-0.1.0-py3-none-any.whl |
Total release size: 114.8 kB
Release files / mcp_okx-0.1.0.tar.gz
| Download URL | mcp_okx-0.1.0.tar.gz |
|---|---|
| Size | 95.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a2db2eea1f2543174f95c60731a45e7a91cf3b6ab343d2f4fa4ae643389b56e
|
|
BLAKE2b-256 checksum How to use checksums |
78ad64d163bfa062e15f0553fca5e1ff15f8aebb70824d4c870c7d17d8b17eed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / mcp_okx-0.1.0-py3-none-any.whl
| Download URL | mcp_okx-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
831b06aad7d6575b4cc05491007d49274d909b0811abea67d643ac97f2c74a40
|
|
BLAKE2b-256 checksum How to use checksums |
fdc06ab3f67db711fd20de33e0971e7279696e294312a34942c200f9251b2f7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for mcp-okx 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.