MCP Server#
MCP (Model Context Protocol) connects AI tools with developer resources. After adding the OKX DEX MCP Server, the Agent can query live token prices, retrieve candlestick charts, search for tokens, inspect holder distributions, and check wallet balances all through standardized, directly callable tool interfaces, within a single conversation or editor session, without any additional integration code. For Claude Desktop, Cursor, and other MCP-compatible clients, add the following configuration:
One MCP server covers both Market and Trade capabilities. Restart your client after updating the config.
What the MCP Server exposes#
- Price Tools:
dex-okx-index-current-price,dex-okx-index-historical-price,dex-okx-market-price,dex-okx-market-price-chains— real-time and historical index/DEX prices across 20+ chains. - Candlestick Tools:
dex-okx-market-candlesticks,dex-okx-market-candlesticks-history— OHLCV data from 1-minute to daily intervals, with support for extended lookback windows. - Token Intelligence Tools:
dex-okx-market-token-search,dex-okx-market-token-price-info,dex-okx-market-token-ranking,dex-okx-market-token-holder— token discovery, metadata, real-time metrics, and holder concentration analysis. - Trade Data Tool:
dex-okx-market-trades— latest on-chain trade records for any token. - Balance Tools:
dex-okx-balance-chains,dex-okx-balance-total-token-balances,dex-okx-balance-specific-token-balance,dex-okx-balance-total-value— multi-chain wallet balances and USD portfolio valuation.
Quickstart#
# for Cursor
{
"mcpServers": {
"okx/onchainos-mcp": {
"url": "https://web3.okx.com/api/v1/onchainos-mcp",
"headers": {
"OK-ACCESS-KEY": "your apiKey applyed on https://web3.okx.com/zh-hans/onchain-os/dev-portal/project"
}
}
}
}
# for Claude code
{
"mcpServers": {
"okx/onchainos-mcp": {
"url": "https://web3.okx.com/api/v1/onchainos-mcp",
"headers": {
"OK-ACCESS-KEY": "your apiKey applyed on https://web3.okx.com/zh-hans/onchain-os/dev-portal/project"
}
"type": "http"
}
}
}
Example interactions#
Once the MCP Server is active, an Agent can respond to natural-language queries like:
What is the current price of OKB?
# Call index-current-price
Show me OKB’s 4-hour candlesticks for the past week.
# Call market-candlesticks
What is the hottest token on the X-layer chain right now?
# Call market-token-ranking
Which address holds the most USDT on X-layer?
# Call market-token-holder
What is the total asset value of wallet 0xd8dA...?
# Call balance-total-value
Innehållsförteckning
