Skip to main content
Glama
Binance MCP Server

Binance MCP Server

by ethancod1ng

Binance MCP Server

Multi-language Documentation

A Model Context Protocol (MCP) server that provides Claude Code with Binance exchange API functionality.

Quick Start

📹 Video Tutorial

Watch our comprehensive MCP usage tutorial to get started quickly: MCP Usage Tutorial

Installation

npm install -g binance-mcp-server

Configuration

This MCP server can be used with various AI tools that support MCP:

Claude Cursor Trae

MCP Configuration

Add the following configuration to your MCP settings file:

{
  "mcpServers": {
    "binance": {
      "command": "npx",
      "args": ["binance-mcp-server"],
      "env": {
        "BINANCE_API_KEY": "your_api_key",
        "BINANCE_API_SECRET": "your_api_secret",
        "BINANCE_TESTNET": "false"
      }
    }
  }
}

Note: Set BINANCE_TESTNET to "true" if you want to use the Binance testnet for development and testing.

One-Click Setup with Claude Code

claude mcp add binance --env BINANCE_API_KEY=YOUR_API_KEY --env BINANCE_API_SECRET=YOUR_API_SECRET --env BINANCE_TESTNET=false -- npx -y binance-mcp-server

Environment Setup

Getting API Keys

For Testnet (Recommended for Development):

  1. Visit Binance Testnet

  2. Create a testnet account (no real verification required)

  3. Go to API Management in your testnet account

  4. Create a new API key with trading permissions

  5. Note: Testnet uses virtual funds - completely safe for testing

For Mainnet (Production):

  1. Create a verified account on Binance

  2. Complete KYC verification

  3. Go to API Management in your account settings

  4. Create a new API key with required permissions

  5. ⚠️ Warning: Mainnet uses real money - be very careful!

Configuration

Create .env file:

BINANCE_API_KEY=your_api_key_here
BINANCE_API_SECRET=your_api_secret_here
BINANCE_TESTNET=true  # Set to false for mainnet (REAL money)

Related MCP server: Binance MCP Server

Available Tools

Market Data

  • get_price - Get current price for trading pair

  • get_orderbook - Get order book depth data

  • get_klines - Get K-line/candlestick data

  • get_24hr_ticker - Get 24-hour price statistics

Account

  • get_account_info - Get account information and balances

  • get_open_orders - Get current open orders

  • get_order_history - Get historical orders

Trading (Mainnet & Testnet)

  • place_order - Place a new order (supports both mainnet and testnet)

  • cancel_order - Cancel specific order (supports both mainnet and testnet)

  • cancel_all_orders - Cancel all open orders (supports both mainnet and testnet)

Usage Examples

Ask Claude to:

  • "Get the current price of Bitcoin"

  • "Show me the order book for ETHUSDT"

  • "Check my account balance"

  • "Place a limit buy order for 0.001 BTC at $50,000"

Security

⚠️ Important:

  • Set BINANCE_TESTNET=true for safe testing with virtual funds

  • Set BINANCE_TESTNET=false or omit for mainnet trading with REAL money

  • Mainnet trading will display warnings before executing orders

Development

npm run build    # Compile TypeScript
npm run dev      # Development mode
npm run lint     # Run linting

Available Tools

10 tools
cancel_all_ordersB

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

Inputs: symbol (required).

cancel_orderC

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

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

get_24hr_tickerC

获取24小时价格变动统计

Inputs: symbol.

get_account_infoB

获取账户信息和余额

Inputs: no named parameters.

get_klinesC

获取K线历史数据

Inputs: interval (required), symbol (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: quantity (required), side (required), symbol (required), type (required), +1 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a distinct purpose with clear boundaries: cancel_all_orders vs. cancel_order (batch vs. single), get_24hr_ticker vs. get_price (statistics vs. spot), get_open_orders vs. get_order_history (current vs. past), and others like get_account_info, get_klines, get_orderbook, and place_order all target unique operations. No ambiguity exists between tools.

    Naming Consistency5/5

    All tools follow a consistent verb_noun naming pattern (e.g., cancel_all_orders, get_account_info, place_order). The pattern is uniform across all 10 tools, using snake_case throughout with clear action-object pairs, making them predictable and easy to parse.

    Tool Count5/5

    With 10 tools, this server is well-scoped for cryptocurrency trading on Binance. It covers essential operations like account management, market data, order placement, and order management without being overwhelming or sparse, fitting typical MCP server ranges.

    Completeness5/5

    The toolset provides complete coverage for a trading bot or analysis agent: account info and balance retrieval, market data (price, ticker, klines, orderbook), and full order lifecycle (place, cancel, view open/history orders). No gaps exist for core trading workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    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
      175 npm
      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
      26 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