Sandbox
@AnalyticAce/binance-mcp-server

Binance MCP server for agent trading tools

This package exposes Binance account, market data, and trading actions through Model Context Protocol. Builders can connect an agent to balances, order books, order placement, futures info, and wallet lookups without calling Binance directly from prompts.

47 stars20 forksPythonUpdated 2mo ago
Who it's for

Builders who want their agent to use Binance market and account data.

What it delivers

You can ask your agent to check prices, inspect balances, and place orders through one MCP server.

What it does

Account and portfolio tools

Includes tools like `get_balance`, `get_account_snapshot`, `get_fee_info`, and `get_available_assets`.

Market data tools

Includes `get_ticker_price`, `get_ticker`, and `get_order_book` for live Binance market data.

Trading tools

Includes `create_order` and `get_orders` for buy, sell, and order history actions.

Futures and risk tools

Includes `get_pnl`, `get_position_info`, and `get_liquidation_history` for futures tracking.

Wallet and transfer tools

Includes `get_deposit_address`, `get_deposit_history`, and `get_withdraw_history`.

CLI and MCP setup

Ships a `binance-mcp-server` command and MCP config example for Claude Desktop, VS Code, and Cursor.

How to get it

  1. 1The easiest way to install is using pip or uv
    # using pip
    pip install binance-mcp-server
    # using uv
    uv add binance-mcp-server
  2. 2Set the keys as environment variables in your terminal
    # Required: Your Binance API credentials
    export BINANCE_API_KEY="your_api_key_here"
    export BINANCE_API_SECRET="your_api_secret_here"
    
    # Recommended: Use testnet for development and safe testing
    export BINANCE_TESTNET="true"

README

Binance MCP Server 🚀

PyPI version Cursor Store Documentation Status PyPI Deployement Status Python 3.10+ License: MIT

A powerful Model Context Protocol (MCP) server that enables AI agents to interact seamlessly with the Binance cryptocurrency exchange. This server provides a comprehensive suite of trading tools, market data access, and account management capabilities through the standardized MCP interface.

🌟 What is this?

This tool acts as a bridge between AI Assistants (like Claude, Cursor AI, or ChatGPT) and your Binance Account.

Instead of manually navigating the Binance website or app, you can ask your AI to:

  • "Check the current price of Bitcoin"
  • "Show me my account balance"
  • "Buy 0.1 ETH at the current market price"

The AI sends the request to this server, which securely executes it on Binance and returns the result to your AI.

🚀 Quick Start

1️⃣ Installation

The easiest way to install is using pip or uv:

# using pip
pip install binance-mcp-server
# using uv
uv add binance-mcp-server

2️⃣ Configuration

You need your Binance API Keys to allow this tool to access your account.

  1. Log in to your Binance account and go to API Management.
  2. Create a new API Key.
  3. Set the keys as environment variables in your terminal:
# Required: Your Binance API credentials
export BINANCE_API_KEY="your_api_key_here"
export BINANCE_API_SECRET="your_api_secret_here"

# Recommended: Use testnet for development and safe testing
export BINANCE_TESTNET="true"

3️⃣ Running with your AI

Configure for Claude Desktop / VSCode / Cursor

Add the following to your MCP settings configuration file (e.g., claude_desktop_config.json or mcp_config.json):

{
  "mcpServers": {
    "binance": {
      "command": "binance-mcp-server",
      "args": [
        "--api-key", "your_api_key",
        "--api-secret", "your_secret",
        "--binance-testnet"
      ]
    }
  }
}

🎯 Key Capabilities

  • Real-time Market Data: Get live prices, order books, and ticker stats.
  • Account Management: specific Check balances and account status.
  • Trading Operations: Place buy/sell orders (Market, Limit, etc.).
  • Portfolio Tracking: Monitor open positions and Profit/Loss (PnL).

📚 Technical Reference

Available Tools

Click to expand full list of tools

🏦 Account & Portfolio Management

ToolPurpose
get_balanceRetrieve account balances for all assets
get_account_snapshotPoint-in-time account state snapshot
get_fee_infoTrading fee rates (maker/taker commissions)
get_available_assetsList all tradable cryptocurrencies

📊 Market Data & Analysis

ToolPurpose
get_ticker_priceCurrent price for a trading symbol
get_ticker24-hour ticker price change statistics
get_order_bookCurrent order book (bids/asks)

💱 Trading Operations

ToolPurpose
create_orderCreate buy/sell orders (market, limit, etc.)
get_ordersList order history for a specific symbol

📈 Performance & Analytics

ToolPurpose
get_pnlCalculate profit and loss for futures trading
get_position_infoOpen futures positions details

🏪 Wallet & Transfers

ToolPurpose
get_deposit_addressGet deposit address for a specific coin
get_deposit_historyDeposit history for a specific coin
get_withdraw_historyWithdrawal history for a specific coin

🛡️ Risk Management

ToolPurpose
get_liquidation_historyPast liquidation events for futures

Configuration Variables

VariableDescriptionRequiredDefault
BINANCE_API_KEYYour Binance API key-
BINANCE_API_SECRETYour Binance API secret-
BINANCE_TESTNETUse testnet environmentfalse

🛠️ Development & Contributing

We welcome contributions! If you are a developer looking to improve this project:

  1. Clone the repo: git clone https://github.com/AnalyticAce/binance-mcp-server.git
  2. Install dev dependencies: uv install --dev or pip install -e .[dev]
  3. Run tests: pytest

See CONTRIBUTING.md for detailed guidelines.

📄 License & Disclaimer

License: MIT

Disclaimer: This software is for educational purposes. Cryptocurrency trading involves financial risk. Always use the Binance Testnet for testing and development. The developers are not responsible for any financial losses.

Files in the repo

Repository payload16 top-level entries
  • .github
  • .vscode
  • binance_mcp_server
  • docs
  • public
  • scripts
  • tests
  • .gitignore
  • .pre-commit-config.yaml
  • .python-version
  • CONTRIBUTING.md
  • LICENSE
  • mkdocs.yml
  • pyproject.toml
  • README.md
  • uv.lock

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k
t8y2/dbxConnectors

20 MB lightweight cross-platform database client for 90+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 90+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP Server。

19k