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.
README
<div align="center">
š¶ Binance MCP Server
The most comprehensive Model Context Protocol server for Binance ā 478+ tools covering the entire Binance.com API
Quick Start ⢠Features ⢠Configuration ⢠Documentation ⢠Contributing
</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
.envfile. 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)
- Start the SSE server:
npm run start:sse - 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
- Create tool file in
src/tools/binance-{module}/ - Export registration function
- Import and register in module's
index.ts - 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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š¤ Author
nich ā @nichxbt
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.