OKX MCP Server
Overview
OKX MCP Server is a Model Context Protocol (MCP) server that fetches real-time cryptocurrency data from the OKX exchange, enabling AI assistants to access up-to-date price information and historical data with enhanced visualization capabilities.
To use the server, clone the repository, install dependencies, and run the server using Node.js. You can also test it with the MCP Inspector to ensure proper functionality before integration.
- Fetches latest price data with visual formatting - Retrieves historical candlestick data with visualization options - Subscribes to real-time WebSocket updates for trading pairs - Provides live ticker data and allows unsubscription from updates
- Monitoring real-time cryptocurrency prices
- Analyzing historical price trends with candlestick data
- Setting up alerts for price changes
- Integrating with AI assistants for enhanced data interaction
Add to your AI client
Use these steps to connect OKX MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"okx-mcp-server-badger3000": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-okx-mcp-server-badger3000"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"okx-mcp-server-badger3000": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-okx-mcp-server-badger3000"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"okx-mcp-server-badger3000": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-okx-mcp-server-badger3000"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"okx-mcp-server-badger3000": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-okx-mcp-server-badger3000"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"okx-mcp-server-badger3000": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-okx-mcp-server-badger3000"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"okx-mcp-server-badger3000": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-okx-mcp-server-badger3000"
]
}
}
}FAQ
Can I use this server for any cryptocurrency?
Yes! The server supports any trading pair available on the OKX exchange.
Is there a cost to use the OKX MCP Server?
No, the server is free to use and open-source.
What are the prerequisites for running the server?
You need Node.js (v16 or higher), npm or yarn, and optionally VSCode with the Claude extension.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2952,"uuid":"28d233ff-dc35-4e8a-87eb-435e4072705b","name":"okx-mcp-server","title":"OKX MCP Server","description":"","avatar_url":"https://avatars.githubusercontent.com/u/1015427?v=4","created_at":"$D2025-03-16T04:27:22.074Z","updated_at":"$D2025-03-16T04:36:42.137Z","status":"created","author_name":"badger3000","author_avatar_url":"https://avatars.githubusercontent.com/u/1015427?v=4","tags":"okx,cryptocurrency,mcp-server","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/badger3000/okx-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-15 10:30:03\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]