okx
MCP server from badger3000/okx-mcp-server
claude mcp add --transport stdio badger3000-okx-mcp-server node /absolute/path/to/okx-mcp-server/build/index.js
How to use
This MCP server provides real-time and historical cryptocurrency data from the OKX exchange. It exposes tools to fetch current prices, retrieve candlestick history with visualization options, and manage real-time WebSocket subscriptions for live ticker updates. Tools include get_price for current price with optional markdown formatting, get_candlesticks for historical data with ASCII charts or tables, subscribe_ticker to start live updates for an instrument, get_live_ticker to fetch the latest data from active subscriptions, and unsubscribe_ticker to stop updates. Output formats can be markdown, json, or table for candlesticks, and markdown or json for live data. Use the MCP Inspector or integrate with Claude via VSCode or Claude Desktop to test and utilize these tools in prompts.
To use, start the server (via node build/index.js or npm start) and then invoke the tools through your MCP client. When testing, you can try: get_price with {"instrument": "BTC-USDT", "format": "markdown"}, get_candlesticks with {"instrument": "BTC-USDT", "bar": "1m", "limit": 10, "format": "markdown"}, subscribe_ticker with {"instrument": "BTC-USDT"}, get_live_ticker with {"instrument": "BTC-USDT", "format": "markdown"}, and unsubscribe_ticker with {"instrument": "BTC-USDT"}.
If you use the VSCode Claude integration, configure the MCP server with the command node and the path to build/index.js to enable seamless prompts and responses.
How to install
Prerequisites:
- Node.js v16+ (recommended)
- npm (or yarn)
- A repository clone where you will place the server files
Installation steps:
- Clone the repository
git clone https://github.com/yourusername/okx-mcp-server.git
cd okx-mcp-server
- Install dependencies
npm install
- Add WebSocket support (if not already present)
npm install ws
npm install --save-dev @types/ws
- Build the project
npm run build
- Make the compiled script executable (if needed)
chmod +x build/index.js
- Run the server
npm start
Or directly with Node:
node build/index.js
- Optional: Test with MCP Inspector
npx @modelcontextprotocol/inspector node build/index.js
Additional notes
Environment and usage tips:
- This server uses OKX public endpoints; no API keys are required by default.
- If you extend to use authenticated OKX endpoints, consider adding OKX_API_KEY, OKX_API_SECRET, and OKX_API_PASSPHRASE to your environment.
- Visualization formats: get_price supports markdown or json; get_candlesticks supports markdown, table, or json; get_live_ticker supports markdown or json.
- For WebSocket reliability, the server includes automatic reconnect logic; ensure your network allows persistent connections.
- When integrating with Claude via VSCode, set the path to build/index.js in the settings and restart the editor to apply changes.
- The npm package name for this server is okx-mcp-server.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.