binance-mcp-demo
Allows interaction with Binance Spot API, providing tools for checking connection info, server time, prices, order book, symbol info, account balances, open orders, order status, placing and canceling orders on Binance.
Click on "Install 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-demoWhat's the current BTCUSDT price?"
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-demo
A local stdio MCP server for Binance Spot, written in TypeScript for Node.js
20+. It uses native fetch, Node's crypto module, the official
@modelcontextprotocol/sdk, and no Binance SDK wrapper.
Environments
| Base URL | Credentials |
|
| Binance Demo Mode |
|
| Spot Testnet |
|
| Live Binance Spot |
Binance Demo Mode and Spot Testnet are different systems. Keys created at
demo.binance.com must use https://demo-api.binance.com, not
https://testnet.binance.vision. Spot Testnet keys for
testnet.binance.vision are separate from Demo Mode keys.
Related MCP server: Binance MCP Server
Install and configure
npm install
cp .env.example .envEdit .env and set the appropriate key and secret. Credentials are never
hardcoded, and .env is ignored by Git.
BINANCE_ENV=demo
BINANCE_API_KEY=your_demo_api_key
BINANCE_API_SECRET=your_demo_api_secret
BINANCE_RECV_WINDOW=10000
BINANCE_ALLOW_LIVE_TRADING=false
BINANCE_LOG_LEVEL=infoBuild and run:
npm run typecheck
npm test
npm run build
npm startThe server communicates over stdio, so normally Hermes starts it rather than
you running npm start interactively.
Diagnose
The diagnostic command checks server time and the signed account endpoint. It prints only a masked API key and never prints the secret or signature.
BINANCE_ENV=demo \
BINANCE_API_KEY='your_demo_api_key' \
BINANCE_API_SECRET='your_demo_api_secret' \
npm run diagnoseIt exits with status 0 when /api/v3/account succeeds and non-zero otherwise.
Hermes Agent configuration
Hermes reads MCP server configuration from ~/.hermes/config.yaml. Use the
absolute project path so Hermes does not depend on its working directory.
Demo:
mcp_servers:
binance-spot:
command: node
args:
- /home/ahmed/binance-mcp-demo/dist/src/index.js
env:
BINANCE_ENV: demo
BINANCE_API_KEY: ${BINANCE_API_KEY}
BINANCE_API_SECRET: ${BINANCE_API_SECRET}
BINANCE_RECV_WINDOW: "10000"
BINANCE_ALLOW_LIVE_TRADING: "false"
BINANCE_LOG_LEVEL: infoLive (safe, read-only/order-query behavior until explicitly enabled):
mcp_servers:
binance-spot-live:
command: node
args:
- /home/ahmed/binance-mcp-demo/dist/src/index.js
env:
BINANCE_ENV: live
BINANCE_API_KEY: ${BINANCE_API_KEY}
BINANCE_API_SECRET: ${BINANCE_API_SECRET}
BINANCE_RECV_WINDOW: "10000"
BINANCE_ALLOW_LIVE_TRADING: "false"
BINANCE_LOG_LEVEL: infoOnly set BINANCE_ALLOW_LIVE_TRADING: "true" after intentionally deciding to
allow live place/cancel actions. Trading tools remain visible when the guard is
off, but return a clear MCP error if called.
Available tools
binance_connection_infobinance_server_timebinance_pricebinance_order_bookbinance_symbol_infobinance_accountbinance_open_ordersbinance_order_statusbinance_place_orderbinance_cancel_orderbinance_cancel_all_orders
Example Hermes prompts:
“Show my Binance connection info and server time.”
“What is the current BTCUSDT price and the top 20 order-book levels?”
“Show the BTCUSDT trading rules, tick size, lot size, and notional limits.”
“Show my account balances and open ETHUSDT orders.”
“Check order 12345 for BTCUSDT.”
“On the configured non-live environment, place a LIMIT BUY for 0.001 BTCUSDT at 50000 USDT.”
“Cancel all open BTCUSDT orders.”
binance_place_order loads the symbol rules before submitting an order. It
rejects prices or quantities that are out of range or not aligned to Binance's
tick/step sizes, and reports the normalized value for the user to review. It
never silently submits a materially adjusted order.
Troubleshooting -2015
Binance error -2015 means the API key, IP, or permissions are invalid for the
request. Check all of the following:
The key belongs to the selected environment. Demo, Spot Testnet, and live keys are not interchangeable.
BINANCE_ENVselects the matching base URL shown above.The key has the required Spot/account or trading permissions.
Any IP allowlist on the key includes the machine running Hermes.
The key and secret were copied without whitespace or shell interpolation.
The key has not expired, been deleted, or been regenerated.
Run npm run diagnose after correcting the configuration.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA Model Context Protocol server that exposes Binance cryptocurrency exchange data to LLMs, allowing agents to access real-time prices, order books, and historical market data without requiring API keys.Last updated20MIT
- FlicenseBqualityDmaintenanceA Model Control Protocol (MCP) server that provides cryptocurrency trading interfaces for Binance exchange, enabling functions like real-time price fetching, account balance queries, order placement/cancellation, and automated arbitrage strategies.Last updated914
- 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.Last updated1353MIT
- AlicenseBqualityDmaintenanceAn MCP server that streams the latest Binance announcements to your AI agents in real time, enabling instant analysis and action on market-moving updates.Last updated11MIT
Related MCP Connectors
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
MCP server exposing the Backtest360 engine API as tools for AI agents.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/asyn18/binance-mcp-demo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server