Binance MCP Server

Binance MCP Server

Provides over 156 tools to interact with the Binance.com global exchange API for spot trading, wallet management, and staking operations. It enables users to execute orders, retrieve market data, and manage crypto assets through natural language interfaces like Claude and ChatGPT.

Category
访问服务器

README

<div align="center">

🔶 Binance MCP Server

License: MIT Node.js TypeScript MCP

The most comprehensive Model Context Protocol server for Binance — 478+ tools covering the entire Binance.com API

Quick StartFeaturesConfigurationDocumentationContributing

</div>


🎯 Overview

Binance MCP Server enables AI assistants like Claude, ChatGPT, and other MCP-compatible clients to interact directly with the Binance cryptocurrency exchange. Execute trades, manage portfolios, analyze markets, and automate strategies through natural language.

Why Binance MCP?

  • Complete Coverage — 478+ tools spanning every Binance API endpoint
  • 🔐 Secure by Design — API credentials never leave your machine
  • ⚡ Production Ready — Built with official Binance SDKs and TypeScript
  • 🔌 Universal Compatibility — Works with Claude Desktop, Cursor, ChatGPT, and any MCP client
  • 📡 Dual Transport — STDIO for desktop apps, SSE for web applications

✨ Features

<table> <tr> <td width="50%">

Trading & Markets

  • Spot Trading — Orders, market data, account info
  • Margin Trading — Cross & isolated margin
  • Futures (USD-M & COIN-M) — Perpetual contracts
  • Options — European-style options
  • Portfolio Margin — Unified margin accounts
  • Algo Trading — TWAP, VP algorithms

</td> <td width="50%">

Earn & Invest

  • Simple Earn — Flexible & locked products
  • Staking — ETH & SOL staking
  • Auto-Invest — DCA & recurring buys
  • Dual Investment — Structured products
  • Crypto Loans — Flexible rate loans
  • VIP Loans — Institutional lending

</td> </tr> <tr> <td width="50%">

Wallet & Transfers

  • Wallet — Deposits, withdrawals, transfers
  • Sub-Accounts — Multi-account management
  • Convert — Instant asset conversion
  • Pay — Binance Pay integration
  • Gift Cards — Create & redeem

</td> <td width="50%">

Additional Services

  • Copy Trading — Lead trader features
  • Mining — Pool mining operations
  • NFT — NFT marketplace
  • C2C/P2P — Peer-to-peer trading
  • Fiat — Fiat on/off ramps
  • Rebate — Referral program

</td> </tr> </table>


🚀 Quick Start

Prerequisites

  • Node.js ≥ 18.0.0
  • Binance account with API credentials
  • An MCP-compatible client (Claude Desktop, Cursor, etc.)

Installation

# Clone the repository
git clone https://github.com/nirholas/Binance-MCP.git
cd Binance-MCP

# Install dependencies
npm install

# Build the project
npm run build

Interactive Setup

Run the setup wizard to configure your environment:

npm run init

This will guide you through:

  • Setting up your Binance API credentials
  • Choosing your transport method (STDIO/SSE)
  • Configuring your MCP client

⚙️ Configuration

Environment Variables

Create a .env file in the project root:

BINANCE_API_KEY=your_api_key_here
BINANCE_API_SECRET=your_api_secret_here

🔒 Security Note: Never commit your .env file. It's already in .gitignore.

Running the Server

STDIO Transport (Claude Desktop, Cursor)

npm run start

SSE Transport (ChatGPT, Web Apps)

npm run start:sse

Development Mode (Hot Reload)

npm run dev      # STDIO
npm run dev:sse  # SSE

🖥️ Client Configuration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "binance": {
      "command": "node",
      "args": ["/absolute/path/to/Binance-MCP/build/index.js"],
      "env": {
        "BINANCE_API_KEY": "your_api_key",
        "BINANCE_API_SECRET": "your_api_secret"
      }
    }
  }
}

Cursor

Add to your Cursor MCP settings:

{
  "binance": {
    "command": "node",
    "args": ["/absolute/path/to/Binance-MCP/build/index.js"],
    "env": {
      "BINANCE_API_KEY": "your_api_key",
      "BINANCE_API_SECRET": "your_api_secret"
    }
  }
}

