
Binance MCP Server
Backend service that enables users to connect with Binance exchange for viewing portfolio data, converting tokens, and executing trades with minimal market impact through the Model Context Protocol framework.
README
Binance MCP Server
Overview
Binance MCP Server is a backend service designed to interact with the Binance API. It facilitates seamless interaction with the Binance exchange, enabling users to view their portfolio, convert tokens, and execute trades with minimal market impact. The server utilizes the Model Context Protocol (MCP) framework to ensure secure, structured, and efficient transactions.
Key Functionalities:
- Interact with Binance exchange API for account information and trading
- Display portfolio composition and valuation
- Execute smart token conversions with market impact mitigation
- Process market orders and algorithmic trading strategies
- Retrieve real-time trading data and account information
- Implement structured transactions using the Model Context Protocol framework
- Provide secure authentication and API key management for Binance integration
Features
- [x] Binance API Integration: Connect to Binance exchange for account information and trading operations
- [x] Portfolio Management: View detailed portfolio composition, market value, and percentage allocation
- [x] Portfolio Analytics: Optional historical value tracking to monitor performance over time
- [x] Smart Token Conversion: Convert between tokens with intelligent order execution strategies
- [x] Market Impact Mitigation: Automatically use algorithmic trading for larger orders to prevent price slippage
- [x] Account Management: Retrieve detailed account information, balances, and trading history
- [x] Market Data Access: Access real-time order books and market data for informed trading decisions
- [x] Order Execution: Place spot market orders with flexible quantity specifications
- [ ] Algorithmic Trading Support: Implement Time-Weighted Average Price (TWAP) orders to minimize market impact
- [ ] Automated Trading: Execute trades programmatically based on predefined strategies
- [ ] Secure Authentication: Manage API keys and secure connections to Binance services
- [ ] Comprehensive Error Handling: Detailed error reporting for transaction failures and API issues
Requirements
Before setting up the Binance MCP Server, ensure you have the following installed:
- Node.js (v16 or later)
- npm or yarn
- Binance API key and secret (for Binance exchange integration)
- A valid Binance Smart Chain (BSC) wallet private key (for blockchain transactions)
Installation
Clone the repository and install dependencies:
git clone https://github.com/your-repo/binance-mcp-server.git
cd binance-mcp-server
yarn install # or npm install
Configuration
To configure the server, create a .env
file in the root directory and specify the following variables:
# Binance API Configuration
BINANCE_API_KEY=your_binance_api_key_here
BINANCE_API_SECRET=your_binance_api_secret_here
Creating a Binance API Key
Before using the Binance API integration, you need to create an API key. This allows you to connect to Binance's servers via several programming languages, pull data from Binance, and interact with external applications. You can view your wallet and transaction data, make trades, and deposit and withdraw funds in third-party programs.
Prerequisites:
- You need to make a deposit of any amount to your Spot Wallet to activate your account
- Complete identity verification
- Enable two-factor authentication (2FA) on your account
Steps to create a Binance API Key:
-
Log in to your Binance account and click the profile icon, then [Account].
-
Go to [API Management] then click [Create API].
-
Select your preferred API Key type:
- System-generated API keys (HMAC symmetric encryption) - You'll get the API key and the Secret Key.
- Self-generated API keys (Ed25519 or RSA asymmetric encryption) - You'll receive an API key, but you have to create your own public-private key pair.
-
Enter a label/name for your API Key.
-
Verify with your 2FA devices and passkeys.
-
Your API key is now created.
For more details on Binance API, please refer to the Binance API Documentation.
Integration with Claude Desktop (for Multiple MCP Servers)
Before integrating any MCP server with Claude Desktop, ensure you have the following installed:
- Claude Desktop
Use the following command from the root of the monorepo to build all MCP servers.
yarn build
Configure Claude Desktop
Each MCP server has its own configuration. To integrate an individual MCP server:
- Navigate to the MCP server folder (e.g.,
packages/binance-spot-mcp
). - Open its
config.example.json
file. - Use the contents of this file to create an entry inside your Claude Desktop config:
Claude Desktop Config File Location
Platform | Path |
---|---|
macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
Windows | %APPDATA%\Claude\claude_desktop_config.json |
Linux | ~/.config/Claude/claude_desktop_config.json |
Example Config Entry
Here’s how one MCP server (binance-spot-mcp
) might look:
{
"mcpServers": {
"binance-spot-mcp": {
"command": "node",
"args": ["/Users/Username/Desktop/binance-mpc/packages/packages/binance-spot-mcp/build/index.js"],
"env": {
"BINANCE_API_KEY": "BINANCE_API_KEY",
"BINANCE_API_SECRET": "BINANCE_API_SECRET"
},
"disabled": false,
"autoApprove": []
}
}
}
Note: Be sure to replace the
args
path with the actual location of yourbuild/index.js
, and copyenv
values from that server’sconfig.example.json
.
Restart Claude Desktop for the new configuration to take effect.
Usage (For Connecting MCP Hosts Other Than Claude)
You have three options to start your MCP servers depending on your needs:
Option 1: Build then Start All MCP Servers
yarn build # Step 1: Build all packages
yarn start # Step 2: Start all MCP servers concurrently
Option 2: Build & Start All MCP Servers in One Step
yarn server # This builds and runs all MCP servers in one go
Option 3: Run a Specific MCP Server
Use the following command to run an individual server:
yarn server:<mcp-server-name>
🔸 Example:
yarn server:binance-spot-mcp
Functions
Binance API Functions
-
Get Binance Account Information -
binanceAccountInfo
Retrieves comprehensive information about your Binance account, including balances, trading permissions, and account status.
-
Get Binance Account Snapshot -
binanceAccountSnapshot
Gets a snapshot of your Binance account status, including current BTC price information. Includes history for the last 30 days.
-
Check Binance Order Book -
binanceOrderBook
{ "symbol": "BTCUSDT" }
Retrieves the current order book for a specified trading pair, showing available buy and sell orders up to 50 levels deep.
-
Place Spot Market Order -
binanceSpotPlaceOrder
{ "symbol": "BTCUSDT", "side": "BUY", "quantity": 0.001, // OR "quoteOrderQty": 100 }
Places a market order for immediate execution at the best available price. Use
quantity
to specify the amount of base asset orquoteOrderQty
to specify the amount in quote currency. Suitable for small orders. -
Place TWAP Order -
binanceTimeWeightedAveragePriceFutureAlgo
{ "symbol": "BTCUSDT", "side": "BUY", "quantity": 1.0, "duration": 3600 }
Places a Time-Weighted Average Price (TWAP) order that executes gradually over a specified duration to minimize market impact. Suitable for large orders that might otherwise cause significant price movements.
Model Context Protocol (MCP)
The Model Context Protocol (MCP) is an open standard designed to enhance the way applications interact with AI models and blockchain-based computational systems. MCP establishes structured context that improves the efficiency of automated transactions and decentralized applications.
Benefits of MCP:
- Standardization: Defines a unified approach for application interactions.
- Efficiency: Reduces computational overhead and improves transaction speed.
- Interoperability: Supports integration across multiple platforms and blockchain ecosystems.
Error Handling
When a transaction fails, the server returns an error message with details. Check the console logs for more debugging information. Common error scenarios include:
- Insufficient funds in the wallet
- Invalid recipient address
- Network congestion or RPC issues
- Binance API authentication errors
- Trading limit restrictions
License
This project is open-source under the MIT License.
For contributions, bug reports, or feature requests, submit an issue on GitHub.
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.
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.
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.

E2B
Using MCP to run code via e2b.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.