Repository avatar
Other Tools
v1.0.1
active

okx-spot-derivatives-mcp

io.github.theluckystrike/okx-spot-derivatives-mcp

Live OKX spot and perpetual swap tickers, orderbooks, funding rates, candles, and top markets.

Documentation

okx-spot-derivatives-mcp

Live OKX spot and perpetual swap tickers, orderbook depth, OHLCV candlestick bars, perpetual funding rates, and 24h volume leaders over Model Context Protocol (MCP). Trading desks, market makers, and quantitative researchers can query OKX public v5 endpoints directly without an API key or account. It connects right away.

Hosted endpoint

Point any Streamable HTTP MCP client at the free hosted Cloudflare Worker endpoint.

https://okx-spot-derivatives-mcp.lipmichal.workers.dev/mcp

Available tools

ToolPurpose
get_okx_tickerFetch live OKX spot or perpetual swap ticker with last price, bid, ask, spread in bps, 24h high, low, and volume
get_okx_orderbookRetrieve live OKX orderbook depth with top bids, asks, spread, and bid/ask volume imbalance
get_okx_candlesPull OKX OHLCV candlestick bars across intervals from 1 minute to 1 week
get_okx_funding_rateInspect current and next OKX perpetual swap funding rates with annualized APR and funding timestamp
list_okx_top_marketsRank active OKX spot or swap markets by 24h quote volume with optional symbol filter

Client configuration

Add the remote URL to Claude Desktop, Cursor, or VS Code MCP settings.

{
  "mcpServers": {
    "okx-spot-derivatives": {
      "url": "https://okx-spot-derivatives-mcp.lipmichal.workers.dev/mcp"
    }
  }
}

Run locally over stdio

You can also run the server locally on Node 20 or newer over stdio.

npm install
npm start

Compliance and reliability

Every upstream request queries www.okx.com/api/v5/ with a polite User-Agent header and automatic retry on transient network or 5xx errors. Cloudflare edge caching applies only to HTTP 2xx responses, so upstream faults don't linger in cache. All five tools declare read-only, non-destructive, idempotent, open-world annotations, and the Worker negotiates newer MCP protocol versions down to the SDK version cleanly.

More MCP servers and readiness check

This server belongs to the public MCP directory maintained by MCPStamp and Zovo.