okx-spot-derivatives-mcp
# 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.
```text
https://okx-spot-derivatives-mcp.lipmichal.workers.dev/mcp
```
## Available tools
| Tool | Purpose |
| --- | --- |
| `get_okx_ticker` | Fetch live OKX spot or perpetual swap ticker with last price, bid, ask, spread in bps, 24h high, low, and volume |
| `get_okx_orderbook` | Retrieve live OKX orderbook depth with top bids, asks, spread, and bid/ask volume imbalance |
| `get_okx_candles` | Pull OKX OHLCV candlestick bars across intervals from 1 minute to 1 week |
| `get_okx_funding_rate` | Inspect current and next OKX perpetual swap funding rates with annualized APR and funding timestamp |
| `list_okx_top_markets` | Rank 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.
```json
{
"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.
```bash
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.
- [Free live-data MCP directory](https://www.mcpstamp.com/free-servers/) with hosted keyless endpoints and client setup guides.
- [Free MCP readiness checker](https://www.mcpstamp.com/check/) to score any MCP server for Claude, ChatGPT, and registry submission.
- [MCP Readiness Audit ($490)](https://www.mcpstamp.com/services/#audit) for teams shipping a production server who want a hands-on security, schema, and store review.
- [Zovo Pro MCP Bundle ($39 one-time)](https://mcp.zovo.one/buy/bundle?src=gh.okx-spot-derivatives-mcp) with hosted commercial servers and priority endpoints.
TDQS
Scored across 5 tools
Each tool maps to a distinct market-data artifact: snapshot ticker, orderbook depth, OHLCV candles, funding rate, and market rankings. The only mild overlap is spread reporting in both ticker and orderbook, but the primary resources are clearly separate and an agent can select confidently.
All five names follow a predictable verb_okx_noun pattern (get_okx_*, list_okx_*), with the verb varying meaningfully between single-resource fetch and ranked listing. Uniform snake_case with a consistent domain prefix.
Five tools is well-scoped for a read-only OKX market-data server; each covers a distinct data type with no filler. Nothing feels redundant or conspicuously absent in terms of surface size.
Core market snapshots are covered (price, depth, candles, funding, rankings), enabling most analysis workflows. Minor gaps remain for a derivatives data surface — no open interest, mark/index price, or historical funding rate series — though agents can approximate much of this from the existing tools.