Binance MCP Server
The Binance MCP Server provides 76+ tools for interacting with Binance USD-margined futures, covering market data, technical indicators, risk analysis, statistical utilities, and futures trading.
Market Data
Real-time prices, order book depth, best bid/ask quotes
K-line (candlestick) historical data with various intervals
24h ticker statistics (price change, high/low, volume)
Mark prices, funding rates (current and historical), open interest
Aggregated/recent trades, exchange info, and API connectivity tests
Technical Indicators
Trend: SMA, EMA, DEMA, RMA, WMA, WSMA, DMA, ADX, Linear Regression, PSAR, VWAP, Zigzag
Momentum: RSI, Stochastic RSI, Stochastic Oscillator, MACD, AO, MOM, ROC, CCI, Williams %R
Volatility: Bollinger Bands, ATR, Acceleration Bands, OBV
Signals: EMA cross, MACD+RSI combo, Bollinger Bands+RSI, MA cross (golden/death cross); multi-indicator batch tool
Risk & Statistical Analysis
Sharpe, Sortino, and Calmar ratios; max drawdown; VaR and CVaR
Statistical utilities: mean, min/max, median, quartile, standard deviation
Win rate, profit/loss ratio, streak analysis, grid level calculation (arithmetic/geometric)
Futures Trading (requires API key)
Account: Balance, positions, income history, commission rates
Order Placement: Limit, market, stop, take-profit, and trailing stop orders; batch orders (up to 5)
Order Management: Modify, cancel single/batch/all orders; query order status and history
Quick Orders: One-click stop-loss or take-profit with percentage-based offset
Configuration: Leverage (1–125x), margin type (isolated/cross), position margin, position mode
History: Trade history, force liquidation orders, margin change history
Provides tools for interacting with Binance's futures API, enabling AI agents to access real-time market data, trade orders, and technical indicators.
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., "@Binance MCP Server What is the current price of 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.
Binance MCP Server
A Binance USDT-M futures MCP server based on Model Context Protocol, providing AI assistants with 61 MCP tools covering market data, technical indicators, risk analysis, and futures trading.
Built on the MCP server v2 SDK and Binance's official SDK (@binance/derivatives-trading-usds-futures), all values are automatically normalized according to exchange precision rules, with two-level market data caching, -1007 timeout idempotent recovery, and clock skew detection.
Quick Start
Zero-Configuration Experience (Analysis Only, No Trading)
npx @iuk-ink/binance-mcp-serverNo API key is required. Connect to the testnet by default and use the market data, indicator, and risk analysis tools.
Configuring an MCP Client
{
"mcpServers": {
"binance": {
"command": "npx",
"args": ["-y", "@iuk-ink/binance-mcp-server"],
"env": {
"BINANCE_TESTNET": "true"
}
}
}
}If you need trading features, add BINANCE_API_KEY and BINANCE_API_SECRET.
Environment Variables
Variable | Required | Default | Description |
| No |
| Testnet (virtual funds) / Mainnet |
| No |
| Demo trading environment (shares credentials with mainnet) |
| No | — | Custom REST endpoint (highest priority) |
| No | — | Trading tools are not registered if not set |
| No | — | Same as above |
| No | — | HTTP/HTTPS proxy address |
| No |
| Request timeout (ms) |
| No |
| Network retry count |
| No |
| Retry backoff base (ms) |
| No |
| Signature time window (ms) |
| No | All | Tool domain filter, comma-separated: |
| No |
| MCP server name |
| No |
| debug / info / warn / error |
Related MCP server: Binance MCP Server
Tool List (61, Mainnet)
On testnet, there are 57 tools (the 4 sentiment endpoints are only available on mainnet and are not registered).
Market Data (18)
Tool | Description |
| Latest trade price |
| Best bid/ask price + quantity (much lighter than orderbook) |
| Multi-level order book depth (5/10/20/50/100/500/1000) |
| Historical K-line data |
| 24h change / high / low / volume |
| Mark price (= liquidation reference price, includes funding rate) |
| Open interest (OI) |
| Current funding rate and bounds |
| Historical funding rates |
| Perpetual / quarterly / next quarter continuous contract K-lines (basis analysis) |
| Trading rules / precision / minimum order size |
| One-stop snapshot: market data + indicators + funding rate + order book, in a single call |
| Connectivity test / server clock calibration |
| OI historical statistics (mainnet only) |
| All-account long/short ratio (mainnet only) |
| Aggressive buy/sell volume ratio (mainnet only) |
| Large trader position long/short ratio (mainnet only) |
Technical Indicators (19)
Direct-connection design: complete "fetch K-lines → calculate indicator" in one step, without needing to call market_klines.
Category | Tools |
Trend |
|
Momentum |
|
Volatility |
|
Composite signals |
|
Batch |
|
Risk Analysis (3)
Tool | Description |
| Sharpe + Sortino + annualized return / volatility (annualization factor automatically inferred from the K-line timeframe) |
| Maximum drawdown (including peak/trough prices and positions) |
| VaR / CVaR (confidence level 0.5~0.99 adjustable) |
Futures Trading (21, API Key Required)
Category | Tools |
Account |
|
Order |
|
Query |
|
Configuration |
|
Orders are automatically handled: price / quantity precision rounded down (tickSize / stepSize), minimum notional value validation, and after a -1007 match timeout, it verifies whether the order was filled using an idempotent order ID before deciding whether to retry.
Migrating from 2.x to 3.x
Breaking Changes
MCP SDK:
@modelcontextprotocol/sdk@1→@modelcontextprotocol/server@2(official package rename)Binance integration: community package
binance@3→ official@binance/derivatives-trading-usds-futures@38Node.js:
>=18→>=20Proxy environment variable:
HTTP_PROXY→BINANCE_PROXY_URLToolset 76 → 61: removed the statistics helper domain (10 tools for mean / extremes / quartiles, etc.) and redundant standalone / signal variants of indicators; the legacy
_directtools are now direct-connect tools without the suffix (for example,rsi_direct→indicator_rsi); risk tools renamed (analysis_*fromrisk_*)Tool name prefixes: all tools have a domain prefix (
market_/indicator_/analysis_/trading_); existing AI client prompts and workflows must adapt to the new names
New Capabilities
market_overviewone-stop snapshot (aggregates market data / indicator / funding rate / order book in a single call)MCP_TOOL_DOMAINStool domain filtering,BINANCE_USE_DEMO/BINANCE_BASE_URLenvironment configurationTwo-level cache (exchangeInfo 5min + klines 3s, in-flight deduplication)
-1007match timeout idempotent recovery, clock skew detection at startupAutomatic order precision rounding + upfront-order minimum notional validation
Parameter validation fully aligned with official constraints (
clientOrderIdcharacter set, GTD upper bound, trailing drawdown rate 0.1~10, etc.)
AI Usage Guide (Skill)
The repository includes skills/binance-trader/SKILL.md — a usage manual written for AI assistant, covering tool selection decisions, cross-tool workflows, trading safety discipline, and error recovery scripts. Clients that support the Skill mechanism (Claude Code / Trae, etc.) can mount it directly, allowing the AI to upgrade from "can use tools" to "use tools well".
Local Development
git clone https://github.com/iuk-ink/binance-mcp-server
cd binance-mcp-server
npm installCommands
Command | Description |
| Direct startup with tsx for development |
| TypeScript type checking |
| Run all 196 tests with |
| Compile to |
| Run the compiled output |
License
MIT
Available Tools
57 toolsanalysis_drawdown最大回撤ARead-only
直连版:拉取 K 线以收盘价为净值序列,计算标的最大回撤(负数)与峰谷位置(非账户绩效)。窗口越大越接近历史极值,建议 1d×365 起评估最大可能回撤。
Inputs: symbol (required), interval (required), limit. Returns: peak, trough, maxDrawdown, sampleCount
analysis_sharpe夏普·索提诺ARead-only
直连版:拉取 K 线推导标的收益率序列,计算年化收益/波动、夏普与索提诺。度量对象为标的价格序列的风险特征(非账户绩效);periodPerYear 缺省按 interval 自动推断(1h→8760、1d→365);严肃评估建议使用 1d×365 及以上大窗口(小窗口年化统计意义有限)。
Inputs: symbol (required), interval (required), limit, riskFreeRate, +1 more. Returns: sharpe, sortino, sampleCount, annualReturn, +2 more
analysis_varVaR · CVaRARead-only
直连版:拉取 K 线推导收益率,按历史模拟法计算置信度下的 VaR 与 CVaR(负值=损失;度量标的单根 K 线尾部风险,非账户绩效)。可作止损距离参考:止损应 ≥ 单根 VaR × 杠杆,否则易被正常波动扫损。
Inputs: symbol (required), interval (required), limit, confidence. Returns: var, cvar, confidence, sampleCount
indicator_adx平均趋向指标ARead-only
直连版:拉取 K 线后计算 ADX,返回稳定序列(衡量趋势强度,0-100,与方向无关)。
Inputs: symbol (required), interval (required), limit, period. Returns: data
indicator_atr平均真实波幅ARead-only
直连版:拉取 K 线后计算 ATR,返回稳定序列(衡量波动,默认 Wilder 平滑)。
Inputs: symbol (required), interval (required), limit, period. Returns: data
indicator_bbands布林带CRead-only
直连版:拉取 K 线后计算布林带,返回稳定三元组序列(lower / middle / upper)。
Inputs: symbol (required), interval (required), limit, period, +1 more.
indicator_bb_rsi布林带 + RSI 组合BRead-only
直连版:拉取 K 线后同时计算布林带完整数据、RSI、%B 与价格分区。
Inputs: symbol (required), interval (required), limit, period, +2 more. Returns: rsi, zone, lower, upper, +2 more
indicator_cci顺势指标BRead-only
直连版:拉取 K 线后计算 CCI,返回稳定序列(以典型价离差归一,可正可负)。
Inputs: symbol (required), interval (required), limit, period. Returns: data
indicator_divergenceRSI 背离检测ARead-only
直连版:拉取 K 线后检测价格与 RSI 的顶背离 / 底背离(前后半窗极值对比),返回背离类型与全部极值明细。
Inputs: symbol (required), interval (required), limit, lookback, +1 more. Returns: rsi, type, price, window
indicator_ema指数移动平均BRead-only
直连版:拉取 K 线后计算指数移动平均,返回 EMA 序列(以首价为平滑种子,period 为周期)。
Inputs: symbol (required), interval (required), limit, period. Returns: data
indicator_macdMACDCRead-only
直连版:拉取 K 线后计算 MACD,返回稳定三元组序列(macd / signal / histogram)。
Inputs: symbol (required), interval (required), limit, longPeriod, +2 more. Returns: data
indicator_macd_rsiMACD + RSI 组合BRead-only
直连版:拉取 K 线后同时计算 MACD 与 RSI 最新值,返回完整数据(不输出主观信号)。
Inputs: symbol (required), interval (required), fast, slow, +3 more. Returns: rsi, macd
indicator_ma_cross均线交叉ARead-only
直连版:拉取 K 线后检测双均线交叉状态(golden_cross / death_cross / none)与多空偏向。
Inputs: symbol (required), interval (required), fast, slow, +2 more. Returns: bias, fast, slow, cross
indicator_mfi资金流量指标BRead-only
直连版:拉取 K 线后计算 MFI,返回稳定序列(0-100,带成交量的 RSI 变体)。
Inputs: symbol (required), interval (required), limit, period. Returns: data
indicator_multi批量指标ARead-only
直连版:单次拉取 K 线,批量计算 RSI(14) + MACD(12/26/9) + BBands(20/2) 最新值。可选启用 ATR / ADX / Stoch。替代逐个调用 3-6 次网络往返。
Inputs: symbol (required), interval (required), limit, includeADX, +2 more. Returns: adx, atr, rsi, macd, +2 more
indicator_obv能量潮CRead-only
直连版:拉取 K 线后计算 OBV,返回稳定序列(结合开盘与收盘方向的累计成交量)。
Inputs: symbol (required), interval (required), limit, period. Returns: data
indicator_rsi相对强弱指标ARead-only
直连版:拉取 K 线后计算 RSI,返回稳定序列(0-100,Wilder 平滑,period 为周期)。
Inputs: symbol (required), interval (required), limit, period. Returns: data
indicator_sma简单移动平均ARead-only
直连版:拉取 K 线后计算简单移动平均,返回稳定 SMA 序列(period 为周期)。
Inputs: symbol (required), interval (required), limit, period. Returns: data
indicator_stoch随机指标 KDJBRead-only
直连版:拉取 K 线后计算随机指标,返回稳定 K / D / J 三元组序列(kPeriod / kSmoothing / dPeriod 可调)。
Inputs: symbol (required), interval (required), limit, dPeriod, +2 more. Returns: data
indicator_super_trendSuperTrendARead-only
直连版:拉取 K 线后计算 SuperTrend,返回稳定序列(supertrend 值 + BULLISH/BEARISH 方向)。period 为 ATR 周期,multiplier 为通道倍数。
Inputs: symbol (required), interval (required), limit, period, +1 more. Returns: data
indicator_volatility_regime波动率状态分类BRead-only
直连版:基于布林带宽百分位判断 squeeze / low_volatility / normal / high_volatility / expansion,辅助仓位管理。
Inputs: symbol (required), interval (required), limit, bbPeriod, +1 more. Returns: regime, bandwidth, percentile
indicator_vwap成交量加权平均价BRead-only
直连版:拉取 K 线后计算累计 VWAP,返回稳定序列。
Inputs: symbol (required), interval (required), limit. Returns: data
market_24hr_ticker24h 行情统计ARead-only
获取 24h 滚动统计(涨跌幅/高低价/成交量额)。缺省 symbol 返回全市场(weight 高,慎用)。
Inputs: symbol.
market_book_ticker最优买卖报价ARead-only
获取最优买/卖价与数量(比订单簿轻量)。缺省 symbol 返回全市场(weight 高,慎用)。
Inputs: symbol.
market_continuous_klines连续合约 K 线BRead-only
获取连续合约(如季度/永续)的 K 线。
Inputs: pair (required), interval (required), contractType (required), limit.
market_exchange_info交易规则ARead-only
获取交易对精度规格(价格/数量小数位、tickSize、stepSize、最小名义价值)。缺省返回全市场(数据量大,慎用)。
Inputs: symbol.
market_funding_rate资金费率规则ARead-only
获取全市场资金费率规则(各币种费率上下限与结算间隔,无 symbol 过滤,weight 高慎用)。查单交易对当前费率数值请用 market_mark_price。
Inputs: no named parameters.
market_funding_rate_history历史资金费率BRead-only
获取指定交易对的历史资金费率记录。
Inputs: limit, symbol.
market_klinesK 线历史BRead-only
获取指定交易对与周期的 K 线(含 OHLCV 与成交信息),支持时间范围过滤。
Inputs: symbol (required), interval (required), limit, endTime, +1 more. Returns: data
market_mark_price标记价ARead-only
获取标记价、指数价与资金费率信息。查单交易对资金费率数值(lastFundingRate + nextFundingTime)首选本工具。缺省 symbol 返回全市场(weight 高,慎用)。
Inputs: symbol.
market_open_interest未平仓量ARead-only
获取指定交易对当前未平仓量。
Inputs: symbol (required). Returns: time, symbol, openInterest
market_orderbook订单簿深度ARead-only
获取指定交易对的买卖盘快照。limit 合法值 5/10/20/50/100/500/1000。
Inputs: symbol (required), limit.
market_overview市场快照ARead-only
一次返回单个交易对的完整分析数据(行情/流动性/资金/情绪/指标/派生量),供 AI 直接解读并给出分析结论。
Inputs: symbol (required), limit, interval. Returns: meta, price, candles, capital, +4 more
market_ping连通性测试ARead-only
测试与币安交易所 REST API 的连通性。无需参数,成功返回 { ok: true }。
Inputs: no named parameters. Returns: ok
market_price最新成交价BRead-only
获取交易对最新成交价。返回 symbol 与 price(number 类型)。
Inputs: symbol (required). Returns: price, symbol
market_time服务器时钟ARead-only
获取币安交易所服务器时间(毫秒时间戳),用于时钟同步与签名校验。
Inputs: no named parameters. Returns: serverTime
trading_account账户总览ARead-onlyIdempotent
返回:钱包余额 / 未实现盈亏 / 保证金等汇总。
Inputs: no named parameters. Returns: availableBalance, totalMarginBalance, totalWalletBalance, totalUnrealizedProfit…
trading_algo_orders条件单列表ARead-onlyIdempotent
返回:当前挂出的未触发条件单。symbol 可选。
Inputs: symbol.
trading_balance资产余额ARead-onlyIdempotent
返回:账户全部资产余额(含未实现盈亏)。
Inputs: no named parameters. Returns: data
trading_cancel_algo撤销条件单BDestructive
撤销条件单。clientAlgoId 与 algoId 二选一。
Inputs: algoId, clientAlgoId.
trading_cancel_all撤销全部未成交ADestructive
撤销指定交易对全部未成交订单。
Inputs: symbol (required).
trading_cancel_order撤单ADestructive
撤销指定订单。orderId 与 origClientOrderId 二选一。
Inputs: symbol (required), orderId, origClientOrderId.
trading_commission用户费率ARead-onlyIdempotent
返回:指定交易对的 maker/taker 费率(含 VIP 折扣与 BNB 抵扣)。
Inputs: symbol (required). Returns: symbol, makerCommissionRate, takerCommissionRate
trading_force_orders强平订单CRead-onlyIdempotent
返回:强平/自动减仓(ADL)订单记录。
Inputs: limit, symbol, autoCloseType.
trading_get_order订单查询BRead-onlyIdempotent
返回:指定订单详情。orderId 与 origClientOrderId 二选一。
Inputs: symbol (required), orderId, origClientOrderId.
trading_income收支流水CRead-onlyIdempotent
返回:资金费/手续费/已实现盈亏等流水记录。income 负数为支出。incomeType 合法值与官方枚举一致(如 FUNDING_FEE / COMMISSION / REALIZED_PNL)。
Inputs: limit, symbol, endTime, startTime, +1 more.
trading_modify_order改单ADestructive
修改未成交订单(仅 LIMIT)。orderId 与 origClientOrderId 二选一。
Inputs: side (required), price (required), symbol (required), quantity (required), +2 more.
trading_open_orders未成交订单BRead-onlyIdempotent
返回:当前全部未成交订单。symbol 可选。
Inputs: symbol.
trading_order_history历史订单BRead-onlyIdempotent
返回:指定交易对的历史订单(时间倒序)。
Inputs: symbol (required), limit, endTime, orderId, +1 more.
trading_place_algo创建条件单ADestructive
创建条件委托(止损/止盈/追踪止损)。type 决定必填参数:
STOP_MARKET / TAKE_PROFIT_MARKET:需 triggerPrice
STOP / TAKE_PROFIT:需 triggerPrice + price(限价委托价)
TRAILING_STOP_MARKET:需 callbackRate(百分比,0.1~10),可选 activatePrice 触发价方向规则(违反将报 -2021 Order would immediately trigger):
止损类(STOP*):BUY 须高于最新价,SELL 须低于最新价
止盈类(TAKE_PROFIT*):BUY 须低于最新价,SELL 须高于最新价 closePosition=true 时触发后全平仓位,且要求该 symbol 已有对应方向持仓 (无持仓时报错 GTE can only be used with open positions),不可传 quantity / reduceOnly。 持仓模式:双向(Hedge)必须传 positionSide(LONG/SHORT),单向省略;可用 trading_position_mode 查询。
Inputs: side (required), type (required), symbol (required), price, +11 more.
trading_place_order下单ADestructive
下单(自动精度规整)。dryRun=true 时仅校验不提交。reduceOnly 仅单向模式可用。timeInForce 为 GTD 时必须提供 goodTillDate。持仓模式约束:单向省略 positionSide,双向(Hedge)必须传 positionSide(LONG/SHORT),可用 trading_position_mode 查询。
Inputs: side (required), type (required), symbol (required), quantity (required), +8 more.
trading_position_margin调整逐仓保证金ADestructive
调整逐仓保证金。type: 1=增加,2=减少(官方枚举);amount 恒为正数。双向(Hedge)模式下须提供 positionSide。
Inputs: type (required), amount (required), symbol (required), positionSide. Returns: type, amount
trading_position_mode持仓模式A
查询并切换持仓模式。dual=true 双向(Hedge),false 单向(One-way)。缺省 dual 时仅查询。
Inputs: dual.
trading_positions持仓查询BRead-onlyIdempotent
返回:当前持仓列表。缺省 symbol 返回全部持仓。
Inputs: symbol.
trading_set_leverage设置杠杆CDestructive
设置交易对杠杆倍数(1~125,视交易对而定)。
Inputs: symbol (required), leverage (required). Returns: symbol, leverage
trading_set_margin_type设置保证金模式ADestructive
切换 ISOLATED(逐仓)/ CROSSED(全仓)。存在持仓时可能被拒绝。
Inputs: symbol (required), marginType (required).
trading_trades成交记录CRead-onlyIdempotent
返回:指定交易对的逐笔成交记录。
Inputs: symbol (required), limit, orderId.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 57 tools
Most tools target distinct resources or actions with clear category prefixes. Some overlap exists among composite indicators (indicator_macd_rsi, indicator_bb_rsi, indicator_multi) and funding-rate related tools, but descriptions explicitly disambiguate which to use.
All tools follow a strict <domain>_<object_or_action> pattern across market, trading, indicator, and analysis prefixes. Names are consistently snake_case, making the large set predictable and scannable.
57 tools is well above the 25+ threshold for 'too many.' While grouped into coherent categories, the indicator subset alone could be consolidated (e.g., combined macd_rsi, bb_rsi, multi), and the overall surface feels excessive for a single server.
The server covers the core Binance futures/spot lifecycle well: market data, order management, positions, balance, leverage, margin, and algo orders. Minor gaps such as missing deposit/withdraw endpoints and batch order operations exist, but trading workflows are largely complete.
Maintenance
Related MCP Connectors
Free crypto-futures paper trading and live market data for AI agents. 29 tools; no key for data.
Trade 16 crypto exchanges + MetaTrader 5 from your AI assistant via one MCP connection.
Live crypto + IDX stock market intelligence for AI agents — 19 tools, no API key.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseAqualityFmaintenanceA Model Context Protocol server implementation that enables AI assistants to interact with the Paradex perpetual futures trading platform, allowing for retrieving market data, managing trading accounts, placing orders, and monitoring positions.169MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that exposes Binance cryptocurrency exchange data to LLMs, allowing agents to access real-time prices, order books, and historical market data without requiring API keys.21MIT
- FlicenseNot gradedqualityDmaintenanceEnables automated cryptocurrency trading on Binance and provides integration for monitoring Base network operations. It allows users to execute trades, fetch market data, and calculate technical indicators like RSI and MACD through the Model Context Protocol.-
- FlicenseNot gradedqualityDmaintenanceProvides real-time investment news, technical analysis via TA-Lib, and Binance trading capabilities including order management and market data retrieval. It enables AI assistants to perform financial market research and execute trades through the Model Context Protocol.-