Skip to main content
Glama
iuk-ink

Binance MCP Server

Binance MCP Server

Version Node.js License

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-server

No 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

BINANCE_TESTNET

No

true

Testnet (virtual funds) / Mainnet

BINANCE_USE_DEMO

No

false

Demo trading environment (shares credentials with mainnet)

BINANCE_BASE_URL

No

Custom REST endpoint (highest priority)

BINANCE_API_KEY

No

Trading tools are not registered if not set

BINANCE_API_SECRET

No

Same as above

BINANCE_PROXY_URL

No

HTTP/HTTPS proxy address

BINANCE_TIMEOUT

No

10000

Request timeout (ms)

BINANCE_RETRIES

No

3

Network retry count

BINANCE_BACKOFF

No

1000

Retry backoff base (ms)

BINANCE_RECV_WINDOW

No

5000

Signature time window (ms)

MCP_TOOL_DOMAINS

No

All

Tool domain filter, comma-separated: market,trading,indicator,analysis

MCP_SERVER_NAME

No

binance-mcp-server

MCP server name

LOG_LEVEL

No

info

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

market_price

Latest trade price

market_book_ticker

Best bid/ask price + quantity (much lighter than orderbook)

market_orderbook

Multi-level order book depth (5/10/20/50/100/500/1000)

market_klines

Historical K-line data

market_24hr_ticker

24h change / high / low / volume

market_mark_price

Mark price (= liquidation reference price, includes funding rate)

market_open_interest

Open interest (OI)

market_funding_rate

Current funding rate and bounds

market_funding_rate_history

Historical funding rates

market_continuous_klines

Perpetual / quarterly / next quarter continuous contract K-lines (basis analysis)

market_exchange_info

Trading rules / precision / minimum order size

market_overview

One-stop snapshot: market data + indicators + funding rate + order book, in a single call

market_ping / market_time

Connectivity test / server clock calibration

market_open_interest_hist

OI historical statistics (mainnet only)

market_long_short_ratio

All-account long/short ratio (mainnet only)

market_taker_volume

Aggressive buy/sell volume ratio (mainnet only)

market_top_trader_ratio

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

indicator_sma / indicator_ema / indicator_macd / indicator_adx / indicator_super_trend / indicator_vwap

Momentum

indicator_rsi / indicator_stoch / indicator_cci / indicator_mfi / indicator_obv

Volatility

indicator_atr / indicator_bbands / indicator_volatility_regime

Composite signals

indicator_ma_cross (MA cross) / indicator_macd_rsi / indicator_bb_rsi / indicator_divergence (RSI divergence)

Batch

indicator_multi (one call = RSI + MACD + BBands + optional ATR / ADX / Stoch)

Risk Analysis (3)

Tool

Description

analysis_sharpe

Sharpe + Sortino + annualized return / volatility (annualization factor automatically inferred from the K-line timeframe)

analysis_drawdown

Maximum drawdown (including peak/trough prices and positions)

analysis_var

VaR / CVaR (confidence level 0.5~0.99 adjustable)

Futures Trading (21, API Key Required)

Category

Tools

Account

trading_balance / trading_account / trading_positions / trading_income / trading_commission

Order

trading_place_order (includes dryRun simulation) / trading_place_algo (stop loss / take profit / trailing stop) / trading_modify_order / trading_cancel_order / trading_cancel_algo / trading_cancel_all

Query

trading_get_order / trading_open_orders / trading_order_history / trading_trades / trading_force_orders / trading_algo_orders

Configuration

trading_set_leverage / trading_set_margin_type / trading_position_margin / trading_position_mode

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@38

  • Node.js: >=18>=20

  • Proxy environment variable: HTTP_PROXYBINANCE_PROXY_URL

  • Toolset 76 → 61: removed the statistics helper domain (10 tools for mean / extremes / quartiles, etc.) and redundant standalone / signal variants of indicators; the legacy _direct tools are now direct-connect tools without the suffix (for example, rsi_directindicator_rsi); risk tools renamed (analysis_* from risk_*)

  • 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_overview one-stop snapshot (aggregates market data / indicator / funding rate / order book in a single call)

  • MCP_TOOL_DOMAINS tool domain filtering, BINANCE_USE_DEMO / BINANCE_BASE_URL environment configuration

  • Two-level cache (exchangeInfo 5min + klines 3s, in-flight deduplication)

  • -1007 match timeout idempotent recovery, clock skew detection at startup

  • Automatic order precision rounding + upfront-order minimum notional validation

  • Parameter validation fully aligned with official constraints (clientOrderId character 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 install

Commands

Command

Description

npm run dev

Direct startup with tsx for development

npm run typecheck

TypeScript type checking

npm test

Run all 196 tests with node:test (no network dependencies)

npm run build

Compile to dist/

npm start

Run the compiled output

License

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