microstructure-mcp
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., "@microstructure-mcp show me the 4h liquidity zones and market structure for BTCUSDT"
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.
microstructure-mcp
Market-microstructure primitives for AI agents, over MCP.
LLM trading agents are usually fed raw candles and asked to "figure out the chart". This server does the deterministic part for them: it computes structured market-structure features — liquidity zones, fair value gaps, order blocks, break of structure — from live exchange data and exposes them as typed MCP tools. The agent reasons; the server measures.
Works out of the box with Claude Desktop, Claude Code, and any MCP-compatible client. Data source: Bybit v5 public API (no API key required).
Tools
Tool | What it returns |
| Clusters of equal highs/lows (buy-side / sell-side resting liquidity), touch count, swept status, distance from price |
| 3-candle FVGs with zone boundaries, size %, filled / mitigated status |
| Last opposite candle before an impulsive move, with mitigation status |
| Current trend read + recent BOS / CHoCH events |
| Everything above in a single call — the cheapest way to give an agent full context |
All tools take symbol (e.g. BTCUSDT), timeframe (1m–1w) and limit, plus per-tool sensitivity parameters. Output is compact JSON designed to be token-efficient in agent context windows.
Related MCP server: Bybit MCP Server
Quick start
git clone https://github.com/rustamovppl/microstructure-mcp
cd microstructure-mcp
pip install -e .Add to Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"microstructure": {
"command": "microstructure-mcp"
}
}
}Then ask the agent something like: "Pull a 4h snapshot of BTCUSDT and describe where liquidity is resting relative to the current structure."
Example output
get_liquidity_zones("BTCUSDT", "4h") →
{
"symbol": "BTCUSDT",
"timeframe": "4h",
"last_close": 96420.5,
"zones": [
{
"side": "buy_side",
"level": 97180.0,
"touches": 3,
"swept": false,
"distance_pct": 0.7877
}
]
}Detection logic (brief)
Swings — symmetric fractal window (
lookbackcandles each side).Liquidity zones — swing highs/lows clustered within
tolerance_pct; ≥min_touchesequal highs = buy-side liquidity, equal lows = sell-side. Markedsweptonce traded through.FVG — classic 3-candle gap; tracked to
mitigated(price entered the zone) orfilled(traded through it).Order blocks — last opposite-direction candle preceding a move ≥
impulse_pctwithinimpulse_windowcandles.Structure — close beyond the last confirmed swing = BOS; against prevailing direction = CHoCH.
The logic is pure-Python, dependency-light, and unit-tested (pytest tests/).
Roadmap
Multi-timeframe confluence in
get_snapshotVolume-weighted liquidity scoring
Additional data sources (Binance, Hyperliquid)
SSE transport for hosted deployment
Backtest harness for detection-parameter tuning
Disclaimer
This server produces descriptive market-structure features, not trade signals. Nothing here is financial advice; markets can and will invalidate any structural read.
License
MIT
Available Tools
5 toolsget_fair_value_gapsC
Detect 3-candle fair value gaps (FVG) with fill/mitigation status.
Inputs: symbol (required), limit, timeframe, min_gap_pct, +1 more. Returns: result
get_liquidity_zonesB
Detect resting-liquidity levels (clusters of equal highs = buy-side, equal lows = sell-side).
Returns levels sorted by distance from current price, with touch count and whether the level has already been swept.
Inputs: symbol (required), limit, timeframe, min_touches, +1 more. Returns: result
get_market_structureC
Current trend read plus recent break-of-structure (BOS) and change-of-character (CHoCH) events.
Inputs: symbol (required), limit, timeframe. Returns: result
get_order_blocksC
Detect order blocks: the last opposite candle before an impulsive move, with mitigation status.
Inputs: symbol (required), limit, timeframe, impulse_pct. Returns: result
get_snapshotB
One-call snapshot: structure + nearest liquidity + unfilled FVGs + recent order blocks.
Inputs: symbol (required), limit, timeframe. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct microstructure concept (FVG, liquidity zones, market structure, order blocks) with clear, non-overlapping descriptions. The snapshot tool aggregates others but serves a different convenience purpose.
All tools follow a consistent 'get_' prefix pattern with descriptive noun phrases (fair_value_gaps, liquidity_zones, etc.), making it easy to predict tool behavior from names.
With only 5 tools, the server is tightly scoped to essential microstructure analysis concepts. Each tool earns its place, and the count is ideal for this specialized domain.
The set covers the core microstructure concepts (FVG, liquidity, market structure, order blocks) and adds a snapshot tool for convenience. There are no obvious gaps for the stated purpose.
Maintenance
Related MCP Connectors
Agent-native crypto market-data over MCP+REST: order flow, whales, liquidations, calibrated scores
Live crypto technical analysis for agents: 200+ causal indicators, signals and liquidity sweeps.
Crypto perps for AI agents: funding, OI, liquidations, order book, CVD, volume profile, footprint.
Market intelligence for AI agents. Real-time data, cross-market analysis, and regime detection.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables MCP-compatible AI clients to access live crypto market data and AI-driven quantitative analysis, with structured outputs and full observability.-

Bybit MCP Serverofficial
AlicenseCqualityBmaintenanceA production-ready MCP server for Bybit — 206 tools covering market data, trading, positions, account management, assets, and real-time WebSocket streams. Enables AI assistants to interact directly with the Bybit cryptocurrency exchange through natural language.4001,625 npm45MIT- FlicenseNot gradedqualityDmaintenanceEnables fetching live crypto market data from Binance, Bybit, and Hyperliquid via MCP tools, including klines, orderbook, funding rates, technical indicators, and market breadth for real-time analysis by LLMs.-
- AlicenseAqualityDmaintenanceEnables AI assistants to analyze smart-money market structure—trend, character shifts (ChoCh/BOS), liquidity sweeps, fair value gaps, order blocks, and pullback zones—from Hyperliquid or user-supplied candles.3Apache 2.0