Skip to main content

Binance's Model Context Protocol (MCP). Designed to support developers building crypto trading AI Agents.

Project description

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:

pip install 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

Tool Purpose
get_balance Retrieve account balances for all assets
get_account_snapshot Point-in-time account state snapshot
get_fee_info Trading fee rates (maker/taker commissions)
get_available_assets List all tradable cryptocurrencies

📊 Market Data & Analysis

Tool Purpose
get_ticker_price Current price for a trading symbol
get_ticker 24-hour ticker price change statistics
get_order_book Current order book (bids/asks)

💱 Trading Operations

Tool Purpose
create_order Create buy/sell orders (market, limit, etc.)
get_orders List order history for a specific symbol

📈 Performance & Analytics

Tool Purpose
get_pnl Calculate profit and loss for futures trading
get_position_info Open futures positions details

🏪 Wallet & Transfers

Tool Purpose
get_deposit_address Get deposit address for a specific coin
get_deposit_history Deposit history for a specific coin
get_withdraw_history Withdrawal history for a specific coin

🛡️ Risk Management

Tool Purpose
get_liquidation_history Past liquidation events for futures

Configuration Variables

Variable Description Required Default
BINANCE_API_KEY Your Binance API key -
BINANCE_API_SECRET Your Binance API secret -
BINANCE_TESTNET Use testnet environment false

🛠️ 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

binance_mcp_server-1.2.7.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

binance_mcp_server-1.2.7-py3-none-any.whl (43.0 kB view details)

Uploaded Python 3

File details

Details for the file binance_mcp_server-1.2.7.tar.gz.

File metadata

  • Download URL: binance_mcp_server-1.2.7.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for binance_mcp_server-1.2.7.tar.gz
Algorithm Hash digest
SHA256 e376d06db462cf14dca3d4732f639d0af7564878799e2f70c59ab217347cd2c4
MD5 4da4a9f58cbb3d8a70bbb8d457e650e5
BLAKE2b-256 ec95527cc198cb2354689f30afdcf6aaec0f0ed3ca94a24517c7a1147c828d02

See more details on using hashes here.

File details

Details for the file binance_mcp_server-1.2.7-py3-none-any.whl.

File metadata

  • Download URL: binance_mcp_server-1.2.7-py3-none-any.whl
  • Upload date:
  • Size: 43.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for binance_mcp_server-1.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9af4cfc9402d2a093d9ab6176d5b66b2f8d0b5e21727fd6464ca9af4f1efd437
MD5 a8706cc5ed75af93384d1819b431394c
BLAKE2b-256 4ac3310525b3a6040c75b121cbf18bd52132ac9dbb1932d23a9498adb66e6b4a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page