Skip to main content
Glama
Binance MCP Server

Binance MCP Server

by ethancod1ng

Binance MCP Server

English | 中文 | 日本語

A Binance Spot MCP server for compatible AI clients, using stdio and ten tools. Node.js 24+ is required. Futures, withdrawals and streaming subscriptions are not exposed.

2.0.0 is published on npm. Install it with npm install -g binance-mcp-server, or use the source setup below. See migration notes.

📹 Video Tutorial

Watch our comprehensive MCP usage tutorial to get started quickly:

MCP Usage Tutorial

Related MCP server: Binance MCP Server

Setup from source

git clone https://github.com/ethancod1ng/binance-mcp-server.git
cd binance-mcp-server
npm ci
npm run build
cp .env.example .env

Copy .env.example to .env and use keys for the selected network. Even market-data queries currently require both credentials at startup. The .env file is read from the process working directory; MCP client env settings are recommended.

MCP client configuration

Replace the absolute path with your built checkout. The client launches and owns this stdio process; it is not an HTTP service.

{
  "mcpServers": {
    "binance": {
      "command": "node",
      "args": [
        "/absolute/path/to/binance-mcp-server/dist/index.js"
      ],
      "env": {
        "BINANCE_API_KEY": "your_testnet_api_key",
        "BINANCE_API_SECRET": "your_testnet_api_secret",
        "BINANCE_TESTNET": "true"
      }
    }
  }
}

After 2.0.0 is published, a client may use command: "npx" with args: ["-y", "binance-mcp-server@2.0.0"] and the same environment settings. Runtime version comes from package.json; MCP_SERVER_VERSION is ignored.

Network selection

BINANCE_TESTNET selects the network: "true" uses testnet; any other value — including omitting it — uses mainnet. Use keys issued for the selected network. All tools, including placing and cancelling orders, work on both networks; no separate trading switch is required. Before an order mutation on mainnet, the server logs a warning that real funds are involved; the warning does not block the operation. Use only the API permissions needed; withdrawal permission is unnecessary.

Tools

Tool

Inputs and behavior

get_price

Required symbol.

get_orderbook

Required symbol; limit defaults to 100, allowed: 5, 10, 20, 50, 100, 500, 1000, 5000.

get_klines

Required symbol, interval; limit 1–1000, default 500. No start/end time parameters.

get_24hr_ticker

Optional symbol; omitted means all symbols.

get_account_info

No inputs; returns nonzero balances with decimal totals.

get_open_orders

Optional symbol; omitted means all open orders.

get_order_history

Required symbol; limit 1–1000, default 500. No time or order-ID pagination.

place_order

Required symbol, side BUY/SELL, type MARKET/LIMIT, quantity as a base-asset decimal string. LIMIT requires price and uses GTC.

cancel_order

Required symbol and positive safe-integer orderId.

cancel_all_orders

Required symbol; cancels all open orders for that symbol only.

Symbols are uppercase and may contain digits, e.g. 1INCHUSDT. Prices and quantities must be positive plain decimal strings. Binance still enforces symbol availability, tick size, lot size and notional filters. K-line intervals: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M.

Results contain JSON as MCP text content. Tool execution errors return isError: true. Query timestamps added by this server are local milliseconds; source fields retain Binance semantics.

Examples

{"name":"get_price","arguments":{"symbol":"BTCUSDT"}}
{"name":"get_klines","arguments":{"symbol":"ETHUSDT","interval":"1h","limit":24}}
{"name":"place_order","arguments":{"symbol":"BTCUSDT","side":"BUY","type":"LIMIT","quantity":"0.001","price":"50000"}}

Development and packaging

npm run check
npm audit --omit=dev
npm pack --dry-run
docker build -t binance-mcp-server .
docker run --rm -i --env-file .env binance-mcp-server

If startup fails, check Node version and credentials. For signature/timestamp errors, verify the network/key pair and system clock. Never paste credentials into issue reports.

Tutorial · Changelog · MIT License

Available Tools

10 tools
cancel_all_ordersB

取消指定交易对所有挂单 - 支持主网和测试网

Inputs: symbol (required).

cancel_orderC

取消指定订单 - 支持主网和测试网

Inputs: symbol (required), orderId (required).

get_24hr_tickerC

获取24小时价格变动统计

Inputs: symbol.

get_account_infoB

获取账户信息和余额

Inputs: no named parameters.

get_klinesC

获取K线历史数据

Inputs: symbol (required), interval (required), limit.

get_open_ordersC

获取当前挂单

Inputs: symbol.

get_orderbookC

获取订单簿深度数据

Inputs: symbol (required), limit.

get_order_historyC

获取历史订单记录

Inputs: symbol (required), limit.

get_priceC

获取指定交易对的当前价格

Inputs: symbol (required).

place_orderB

下单交易 - 支持主网和测试网(主网将使用真实资金)

Inputs: side (required), type (required), symbol (required), quantity (required), +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action: market data (orderbook, klines, ticker, price), account data (info, open orders, order history), and order lifecycle (place, cancel, cancel all). get_open_orders vs get_order_history and get_price vs get_24hr_ticker are clearly differentiated by their descriptions.

    Naming Consistency5/5

    All ten tools follow a strict snake_case verb_noun pattern using a small set of predictable verbs (get_, place_, cancel_). Even the numeric segment in get_24hr_ticker fits the same convention.

    Tool Count5/5

    Ten tools is well-scoped for a focused Binance trading server, covering market data, account state, and order management without redundancy. Every tool earns its place with no filler endpoints.

    Completeness4/5

    Core read and order-management workflows are covered, including the important cancel_order / cancel_all_orders pair and testnet support on mutating calls. Minor gaps exist: no single-order status lookup (get_order), no trade/fill history, and no order modification endpoint.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      A server implementation that streams real-time Binance market data (spot and futures) via WebSockets, enabling applications to receive and process cryptocurrency market information through the Model Context Protocol.
      6
      20
      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.
      21
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that enables AI coding tools like Claude Code and Cursor to interact with Bybit's trading platform for market data retrieval, account management, and trading operations.
      11
      25 npm
      13
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that provides cryptocurrency data tools and resources via an HTTP endpoint. It enables users to fetch real-time market data from Binance, track activity logs, and generate cryptocurrency executive summaries.
      ISC