josh-jaiy/binance-mcp-server
If you are the rightful owner of binance-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Binance MCP Server is a Model Context Protocol server that integrates Binance exchange API functionality with Claude Code, providing a seamless interface for trading and market data retrieval.
Binance MCP Server
Multi-language Documentation
- (current)
A Model Context Protocol (MCP) server that doth provide Claude Code with Binance exchange API functionality, most wondrous and true.
Quick Start
📹 Video Tutorial
Behold our comprehensive MCP usage tutorial, that thou mayest commence thy journey with great haste:

Installation
npm install -g binance-mcp-server
Configuration
This MCP server may be employed with various AI tools that doth support the MCP protocol:
Option 1: Claude Code (CLI)
One-Click Setup:
claude mcp add binance --env BINANCE_API_KEY=YOUR_API_KEY --env BINANCE_API_SECRET=YOUR_API_SECRET --env BINANCE_TESTNET=false -- npx -y binance-mcp-server
Manual Setup:
Add unto thy Claude Code MCP settings (.claude/settings.json or the like):
{
"mcpServers": {
"binance": {
"command": "npx",
"args": ["-y", "binance-mcp-server"],
"env": {
"BINANCE_API_KEY": "your_api_key",
"BINANCE_API_SECRET": "your_api_secret",
"BINANCE_TESTNET": "false"
}
}
}
}
Option 2: Claude Desktop (GUI)
Location of thy config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
NPM Global Install Method:
{
"mcpServers": {
"binance-mcp-server": {
"command": "npx",
"args": ["-y", "binance-mcp-server"],
"env": {
"BINANCE_API_KEY": "your_api_key_here",
"BINANCE_API_SECRET": "your_api_secret_here",
"BINANCE_TESTNET": "false"
}
}
}
}
Local Development Method:
{
"mcpServers": {
"binance-mcp-server": {
"command": "node",
"args": [
"/absolute/path/to/binance-mcp-server/dist/index.js"
],
"env": {
"BINANCE_API_KEY": "your_api_key_here",
"BINANCE_API_SECRET": "your_api_secret_here",
"BINANCE_TESTNET": "false",
"MCP_SERVER_NAME": "binance-mcp-server",
"MCP_SERVER_VERSION": "1.1.1",
"LOG_LEVEL": "info"
}
}
}
}
After adding the configuration, proceed thusly:
- Save thy config file
- Restart Claude Desktop in its entirety (Quit and reopen)
- The MCP server shall load automatically, as if by magic
Note: Set
BINANCE_TESTNETto"true"shouldst thou desire to employ the Binance testnet for development and testing most prudent.
Environment Setup
Obtaining thy API Keys
For Testnet (Most Recommended for Development):
- Venture forth to Binance Testnet
- Create a testnet account (no true verification be required)
- Journey to API Management in thy testnet account
- Forge a new API key with trading permissions most fitting
- Note: Testnet doth employ virtual funds - completely safe for thy testing endeavors
For Mainnet (Production, Most Perilous):
- Create a verified account upon Binance
- Complete KYC verification, as the law doth require
- Journey to API Management in thy account settings
- Forge a new API key with required permissions
- ⚠️ Warning Most Dire: Mainnet doth employ REAL coin - exercise utmost care!
Configuration
Create thy .env file thusly:
BINANCE_API_KEY=your_api_key_here
BINANCE_API_SECRET=your_api_secret_here
BINANCE_TESTNET=true # Set to false for mainnet (REAL coin, most perilous!)
Available Tools Most Wondrous
Market Data (4 tools)
get_price- Obtaineth the current price for a trading pairget_orderbook- Obtaineth the order book depth dataget_klines- Obtaineth K-line/candlestick data most illuminatingget_24hr_ticker- Obtaineth 24-hour price statistics
Spot Account (3 tools)
get_account_info- Obtaineth spot account information and balancesget_open_orders- Obtaineth current open spot ordersget_order_history- Obtaineth historical spot orders
Spot Trading (3 tools - Mainnet & Testnet)
place_order- Placeth a new spot order (supporteth both mainnet and testnet)cancel_order- Canceleth specific spot order (supporteth both mainnet and testnet)cancel_all_orders- Canceleth all open spot orders (supporteth both mainnet and testnet)
Futures Account (9 tools)
get_futures_account_info- Obtaineth futures account balance, margin, and PnLget_futures_positions- Obtaineth open futures positions with entry price, PnL, leverageget_futures_open_orders- Obtaineth pending futures ordersget_futures_order_history- Obtaineth historical futures ordersplace_futures_order- Placeth futures market/limit order (TESTNET ONLY, for thy safety)cancel_futures_order- Canceleth specific futures order (TESTNET ONLY)cancel_all_futures_orders- Canceleth all futures orders for a symbol (TESTNET ONLY)set_futures_leverage- Adjusteth leverage 1-125x (TESTNET ONLY, most powerful!)set_futures_margin_type- Setteth ISOLATED or CROSSED margin (TESTNET ONLY)
Total: 19 tools available for thy trading pleasure
Usage Examples Most Instructive
Market Data Queries
- "Pray tell, what be the current price of Bitcoin?"
- "Show me the order book for ETHUSDT with 20 levels, I beseech thee"
- "Obtaineth 1-hour candlestick data for BTCUSDT"
- "What be the 24-hour trading volume for ETHUSDT?"
Spot Account Queries
- "Pray check my spot account balance"
- "Show me mine open spot orders"
- "What be my order history for BTCUSDT?"
Futures Account Queries
- "Show me mine futures account balance"
- "What be mine open futures positions?"
- "Check mine OPENUSDT position details, most urgently"
- "What be my total unrealized PnL?"
- "Show me pending futures orders, if any there be"
Trading (Employ with utmost caution!)
- "Place a limit buy order for 0.001 BTC at $50,000" (Spot - Mainnet/Testnet)
- "Cancel order ID 12345 for BTCUSDT, forthwith" (Spot - Mainnet/Testnet)
- "Place a futures market order to buy 100 BTCUSDT" (Futures - Testnet only, most safe)
- "Set leverage to 10x for ETHUSDT futures" (Futures - Testnet only, handle with care!)
Security Most Critical
⚠️ Of Utmost Importance:
- Set
BINANCE_TESTNET=truefor safe testing with virtual funds, as a wise merchant would - Set
BINANCE_TESTNET=falseor omit for mainnet trading with REAL coin (most perilous!) - Mainnet trading shall display warnings most dire before executing orders, for thy protection
Development
npm run build # Compileth TypeScript unto JavaScript
npm run dev # Development mode, for thy testing
npm run lint # Runneth linting, to ensure code quality most fine