Binance MCP Server
币安MCP服务器
概述
币安MCP服务器是一项后端服务,旨在与币安API交互。它促进了与币安交易平台的无缝交互,使用户能够查看其投资组合、兑换代币并在最大程度上降低市场影响的情况下执行交易。该服务器利用模型上下文协议 (MCP) 框架来确保交易的安全、结构化和高效。
主要功能:
与币安交易所 API 交互以获取账户信息和交易
显示投资组合构成和估值
执行智能代币转换并减轻市场影响
处理市场订单和算法交易策略
检索实时交易数据和账户信息
使用模型上下文协议框架实现结构化交易
为 Binance 集成提供安全身份验证和 API 密钥管理
Related MCP server: BSC MCP Server
特征
[x] Binance API 集成:连接到 Binance 交易所获取账户信息和交易操作
[x]投资组合管理:查看详细的投资组合构成、市值和百分比分配
[x]投资组合分析:可选的历史价值跟踪,用于监控一段时间内的表现
[x]智能代币转换:使用智能订单执行策略在代币之间进行转换
[x]市场影响缓解:自动使用算法交易进行大额订单,以防止价格滑点
[x]账户管理:检索详细的账户信息、余额和交易历史记录
[x]市场数据访问:访问实时订单簿和市场数据,以便做出明智的交易决策
[x]订单执行:以灵活的数量规格下达现货市场订单
[ ]算法交易支持:实施时间加权平均价格(TWAP)订单,以最大限度地减少市场影响
[ ]自动交易:根据预先定义的策略以编程方式执行交易
[ ]安全身份验证:管理 API 密钥并保护与币安服务的连接
[ ]全面的错误处理:交易失败和 API 问题的详细错误报告
要求
在设置币安 MCP 服务器之前,请确保已安装以下内容:
Node.js(v16 或更高版本)
npm 或 yarn
Binance API 密钥和秘密(用于 Binance 交易所集成)
有效的币安智能链(BSC)钱包私钥(用于区块链交易)
安装
克隆存储库并安装依赖项:
git clone https://github.com/your-repo/binance-mcp-server.git
cd binance-mcp-server
npm install # or yarn install配置
要配置服务器,请在根目录中创建一个.env文件并指定以下变量:
# Binance API Configuration
BINANCE_API_KEY=your_binance_api_key_here
BINANCE_API_SECRET=your_binance_api_secret_here创建币安 API 密钥
在使用币安 API 集成之前,您需要创建一个 API 密钥。这允许您通过多种编程语言连接到币安服务器,从币安提取数据,并与外部应用程序交互。您可以查看您的钱包和交易数据,进行交易,并在第三方程序中存取资金。
先决条件:
您需要向您的现货钱包存入任意金额才能激活您的帐户
完成身份验证
在您的帐户上启用双因素身份验证 (2FA)
创建币安 API 密钥的步骤:
登录您的币安账户,点击个人资料图标,然后点击[账户]。

进入【API管理】,点击【创建API】。

选择您喜欢的 API 密钥类型:
系统生成的 API 密钥(HMAC 对称加密) - 您将获得 API 密钥和密钥。
自生成的 API 密钥(Ed25519 或 RSA 非对称加密) - 您将收到一个 API 密钥,但您必须创建自己的公钥-私钥对。

输入您的 API 密钥的标签/名称。

使用您的 2FA 设备和密钥进行验证。

