order-flow-mcp
Streams Binance perpetual and spot market data into the server's order-flow tools, including trades, order books, open interest, funding, liquidations, and derived analytics.
Integrates Coinbase spot market data, including trades and order books, into the server's venue-aware order-flow and screener tools.
Integrates KuCoin perpetual and spot market data for trades, order books, derivatives, liquidations, and cross-venue order-flow analysis.
Integrates OKX perpetual and spot market data for trades, order books, derivatives, liquidations, and venue comparison analytics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@order-flow-mcp What's the order flow on BTC right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
order-flow-mcp
Live crypto order flow for any AI agent. An MCP server that streams trades, order books, open interest, funding and liquidations from 10 exchanges and gives agents the same analytics as the Order Flow Screener terminal: footprint candles, CVD, volume profile, VWAP bands, book imbalance and walls, block prints, absorption and iceberg detection, OI regimes, venue lead/lag and a multi-symbol screener.
Works with Claude Code, Codex, Cursor, Claude Desktop, VS Code, Windsurf, Gemini CLI, or any client that speaks MCP. You don't need API keys or an account, and there's nothing to configure.
Website: zadescoxp.github.io/order-flow-mcp has a setup guide for each agent.
you ▸ What's the order flow on BTC right now?
agent ▸ (calls get_market_snapshot, get_footprint, get_derivatives)
BTC 59,197, 1.3σ above session VWAP and above value (VAH 59,110). Buyers took
76% of the last 5m; an iceberg offer at 59,098 absorbed the push before it broke.
OI flat, funding +0.003%/8h, 10/10 venues live.Quick start
Node.js 20 or newer is required. Pick your agent and paste one command or config block.
Claude Code
claude mcp add orderflow -- npx -y github:zadescoxp/order-flow-mcpCodex CLI
codex mcp add orderflow -- npx -y github:zadescoxp/order-flow-mcpOr add it to ~/.codex/config.toml:
[mcp_servers.orderflow]
command = "npx"
args = ["-y", "github:zadescoxp/order-flow-mcp"]
startup_timeout_sec = 60 # the first run installs the packageCursor, Claude Desktop, Windsurf, Gemini CLI, Cline and others
Add this to the client's MCP config. The file is ~/.cursor/mcp.json for Cursor and
claude_desktop_config.json for Claude Desktop (Settings → Developer → Edit Config). Windsurf uses
~/.codeium/windsurf/mcp_config.json and Gemini CLI uses ~/.gemini/settings.json.
{
"mcpServers": {
"orderflow": {
"command": "npx",
"args": ["-y", "github:zadescoxp/order-flow-mcp"]
}
}
}VS Code (Copilot agent mode)
.vscode/mcp.json:
{
"servers": {
"orderflow": { "type": "stdio", "command": "npx", "args": ["-y", "github:zadescoxp/order-flow-mcp"] }
}
}Faster startup: the first
npxrun downloads the package, which can take 20–40 s. To skip that, install it once withnpm install -g github:zadescoxp/order-flow-mcpand useorder-flow-mcpas the command (no args).
Remote / shared server (HTTP)
To run one server that several agents or machines share:
npx -y github:zadescoxp/order-flow-mcp --http --port 3333 --host 0.0.0.0 --token "$SECRET"
# or: docker build -t order-flow-mcp . && docker run -d --restart unless-stopped -p 3333:3333 -e ORDERFLOW_HTTP_TOKEN=$SECRET order-flow-mcpThen connect a client:
claude mcp add --transport http orderflow http://your-host:3333/mcp --header "Authorization: Bearer $SECRET"GET /health reports the server version and the markets being streamed.
From source
git clone https://github.com/zadescoxp/order-flow-mcp && cd order-flow-mcp
npm install && npm run build
claude mcp add orderflow -- node "$PWD/dist/index.js"The repo also ships a .mcp.json, so Claude Code picks the server up automatically inside the clone.
Related MCP server: Hyperliquid Liquidations
Check that it works
Ask your agent: "Use orderflow to get a market snapshot for BTC." You can also exercise every tool against the live exchanges with the bundled smoke test, or browse the tools in the MCP Inspector:
npm run smoke # BTC across all perp venues
node scripts/smoke.mjs ETH bybit
npm run inspect # MCP Inspector UITools
Tool | What it returns |
| Start here. Price and spread, session OHLC, VWAP and σ distance, buy/sell volume and delta over 1m/5m/15m, volume z-score, realized volatility, POC/VAH/VAL, book imbalance and depth bands, OI and its regime, funding, basis, liquidations, block prints, absorption/iceberg events, plain-language signals, and the status of each venue |
| Footprint candles (1m–4h) with bid × ask volume per price row, delta, CVD, POC, VWAP, imbalance flags and stacked imbalances |
| Session volume at price: POC, value area (any %), high-volume nodes, buy/sell per row |
| Aggregated book with cumulative size, depth within 0.1–2 % of mid, large walls, and the top of book on each venue |
| Time bars (1 s–1 h) with OHLC, buy/sell volume, delta, CVD, trade count and volume z-score, plus realized volatility |
| Time & sales, filterable by notional, side and venue |
| Block / whale prints at least N× the average print size |
| Open interest, funding (native, 8h-normalized and annualized) and basis per venue, OI change over 1/5/15/60m with the price × OI regime (new longs, short covering, new shorts, long unwind) |
| Long vs short liquidations, per-minute buckets, the largest liquidation and a cascade flag |
| Absorption (passive side holds against aggressive flow) and iceberg (hidden size refilling) detections |
| Each venue's price premium, volume share and delta, and which exchange leads price (in ms) |
| Resting depth over time within ±1 % of mid, with persistent walls marked pulled, added or held |
| Screener: rank up to 15 symbols by volume z-score, delta, buy %, VWAP stretch, OI change, liquidations… |
| Add markets to the watchlist, stop one, or see what is streaming and for how long |
| The 120+ supported assets, which venues list each one, and timeframes |
There is also an analyze_order_flow prompt (a slash command in clients that support MCP prompts).
Every market tool takes symbol ("BTC", "eth", "SOL-PERP", "DOGEUSDT"…), plus optional venue
(default "all", or one of binance, bybit, okx, bitget, hyperliquid, deribit, coinbase, gate,
kucoin, kraken, htx) and market_type (perp by default, or spot).
Coverage
Venues | |
Perpetuals | Binance, Bybit, OKX, Bitget, Hyperliquid, Deribit, Gate, KuCoin, Kraken, HTX |
Spot | Binance, Coinbase, OKX, Bybit, Bitget, Gate, KuCoin, Kraken, HTX |
Also | Gold and silver (XAU/XAG) perpetuals |
How it works
Exchange WebSockets (Siebly SDKs)
→ venue adapters → normalized trades / books / OI / funding / liquidations
→ order-flow engine (footprint, profile, CVD, VWAP, absorption, icebergs, venue lead/lag)
→ per-market in-memory session → MCP tools (compact JSON) → your agentThe engine is the Order Flow Screener's own code (src/lib), running headless in Node.
Always live
The watchlist streams from startup. As soon as your agent connects (which starts the server), BTC, ETH and SOL perpetuals start streaming across every venue, before anyone asks a question. Change the list with
--watchorORDERFLOW_WATCH;noneturns it off.Every other market keeps streaming once asked for. The first request for any other market starts its stream, and it then runs for as long as the server does. Exchange sockets reconnect on their own after drops.
History builds while the server runs. Statistics cover the time since a market began streaming. Each response includes
stream_age_s, andwarming_upis true for the first minute. The engine keeps about 8 h of 1-minute footprint candles, 2 h of 1-second flow bars, 2 h of depth snapshots and the last 20,000 prints per market. Older data rolls off, so memory stays bounded (about 250 MB for the default three markets after a few minutes).For 24/7 history, run it as a service. A stdio server lives only as long as the agent app that started it, so closing the app ends the stream. To keep data flowing between sessions, run the HTTP server permanently (for example with Docker and
--restart unless-stopped) and point your agents at it.Limits: at most
--max-markets(default 20) markets stream at once. When a new one is needed past that, the least recently used market that isn't on the watchlist is closed.
Responses are compact JSON, and tables use columns + rows, so even large footprints stay small in
the agent's context.
Configuration
Flag | Env | Default | |
|
| stdio | Serve Streamable HTTP at |
|
|
| HTTP port |
|
|
| HTTP bind address |
|
| – | Require |
|
|
| Markets that stream from startup and are never closed; |
|
|
| Close markets outside the watchlist after this much idle time |
|
|
| Upper bound on concurrent markets |
| – | Send exchange WebSockets and REST calls through an HTTP(S) proxy |
To pass env vars from a client config, add "env": { "ORDERFLOW_WATCH": "BTC,ETH" } next to command.
Notes
Some exchanges geo-block certain regions. For example, Binance refuses US IP addresses. A blocked venue shows
status: "connecting"or"error"inconnections, and the other venues keep working. To skip one, pass a specificvenue.Venues quote in USDT, USDC or USD, so an aggregated book can overlap by a few basis points at the touch (
cross_venue_crossed: true). The reportedmidandspread_bpsare medians of each venue's own quote.For the same reason,
lastis the median of each venue's latest print, so it doesn't jump when a USD-quoted venue like Deribit or Kraken trades. The snapshot also gives the newest raw print aslast_printandlast_print_venue.This server is for market analysis only. It cannot place orders, and nothing it returns is financial advice.
Development
npm install
npm run dev # run from source (tsx)
npm test # offline unit tests (synthetic trades through the real engine)
npm run typecheck
npm run build # bundles to dist/index.js (committed so `npx github:` needs no build step)
npm run smoke # live end-to-end test of every toolContributing
Contributions are welcome. See CONTRIBUTING.md for setup, project layout and guidelines.
License
Apache-2.0. The order-flow engine and exchange adapters come from order-flow-screener. Market data is sourced through the Siebly exchange SDKs.
Available Tools
17 toolsget_big_tradesBig printsBRead-only
Block / whale prints: trades at least N× the session's average print size, with buy vs sell totals.
Inputs: symbol (required), limit, venue, min_ratio, +3 more.
get_derivativesOpen interest & fundingARead-only
Perpetuals positioning: aggregate and per-venue open interest, funding (native and 8h-normalized, annualized), next funding, mark/index basis, OI change over 1m/5m/15m/60m with the price × OI regime (new longs, short covering, new shorts, long unwind), and per-minute OI history.
Inputs: symbol (required), venue, market_type, wait_seconds, +1 more.
get_flow_seriesFlow bars (CVD, volume z-score)ARead-only
Time bars of executed flow: OHLC, volume, buy/sell volume, delta, cumulative volume delta (CVD), trade count and rolling volume z-score, plus realized volatility. Built from 1-second bars (2h kept).
Inputs: symbol (required), bars, venue, z_window, +3 more.
get_footprintFootprint candlesBRead-only
Footprint (bid × ask volume per price row) candles: OHLC, volume, delta, CVD, POC, VWAP, per-row bid/ask volume with imbalance flags, and stacked imbalances. Rows are grouped so each candle has at most max_rows rows.
Inputs: symbol (required), venue, candles, max_rows, +7 more.
get_liquidationsLiquidationsBRead-only
Forced liquidations on perpetuals: long vs short notional over a window, per-minute buckets, largest liquidation, cascade flag and the latest events.
Inputs: symbol (required), limit, venue, market_type, +2 more.
get_liquidity_heatmapResting liquidity heatmapARead-only
Order-book depth over time (sampled every second) within ±1% of mid: average resting size per price row and time column, plus persistent walls and whether they were pulled, added or held.
Inputs: symbol (required), rows, venue, columns, +3 more.
get_market_snapshotMarket snapshotBRead-only
One-call overview of live order flow for a market: price/spread, session OHLC & VWAP (σ distance), buy/sell volume & delta over 1m/5m/15m, volume z-score, realized vol, POC/VAH/VAL, order-book imbalance and depth bands, open interest & regime, funding, basis, liquidations, big prints, absorption/iceberg events, plain-language signals and venue connection status.
Inputs: symbol (required), venue, market_type, wait_seconds.
get_microstructure_eventsAbsorption & icebergsBRead-only
Detected absorption (passive side holding against aggressive flow without price moving) and iceberg orders (hidden size refilling at a level).
Inputs: symbol (required), kind, limit, venue, +3 more.
get_order_bookOrder bookBRead-only
Live aggregated order book: top levels with cumulative size, spread, imbalance, depth within 0.1–2% of mid, large resting walls, and optionally per-venue top of book.
Inputs: symbol (required), depth, venue, per_venue, +3 more.
get_tradesTime & salesARead-only
Recent executed trades (tape), newest first, with aggressor side and notional. Filter by minimum notional, side or venue.
Inputs: symbol (required), side, limit, venue, +4 more.
get_venue_comparisonVenue comparisonBRead-only
Cross-exchange view for an aggregated market: each venue's last price premium vs the median, 60s volume share and delta, and which venue leads price (lag in ms).
Inputs: symbol (required), venue, market_type, wait_seconds.
get_volume_profileSession volume profileBRead-only
Volume at price for the streamed session: POC, value area high/low, high-volume nodes, and per-row buy/sell volume and delta.
Inputs: symbol (required), rows, venue, market_type, +2 more.
list_active_marketsActive streamsARead-only
Markets currently streaming on this server, with age, trade count, pin state and venue connection status.
Inputs: no named parameters.
list_marketsList marketsBRead-only
Supported crypto assets (plus gold and silver perpetuals), which exchanges list each as perpetual or spot, and timeframes. Filter with query (e.g. 'sol', 'meme').
Inputs: limit, query.
scan_marketsOrder-flow screenerARead-only
Screen several markets side by side: price change, 5m delta and buy %, 5m notional, 1m volume z-score, VWAP distance, book imbalance, funding, 5m OI change, 5m liquidations and big prints. Starts streams that are not running yet.
Inputs: venue, sort_by, symbols, market_type, +1 more.
unwatch_marketStop a marketBDestructive
Stop streaming a market and discard its in-memory history.
Inputs: symbol (required), venue, market_type.
watch_marketsWatch marketsA
Start streaming markets now and keep them running (pinned, never idle-closed) so history accumulates for later analysis. Returns each market's status.
Inputs: symbols (required), venue, market_type.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Most tools target clearly distinct analytical views: tape, footprint, volume profile, order book, derivatives, liquidations, venue comparison, and stream lifecycle are separable. The main overlap is that get_market_snapshot aggregates many of the same metrics available in specialized tools, and scan_markets overlaps somewhat with snapshot but is clearly multi-market.
Tool names follow a consistent verb_noun convention: list_*, get_*, scan_*, watch_*, unwatch_*, and list_* again. The only minor wrinkle is plural 'watch_markets' versus singular 'unwatch_market', but this does not meaningfully hurt readability or predictability.
Seventeen tools is slightly above the ideal compact range, but each maps to a meaningful order-flow concept or stream-lifecycle operation. The set is broad without obvious redundant filler, though a few overview tools could potentially be consolidated.
The surface covers market discovery, stream lifecycle, single-market overview, order-book depth, tape, block trades, footprint, volume profile, flow series, derivatives, liquidations, microstructure events, venue comparison, and multi-market scanning. For an order-flow analytics server, this is comprehensive with no obvious dead ends.
Maintenance
Related MCP Connectors
Crypto perps for AI agents: funding, OI, liquidations, order book, CVD, volume profile, footprint.
Crypto market data for AI agents: live prices, OHLCV, sentiment, indicators and exchanges.
Aligned market data for AI agents: crypto, stocks, FX and macro on one clock. Local or hosted.
Live crypto market signals for AI agents: perp liquidations, funding, OI positioning, yield, FX.
Related MCP Servers
- AlicenseBqualityDmaintenanceCross-exchange crypto orderflow for AI agents. 20 exchanges, 26 tokens, 9 tools — CVD, whale activity, funding/OI, 7-year OHLCV, on-chain address risk (EVM + Solana). Pay-per-call USDC via x402, no API key.941 npm1MIT
- AlicenseAqualityBmaintenanceHyperliquid liquidations, wallets and live order-flow signals for trading bots and agents. Liquidation map, funding, open interest and SQL from Ironflow's own nodes. 46 tools, no key to start.4461,189 npm1MIT
- AlicenseNot gradedqualityCmaintenanceProvides real-time crypto market data for AI agents, including derivatives, liquidations, options, macro, and market regime detection, with pay-per-call via x402 micropayments on Base.79 npmMIT

CoinLobster MCPofficial
AlicenseAqualityCmaintenanceProvides real-time crypto whale trade data and market analysis to AI agents, including unusual flow radar, liquidations, funding rates, and market snapshots across 15 exchanges and on-chain DEXs.1757 npm11MIT