
Binance MCP Server
一个模型控制协议 (MCP) 服务器,为币安交易所提供加密货币交易接口,实现诸如实时价格获取、账户余额查询、订单下单/取消以及自动化套利策略等功能。
Tools
get_symbol_price
Get the current price of a cryptocurrency pair. Args: symbol: The cryptocurrency pair, e.g., BTCUSDT. Returns: Price information from Binance.
get_account_balance
Get the balance of a specific cryptocurrency asset. Args: asset: The cryptocurrency symbol, e.g., BTC. Returns: Asset balance info.
place_market_order
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.
get_trade_history
Get recent trade history for a pair. Args: symbol: The trading pair. limit: Number of trades to fetch. Returns: List of trade summaries.
get_open_orders
Get open orders for a symbol. Args: symbol: The trading pair. Returns: List of open orders.
cancel_order
Cancel a specific order. Args: symbol: The trading pair. order_id: Order ID to cancel. Returns: Cancellation result.
get_funding_rate_history
Get funding rate history. Args: symbol: Perpetual contract symbol. limit: Number of records to return (default 100). Returns: Funding rate data list.
execute_hedge_arbitrage_strategy
Execute hedge arbitrage based on funding rate. Args: symbol: The trading pair. quantity: Amount to trade. Returns: Summary of the arbitrage result.
find_arbitrage_pairs
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.
README
Binance MCP 服务器
这是一个基于 MCP (Model Control Protocol) 的币安交易接口服务器起点代码。它提供了一系列基础的币安交易所交互能力,可以作为你开发更复杂交易策略和功能的基础。
功能特性
当前实现的基础功能包括:
- 实时获取加密货币价格
- 查询账户资产余额
- 下单交易(市价单)
- 查询交易历史
- 查询当前未完成订单
- 取消订单
- 获取资金费率历史
- 执行对冲套利策略
- 自动寻找套利机会
这些功能为你开发更高级的交易策略和自动化系统提供了基础构建块。你可以基于这些接口:
- 开发更复杂的交易策略
- 添加风险管理系统
- 实现更多类型的订单支持
- 扩展数据分析能力
- 添加自定义的套利策略
安装要求
- 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
推荐服务器

Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。