您的 API 密钥现已创建。
有关币安 API 的更多详细信息,请参阅币安 API 文档。
与 Claude Desktop 集成
在将此 MCP 服务器与 Claude Desktop 集成之前,请确保已安装以下软件:
克劳德桌面
然后使用以下命令构建服务器:
npm run build 要将此 MCP 服务器添加到 Claude Desktop:
创建或编辑 Claude Desktop 配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
添加以下配置:
{
"mcpServers": {
"binance-mcp": {
"command": "node",
"args": [
"/Users/Username/Desktop/binance-mcp/build/index.js"
],
"env": {
"BINANCE_API_KEY": "BINANCE_API_KEY",
"BINANCE_API_SECRET": "BINANCE_API_SECRET"
},
"disabled": false,
"autoApprove": []
}
}
}确保在args字段中传递index.js文件的正确位置。
重新启动 Claude Desktop 以使更改生效。
用法(用于连接除 Claude 之外的 MCP HOST)
启动服务器
要启动 MCP 服务器,请运行:
npm start # or node index.js功能
币安 API 函数
获取币安账户信息 -
binanceAccountInfo检索有关您的币安账户的综合信息,包括余额、交易权限和账户状态。
获取币安账户快照 -
binanceAccountSnapshot获取您的币安账户状态快照,包括当前 BTC 价格信息。包含过去 30 天的历史记录。
查看币安订单簿 -
binanceOrderBook{ "symbol": "BTCUSDT" }检索指定交易对的当前订单簿,显示最多 50 个级别的可用买卖订单。
下达现货市场订单 -
binanceSpotPlaceOrder{ "symbol": "BTCUSDT", "side": "BUY", "quantity": 0.001, // OR "quoteOrderQty": 100 }下达市价单,以最佳可用价格立即执行。使用
quantity指定基础资产数量,或使用quoteOrderQty数量”指定报价货币数量。适用于小额订单。下单TWAP -
binanceTimeWeightedAveragePriceFutureAlgo{ "symbol": "BTCUSDT", "side": "BUY", "quantity": 1.0, "duration": 3600 }下达时间加权平均价格 (TWAP) 订单,该订单会在指定时间内逐步执行,以最大程度地降低对市场的影响。适用于可能导致价格大幅波动的大额订单。
模型上下文协议(MCP)
**模型上下文协议 (MCP)**是一个开放标准,旨在增强应用程序与人工智能模型和基于区块链的计算系统的交互方式。MCP 建立了结构化上下文,从而提高了自动化交易和去中心化应用程序的效率。
MCP 的优势:
标准化:定义应用程序交互的统一方法。
效率:减少计算开销并提高交易速度。
互操作性:支持跨多个平台和区块链生态系统的集成。
错误处理
当事务失败时,服务器会返回一条包含详细信息的错误消息。请查看控制台日志以获取更多调试信息。常见的错误场景包括:
钱包资金不足
收件人地址无效
网络拥塞或 RPC 问题
Binance API 身份验证错误
交易限额限制
执照
该项目根据 MIT 许可证开源。
对于贡献、错误报告或功能请求,请在GitHub上提交问题。
Available Tools
1 toolcrypto-priceC
Get the current price of a cryptocurrency
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Get' implies a read-only operation, the description doesn't address important behavioral aspects like rate limits, data freshness (how current is 'current'), error conditions, or authentication requirements. For a tool with zero annotation coverage, this represents a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly concise - a single sentence that states exactly what the tool does without any wasted words. It's front-loaded with the core functionality and contains no redundant information. Every word earns its place in this minimal but complete statement of purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no annotations, no output schema, and 0% schema description coverage, the description is inadequate. While concise, it doesn't provide enough information about behavior, parameter usage, or return values. The agent would need to guess about important aspects like response format, error handling, and parameter constraints.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, with one undocumented parameter 'symbol'. The description mentions 'cryptocurrency' which provides some context for what 'symbol' might represent, but doesn't specify format (e.g., 'BTC', 'bitcoin', ticker symbols), valid values, or examples. This minimal compensation for the complete lack of schema documentation is insufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get') and resource ('current price of a cryptocurrency'), making the purpose immediately understandable. It's specific enough to distinguish this tool from potential alternatives like historical price tools or exchange rate calculators. However, it doesn't explicitly differentiate from non-existent siblings, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or limitations. It simply states what the tool does without context about appropriate use cases or constraints. Since there are no sibling tools mentioned, this omission is less critical but still leaves the agent without usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
- First observed
crypto-price
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined as fetching cryptocurrency prices, making it impossible for an agent to confuse it with another tool.
Since there is only one tool, naming consistency is inherently perfect. The tool name 'crypto-price' follows a clear noun-noun pattern that is straightforward and descriptive for its single function.
A single tool is too few for a server named 'Binance MCP Server', which implies broader cryptocurrency exchange functionality. This minimal set feels thin and inadequate for the expected scope, such as trading, account management, or market data beyond just price.
The tool surface is severely incomplete for a Binance server, covering only price retrieval. Obvious gaps include trading operations, balance checks, order management, and other exchange features, which will likely cause agent failures in typical cryptocurrency tasks.
Maintenance
Related MCP Connectors
Token swaps at the best net price on 9 EVM chains and Solana. No API key, non-custodial.
Binance - 340 tools for market data, order books, and trading pairs
Crypto trading intelligence MCP — 34+ endpoints, x402 pay-per-use, AI agent strategy & execution
Non-custodial DEX aggregator for autonomous AI agents: best-price swaps on 8 chains, no API key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceThis server provides a robust interface for Binance spot trading operations, including secure management of API credentials, execution and management of spot orders, and monitoring of account balances and open orders.5 npm14MIT
- AlicenseCqualityFmaintenanceA backend service for executing transactions on Binance Smart Chain, enabling secure transfers of BNB and BEP-20 tokens, smart contract interactions, and token creation through structured MCP integration.1210 npm105MIT
- -licenseNot gradedqualityNot gradedmaintenanceA backend service that executes transactions across multiple blockchains, enabling users to manage wallets, transfer tokens, and interact with smart contracts using the Model Context Protocol framework.1-
- -licenseNot gradedqualityNot gradedmaintenanceBackend 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.30 npm-