Multi-language Documentation
A Model Context Protocol (MCP) server that provides Claude Code with Binance exchange API functionality.
npm install -g binance-mcp-server
This MCP server can be used with various AI tools that support MCP:
Add the following configuration to your MCP settings file:
Claude Desktop: claude_desktop_config.json
Cursor: .cursor/mcp_config.json
{
"mcpServers": {
"binance": {
"command": "npx",
"args": ["binance-mcp-server"],
"env": {
"BINANCE_API_KEY": "your_api_key",
"BINANCE_API_SECRET": "your_api_secret",
"BINANCE_TESTNET": "true"
}
}
}
}
For Testnet (Recommended for Development):
- Visit Binance Testnet
- Create a testnet account (no real verification required)
- Go to API Management in your testnet account
- Create a new API key with trading permissions
- Note: Testnet uses virtual funds - completely safe for testing
For Mainnet (Production):
- Create a verified account on Binance
- Complete KYC verification
- Go to API Management in your account settings
- Create a new API key with required permissions
⚠️ Warning: Mainnet uses real money - be very careful!
Create .env
file:
BINANCE_API_KEY=your_api_key_here
BINANCE_API_SECRET=your_api_secret_here
BINANCE_TESTNET=true # Set to false for mainnet (REAL money)
get_price
- Get current price for trading pairget_orderbook
- Get order book depth dataget_klines
- Get K-line/candlestick dataget_24hr_ticker
- Get 24-hour price statistics
get_account_info
- Get account information and balancesget_open_orders
- Get current open ordersget_order_history
- Get historical orders
place_order
- Place a new order (supports both mainnet and testnet)cancel_order
- Cancel specific order (supports both mainnet and testnet)cancel_all_orders
- Cancel all open orders (supports both mainnet and testnet)
Ask Claude to:
- "Get the current price of Bitcoin"
- "Show me the order book for ETHUSDT"
- "Check my account balance"
- "Place a limit buy order for 0.001 BTC at $50,000"
- Set
BINANCE_TESTNET=true
for safe testing with virtual funds - Set
BINANCE_TESTNET=false
or omit for mainnet trading with REAL money - Mainnet trading will display warnings before executing orders
npm run build # Compile TypeScript
npm run dev # Development mode
npm run lint # Run linting
MIT License