ChatGPT (via SSE)

  1. Start the SSE server: npm run start:sse
  2. Connect to http://localhost:3000/sse

📖 Usage Examples

Check Account Balance

"What's my current Binance account balance?"

Place a Market Order

"Buy 0.01 BTC at market price"

Get Market Data

"Show me the order book for BTCUSDT with 20 levels"

Set Up Auto-Invest

"Create a daily auto-invest plan to buy $100 of ETH"

Manage Futures Position

"Open a 5x long position on ETHUSDT futures with $1000"

📊 Module Coverage

Module Tools Description
Wallet 40+ Deposits, withdrawals, transfers, asset management
Spot 35+ Market data, trading, order management
Futures (USD-M) 40+ Perpetual futures, positions, leverage
Futures (COIN-M) 35+ Coin-margined futures contracts
Margin (Cross) 26 Cross-margin trading and borrowing
Margin (Isolated) 15 Isolated margin pairs
Options 27 European-style options trading
Portfolio Margin 15 Unified margin account management
Sub-Account 22 Sub-account creation and management
Staking 22+ ETH, SOL, and other staking products
Simple Earn 15+ Flexible and locked savings products
Auto-Invest 13 DCA and recurring purchase plans
Mining 13+ Mining pool statistics and earnings
Algo Trading 11+ TWAP, VP, and algorithmic orders
VIP Loan 9+ Institutional lending services
Convert 9+ Instant asset conversion
Dual Investment 10+ Structured yield products
NFT 10+ NFT marketplace operations
Gift Card 8 Gift card creation and redemption
Copy Trading 10+ Lead trader and copy features
Crypto Loans 12+ Flexible rate crypto loans
Fiat 5+ Fiat deposit and withdrawal
Pay 5+ Binance Pay transactions
C2C/P2P 5+ Peer-to-peer trading
Rebate 5+ Referral rebate tracking

Total: 478+ tools


🏗️ Project Structure

Binance-MCP/
├── src/
│   ├── index.ts                 # Entry point
│   ├── binance.ts               # Module registration
│   ├── init.ts                  # Setup wizard
│   ├── config/
│   │   ├── binanceClient.ts     # API clients with signing
│   │   └── client.ts            # HTTP utilities
│   ├── server/
│   │   ├── base.ts              # Base MCP server
│   │   ├── stdio.ts             # STDIO transport
│   │   └── sse.ts               # SSE transport
│   ├── modules/                 # API module definitions
│   │   ├── spot/
│   │   ├── margin/
│   │   ├── futures-usdm/
│   │   ├── futures-coinm/
│   │   └── ... (24 modules)
│   ├── tools/                   # Tool implementations
│   │   ├── binance-spot/
│   │   ├── binance-margin/
│   │   ├── binance-futures-usdm/
│   │   └── ... (24 tool sets)
│   └── utils/
│       └── logger.ts
├── docs/
│   ├── QUICK_START.md           # Getting started guide
│   └── TOOLS_REFERENCE.md       # Complete tool documentation
├── build/                       # Compiled JavaScript
├── package.json
├── tsconfig.json
└── config.json                  # Runtime configuration

🛠️ Development

Build

npm run build

Type Check

npx tsc --noEmit

Test with MCP Inspector

npm run test

Adding New Tools

  1. Create tool file in src/tools/binance-{module}/
  2. Export registration function
  3. Import and register in module's index.ts
  4. Register module in src/binance.ts

📚 Documentation

Resource Description
Quick Start Guide Get running in 5 minutes
Tools Reference Complete API for all 478+ tools
Binance API Docs Official Binance documentation
MCP Specification Model Context Protocol spec

⚠️ Disclaimer

This software is provided for educational and informational purposes only.

  • Not Financial Advice — This tool does not provide financial, investment, or trading advice
  • Use at Your Own Risk — Cryptocurrency trading involves substantial risk of loss
  • API Security — Protect your API credentials; use IP restrictions and withdrawal limits
  • No Warranty — The software is provided "as is" without warranty of any kind

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


👤 Author

nich@nichxbt


推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选