Skip to main content
Glama
iuk-ink

Binance MCP Server

Binance MCP Server

![Version](https://img.shields.io/n/v/@iuk-ink/binance- mCP-server.svg) Node.js Licenz

Ein usDT-margined-Futures-MCP-Server auf Basis des Model Context Protocol. Er stellt KI-Asstistenten 61 MCP-Tools fur Marktdaten, techische Indikatoren, Risikatelyse und Futures-Handel ber.

Er baute auf dem MCP Server-v-SDK and dem offiziell binance-SDK (@binance/derivatives-trading-usds-futures) und erbringt. Allie Werte and server(unim Sd um).

Schnellstart

Null-Konfuration-Experipuenz (nur Analyse, kein Handle)

npx @iuk-ink/binance-mcp-server

Ohne API-Key and mit nervorgabesmassiger Verbindung zu den Testinet können Marktdaten, Indikatoren und Risikoanalyse-Tools verwendet werden.

MCP-Cient-Configurieren

{
  "mcpServers": {
    "binance": {
      "command": "npx",
      "args": ["-y", "@iuk-ink/binance-mcp-server"],
      "env": {
        "BINANCE_TESTNET": "true"
      }
    }
  }
}

Für 亨del funktionen ergänzen Sie BINANCE_API_KEY und BINANCE_API_SECRET.

Umgebungs-Variablen

| Ariable | | 必填 | 准默认er | 说明 | | ---- | :-: | ---- | ---- | | BINANCE_TESTNET | 否 | true | Testizin(virtuelles Geld) / 主网 | | BINANCE_USE_DEMO | 否 | false | demo 交易环境(与主网凭证共用) | | BINANCE_BASE_URL | 否 | — 自定义 REST 端点(优先级最大) | | BINANCE_API_KEY | 否 | — 不填则交易工具不注册 | | BINANCE_API_SECRET | 否 | — | 同上 | | BINANCE_PROXY_URL | 否 | — HTTP/HTTPS proxy 地址 | | BINANCE_TIMEOUT | 否 | 100000 | 请求超时(毫秒) | | BINANCE_RETRIES | 否 | 3 | 网络重试次数 | | BINANCE_BACOFF | 否 | 1000 | 重试退避基数(毫秒) | | BINANCE_SECV_WWINNEE | 否 | 500 | 签名时间窗口(毫秒) | | MCP_TOOL_DOMAINS | 否 | 全部 | 工具域过滤器,逗号分隔:market,trading,indicator,analysis | | MCP_SERVER_NAEE | 否 | binance-mcp-server | MCP 服务名 | | LOG_LEVEL | 否 | info | debug / info / warn / error |

Related MCP server: Binance MCP Server

工具清单(61 个,主网)

测试网下 57 个(4 个情绪端点仅主网可用,不注册)。

价格数据(18)

工具

说明

market_price

最新成交价

market_book_ticks

最优卖挂单(比 orderbook 轻量得多)

market_orderbook

订单簿多档深度(5/10/20/50/100/500/1000)

market_klines

K线历史数据

market_24hr_ticks

24h 涨 / 高 / 低 / 量

market_mark_price

主线标价(= 清参考价格,含资金费)

market_open_interest

未平仓合约数量(IO)

market_funding_rate

当前资金费率及上/下限制

market_funding_rate_history

历史资金费率

market_continuous_klines

永续 / 当季 / 次季连续合同 K 线(基差析)

market_exchange_info

交易规则 / 精度 / 最小下单数量

market_overview

一站式望:一项线条 + 指标 + 资金费 + 盘口,单一调用

market_ping / market_time

连通测试 / 服务器时钟校准

market_open_interest_hist

OI 历史统计(仅主网)

market_long_short_ratio

所有账户多空比(仅主网)

market_aker_volume

主动买入/卖出量比(仅主网)

market_top_trader_ratio

每个大账户多空比(仅主网)

技术指标(19)

直连设计:一次就完成「拉出 K线 → 计算指标」,无需先调 market_klines

类型

工具

趋势

indicator_sma / indicator_ema / indicator_macd / indicator_adx / indicator_super_trend / indicator_vwap

动量

indicator_rsi / indicator_stoch / indicator_cci / indicator_mfi / indicator_obv

波动性

indicator_atr / indicator_bbands / indicator_volatility_regime

组合信号

indicator_ma_cross(均线交叉)/ indicator_macd_rsi / indicator_bb_rsi / indicator_divergence(RSI 背离)

批量

indicator_multi(单个调用 = RSI + MACD + BBands + 可选 ATR / ADX / Stoch)

风险分析(3)

工具

说明

analysis_sharpe

强 + Sortino + 年度化收益 / 波动(按 K线周期自动推断年化系数)

analysis_drawdown

最大回撤(含峰谷点位与位置)

analysis_var

VaR / CVaR(置信度 0.5~0.99 可调)

期货交易(21,需 API 钥匙)

类型

工具

账户

trading_balance / trading_account / trading_positions / trading_income / trading_commission

订单

trading_place_order(包含 dryRun 演练)/ trading_place_algo(止损 / 止盈 / 避免追踪)/ trading_modify_order / trading_cancel_order / trading_cancel_algo / trading_cancel_all

查询

trading_get_order / trading_open_orders / trading_order_history / trading_trades / trading_force_orders / trading_algo_orders

配置

trading_set_leverage / trading_set_margin_type / trading_position_margin / trading_position_mode

下单自动:价格 / 数量按精度向下取整(tickSize / stepSize)分母做合法检查;-1000 超时同步等态,通过幂等后订单号查成交状态再决定是否重试。

从 2.x 迁移到 3.x

破坏性变更

  • MCP SDK@modelcontextprprocol/sdk@1@modelcontextprotcol/server@2(官方包名变更)

  • 币安接入:社区包 binance@3 → 正式版 @binance/derivatives-trading-usds-utures@38

  • Node.js>=18>=20

  • 代理变量HTTP_PROXYBINANCE_PROXY_URL

  • 工具集 76→61:去除统计辅助域(均值 / 极值 / 分位数等 10 个)和指标独立版 / 冗余的信号版变体;旧版 _direct 后缀工具改为无后缀命名(如 rsi_directindicator_rsi);风险指标更(ris_*analysis_*

  • 工具名前缀:所有工具带上域前缀(market_ / indicator_ / analysis_ / trading_),AI 客户端已有提示语和流程需按新名调整

新增能力

  • market_overview 一站式快照(一次调用聚合行情 / 标 / 资金 / 盘口)

  • MCP_TOOL_DOMAIN 域过滤,BINANCE_USE_DEMO / BINANCE_BASE_URL 环境切换

  • 二极缓存(exchangeInfor 5min + K线 3s,若期去除重复)

  • -1007 模拟匹配超时幂等恢复,请时钟偏差检测

  • 下单精度自动整规 + 最小中心价值前置校验

  • 参数校验全面对齐官方约束(clientOrderId 字符集,GTD 上界,追踪止损回撤 0.1~10 等)

AI 使用指南(Skill)

仓库内件 skills/binance-trader/SKILL.md– 为 AI 助手设计的说明书,覆盖工具选择决策、跨工具工作流程、交易安全纪律与错误恢复剧本。职场支持 Skill 的客户端(如 Claude Code / Trae)可直连挂载,让 AI 从“会用工具”升级为“用好工具”。

本地发展

git clone https://github.com/iuk-ink/binance-mcp-server
cd binance-mcp-server
npm install

命令

命令

用途

npm run dev

tsx 直接启动,开发时使用

npm run typecheck

TypeScript 类型检查

npm test

node:test 运行全部 196 个测试(不依赖网络)

npm run build

模块编译

npm start

运行编译产物

许可证

MIT

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    A 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.
    16
    9
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A 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.
    20
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides 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.

View all related MCP servers

Related MCP Connectors

  • Binance Futures market intelligence: funding, OI, order book, klines, cross-exchange comparison.

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • Crypto perps data for AI agents: funding rates, open interest, liquidations, order book, CVD.

View all MCP Connectors

Latest Blog Posts

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/iuk-ink/binance-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server