Binance MCP Server
Provides cryptocurrency trading capabilities including real-time price data, account balance queries, market order placement, trade history retrieval, order management, funding rate information, and automated arbitrage strategies through the Binance exchange.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Binance MCP Server what's the current price of Bitcoin in USDT?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Binance MCP Server
这是一个基于MCP (Model Control Protocol) 的币安交易接口服务器起点代码。它提供了一系列基础的币安交易所交互能力,可以作为你开发更复杂交易策略和功能的基础。
功能特性
当前实现的基础功能包括:
实时获取加密货币价格
查询账户资产余额
下单交易(市价单)
查询交易历史
查询当前未完成订单
取消订单
获取资金费率历史
执行对冲套利策略
自动寻找套利机会
这些功能为你开发更高级的交易策略和自动化系统提供了基础构建块。你可以基于这些接口:
开发更复杂的交易策略
添加风险管理系统
实现更多类型的订单支持
扩展数据分析能力
添加自定义的套利策略
Related MCP server: binance-futures-mcp
安装要求
Python >= 3.13
mcp[cli] >= 1.6.0
requests >= 2.32.3
安装和配置
克隆仓库:
git clone https://github.com/mixuechu/binance-mcp.git
cd binance-mcp-server创建并激活虚拟环境
安装依赖: uv sync
配置MCP: 在你的MCP配置文件中(通常位于
~/.cursor/mcp.json)添加以下配置:
{
"binance-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/binance-mcp-server",
"run",
"binance.py",
"--binance-api-key",
"YOUR_API_KEY",
"--binance-secret-key",
"YOUR_SECRET_KEY"
]
}
}使用方法
确保你已经在币安创建了API密钥,并在MCP配置文件中正确配置。
通过MCP客户端调用服务提供的功能:
get_symbol_price: 获取某个交易对的当前价格get_account_balance: 查询特定加密货币的账户余额place_market_order: 下市价单get_trade_history: 获取交易历史get_open_orders: 查询未完成订单cancel_order: 取消订单get_funding_rate_history: 获取资金费率历史execute_hedge_arbitrage_strategy: 执行对冲套利策略find_arbitrage_pairs: 寻找套利机会
开发和扩展
这个项目提供了基础的交易功能框架,你可以:
添加新的交易策略
扩展现有功能
添加更多的错误处理和日志
实现更复杂的套利逻辑
集成其他交易所的API
安全提示
请妥善保管你的API密钥和密钥
建议在使用时设置适当的API权限限制
在进行实际交易前,建议先在测试网络上进行测试
贡献
欢迎提交问题和合并请求。这个项目处于积极开发中,我们欢迎任何形式的贡献。
许可证
MIT
Available Tools
9 toolscancel_orderC
Cancel a specific order.
Args: symbol: The trading pair. order_id: Order ID to cancel.
Returns: Cancellation result.
Inputs: symbol (required), order_id (required).
execute_hedge_arbitrage_strategyC
Execute hedge arbitrage based on funding rate.
Args: symbol: The trading pair. quantity: Amount to trade.
Returns: Summary of the arbitrage result.
Inputs: symbol (required), quantity (required).
find_arbitrage_pairsB
Find arbitrage pairs based on funding rate, volume, and rate direction stability.
Args: min_funding_rate: Minimum funding rate to qualify. min_avg_volume: Minimum 24hr volume in USDT. history_days: How many days of history to analyze. stability_threshold: Minimum proportion of funding rates in same direction.
Returns: List of qualifying arbitrage opportunities.
Inputs: min_funding_rate, min_avg_volume, history_days, stability_threshold.
get_account_balanceC
Get the balance of a specific cryptocurrency asset.
Args: asset: The cryptocurrency symbol, e.g., BTC.
Returns: Asset balance info.
Inputs: asset (required).
get_funding_rate_historyC
Get funding rate history.
Args: symbol: Perpetual contract symbol. limit: Number of records to return (default 100).
Returns: Funding rate data list.
Inputs: symbol (required), limit.
get_open_ordersC
Get open orders for a symbol.
Args: symbol: The trading pair.
Returns: List of open orders.
Inputs: symbol (required).
get_symbol_priceB
Get the current price of a cryptocurrency pair.
Args: symbol: The cryptocurrency pair, e.g., BTCUSDT.
Returns: Price information from Binance.
Inputs: symbol (required).
get_trade_historyC
Get recent trade history for a pair.
Args: symbol: The trading pair. limit: Number of trades to fetch.
Returns: List of trade summaries.
Inputs: symbol (required), limit.
place_market_orderC
Place a market order to buy or sell.
Args: symbol: The trading pair, e.g., BTCUSDT. side: BUY or SELL. quantity: Amount to trade.
Returns: Order placement result.
Inputs: symbol (required), side (required), quantity (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools have distinct purposes, but 'execute_hedge_arbitrage_strategy' and 'find_arbitrage_pairs' could be confused as both relate to arbitrage, though one executes and the other finds opportunities. Other tools like 'get_account_balance', 'get_open_orders', and 'place_market_order' are clearly differentiated.
All tools follow a consistent verb_noun pattern with snake_case, such as 'cancel_order', 'get_account_balance', and 'place_market_order'. This uniformity makes the tool set predictable and easy to navigate.
With 9 tools, the server is well-scoped for cryptocurrency trading on Binance, covering key operations like account management, order handling, price data, and arbitrage strategies without being overwhelming or too sparse.
The tool set covers essential trading functions, including account balance, orders, prices, and trade history, with added arbitrage features. Minor gaps exist, such as no tool for limit orders or advanced order types, but core workflows are well-supported.
Maintenance
Related MCP Connectors
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
Unlock the power of real-time cryptocurrency data with our Crypto Price Insights MCP server.
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
Related MCP Servers
- AlicenseCqualityDmaintenanceProvides an MCP server that allows large language models to access real-time and historical Bitcoin market data from Binance, including current prices, order book data, recent trades, and price history through a standardized interface.13MIT
- AlicenseNot gradedqualityCmaintenanceComprehensive Binance Futures trading MCP server with 41 professional trading tools across account management, order execution, market data, and risk management. Features smart ticker caching, secure authentication, and Docker support for seamless integration with MCP clients.88 PyPI4PythonMIT
- AlicenseNot gradedqualityDmaintenanceAn HTTP-based Model Context Protocol server that provides tools and resources for accessing real-time cryptocurrency data from the Binance API. It enables users to fetch prices, analyze market changes, and track activity via a streamable endpoint.ISC
- AlicenseDqualityDmaintenanceA powerful cryptocurrency analysis MCP server that adds advanced technical analysis capabilities to the original Binance MCP implementation.151Apache 2.0