Binance MCP Server
Binance MCP Server — Railway / USDⓈ-M Futures Edition
MCP server for Binance USDⓈ-M Futures public market data.
Why this version is different
The original project used Binance Spot REST (api.binance.com) and legacy
WebSocket URLs. That is a poor fit for a Railway deployment that receives
HTTP 451 from Binance.
This version uses Binance's current USDⓈ-M Futures WebSocket architecture:
Market data:
wss://fstream.binance.com/marketHigh-frequency public depth:
wss://fstream.binance.com/public
The server maintains an in-memory live cache and exposes MCP tools over Streamable HTTP.
Important limitation
This build intentionally does not depend on Binance REST for live public data.
Therefore:
get_price,get_24hr_ticker,get_order_book,get_book_ticker,get_recent_trades, andget_aggregate_tradesare live WebSocket-backed.get_recent_tradesmeans trades received since the collector connected.The order book is a top-5/10/20 partial depth stream, not a full local order-book reconstruction.
get_historical_pricescurrently exposes the rolling 1-minute live kline cache, not arbitrary historical Binance candles.Historical REST-only tools return a clear error instead of silently failing.
Railway
Build:
docker build .Start:
python run_server.pyRailway should expose the MCP endpoint at:
https://YOUR-DOMAIN/mcpThe server reads Railway's PORT environment variable automatically.
Recommended Spark test
Ask Gemini Spark:
Using the Binance MCP, analyze BTCUSDT Futures right now. Call get_price, get_24hr_ticker, get_order_book(depth=10), get_recent_trades(limit=20), get_book_ticker, and subscribe_to_trade_stream. Report exactly which tools succeeded and show the returned market data.
The first call may take a few seconds while the WebSocket collectors connect.
Source architecture
Gemini Spark
|
v
Railway MCP /mcp
|
+--> Market WS
| wss://fstream.binance.com/market/stream
| ticker + aggTrade + bookTicker + kline_1m
|
+--> Public Depth WS
wss://fstream.binance.com/public/ws/<symbol>@depth20@100msLatest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/amir45400/binance-mcp1'
If you have feedback or need assistance with the MCP directory API, please join our Discord server