OKX MCP Server is an MCP server that provides real-time cryptocurrency price data and market metrics from the OKX exchange. It connects directly to public OKX API endpoints to supply AI assistants with accurate market indicators, historical candlestick pricing, and 24-hour volume statistics. Cryptocurrency analysts, financial software developers, and traders use this server to inspect digital asset values without leaving their LLM interface. By surfacing two core tools, get_candlesticks and get_price, the server enables automated queries across any supported trading pair such as BTC-USDT. Users can inspect current bids, asks, latest trade prices, and historical open-high-low-close-volume metrics across custom time intervals. The server features built-in network error handling, rate-limit management via Axios timeouts, and local request logging to ensure reliable market data delivery during agent conversations.
Category: Data & Analytics
Tags: cryptocurrency, finance, market data, okx, trading
npm install. 3. Build the server using npm run build. 4. Open your MCP client configuration file, such as claude_desktop_config.json for Claude Desktop or cline_mcp_settings.json for VSCode. 5. Add the server entry under the mcpServers object: json { "mcpServers": { "okx": { "command": "node", "args": ["/path/to/okx-mcp-server/build/index.js"], "disabled": false, "autoApprove": [] } } } 6. Replace /path/to/okx-mcp-server with the absolute path to your compiled project directory, then restart your MCP client.Part of MCP Servers
OKX MCP Server enables AI clients to retrieve real-time and historical cryptocurrency market data from OKX. It exposes tools to fetch current prices, best bid and ask rates, 24-hour trading volumes, and historical OHLCV candlestick arrays across custom time intervals for any supported instrument.
The server works with any Model Context Protocol client that supports local stdio command execution. This includes Claude Desktop on macOS and Windows, as well as VSCode extensions like Cline that use MCP settings files.
Clone the source repository from GitHub, run npm install to set up dependencies, and run npm run build to compile the TypeScript files. Afterward, add the compiled index.js path to your Claude Desktop or VSCode MCP configuration file using node as the command.
The server provides two tools: get_price and get_candlesticks. The get_price tool retrieves the latest price, bid, ask, 24-hour range, and volume for a symbol. The get_candlesticks tool returns an array of OHLCV data points with custom intervals and limits up to 100 bars.