Binance Agent MCP Server
Provides Binance market data and trading capabilities, including real-time tickers, order book depth, candlestick data, and secure spot/futures order execution with dry-run mode, slippage protection, and notional limits.
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 Agent MCP Serversimulate a dry-run market order for 0.5 ETH with 1% slippage"
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 Agent OS โ Institutional MCP Server & Trading Engine
Official Submission for the Binance Agent OS Mini Hackathon ($60K USDC Prize Pool)
Production-grade Model Context Protocol (MCP) server and autonomous trading framework engineered for zero-float precision, cryptographic intent verification (EIP-712), deterministic idempotency, and institutional pre-trade risk policy.
๐๏ธ The 4 Institutional Safeguard Pillars
Most AI trading agents fail in production due to floating point inaccuracies, duplicate order firing on network disconnects, timestamp desynchronization, and lack of pre-trade risk guardrails. This toolkit solves them natively:
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Autonomous AI Agent โ
โ (Claude/Cursor/Hermes) โ
โโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โ Trade Intent Request
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HARDENED MCP INTERCEPTOR & AGENT OS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 1. Idempotency Engine โโโบ SHA-256 Client ID โ
โ 2. Precision Normalizer โโโบ LOT_SIZE / TICK_SIZEโ
โ 3. Policy Risk Engine โโโบ Cap & Slippage Gate โ
โ 4. Resilience Manager โโโบ Clock Sync & Backoffโ
โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Cryptographic EIP-712 Proof
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Binance Spot/Futures โ
โ REST & WebSockets โ
โโโโโโโโโโโโโโโโโโโโโโโโโโPre-Trade Policy Engine & Circuit Breaker (
src/policy.ts)Hard Notional USD caps per transaction and aggregate 24-hour drawdown limits.
Dynamic price slippage collar filters (auto-rejects orders exceeding configurable basis points vs reference price).
Strict symbol allowlisting to prevent hallucinated asset routing.
Deterministic Idempotency Shield (
src/idempotency.ts)Deterministic
clientOrderIdgeneration via SHA-256 hashing of trade intents.Replay protection: Network retries and duplicate events return cached state instead of double-filling on the exchange.
Exchange Resilience & Clock Drift Sentinel (
src/resilience.ts)Proactive calibration with Binance Server Time (
/api/v3/time) eliminating error-1021 (Timestamp for this request was 1000ms ahead/behind).Real-time
X-MBX-USED-WEIGHT-1Mheader tracking with adaptive backoff to prevent IP rate-limit bans (HTTP 418 / 429).
Zero-Drift Micro-Precision Normalizer (
src/precision.ts)String-slicing and BigInt decimal math bypassing JavaScript IEEE-754 floating-point drift (
0.1 + 0.2 = 0.30000000000000004).Exact adherence to Binance exchange filters (
LOT_SIZE,PRICE_FILTER,MIN_NOTIONAL).
Cryptographic EIP-712 Intent Signing (
src/eip712.ts)Typed data domain separation and ECDSA secp256k1 recovery ensuring only authorized agents or human multisig keyholders can broadcast orders.
Related MCP server: GearTrade MCP Server
โก Interactive Live Demo Runner
Run the interactive TUI demo runner to see the 4 pillars execute in real time:
bun run demoLive Terminal Snapshot
================================================================================
BINANCE AGENT OS โ INSTITUTIONAL RESILIENCE & MCP DEMO RUNNER
Target: Binance Agent OS Mini Hackathon ($60K USDC)
================================================================================
[INIT] Initializing Institutional Agent Engine & Calibrating Clock Offset...
โ Binance Server Time Synced: Offset = 0 ms (Protected against error -1021)
โโโ [SCENARIO 1: Micro-Precision & LOT_SIZE Normalization] โโโโโโโโโโโโโโโโโโโ
โ Raw JavaScript Floating Arithmetic: 0.30000000000000004 (Would trigger LOT_SIZE rejection)
โ Applying PrecisionEngine Normalizer: 0.3 (stepSize: 0.001)
โ Status: PASSED โ Zero Float Drift
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโ [SCENARIO 2: Pre-Trade Policy Engine & Hard Risk Guardrails] โโโโโโโโโโโโโ
โ Testing Trade: BUY 0.05 BTC @ $65,000 (Notional: $3,250.00 | Cap: $100.00)
โ Policy Intercept: BLOCKED -> NOTIONAL_CAP_EXCEEDED (Max $100.00 cap)
โ Testing Trade: BUY 0.001 BTC @ $66,000 (Ref: $65,000 | Diff: 153.8 bps > 50 bps max)
โ Policy Intercept: BLOCKED -> PRICE_COLLAR_BREACH (Exceeds 0.50% max slippage)
โ Testing Trade: BUY 0.001 BTC @ $65,010 (Notional: $65.01 | Safe Bounds)
โ Policy Intercept: APPROVED -> Notional: $65.01
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโ [SCENARIO 3: Deterministic Idempotency & Duplicate Shield] โโโโโโโโโโโโโโโโ
โ Generated Deterministic Order ID: mcp_5da191fa5e5fd27470b6e9c25b10
โ Order 1 Dispatched -> Status: EXECUTED (FILLED)
โ Simulating Network Retry / Duplicate Event...
โ Duplicate Intercept: BLOCKED DUPLICATE ORDER (Safe Replay)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโ [SCENARIO 4: Rate-Limit Sentinel & Backoff Throttling] โโโโโโโโโโโโโโโโโโโโ
โ Simulated Inbound Used Weight: 1050 / 1200 (87.5% - High Load Threshold)
โ Throttling Sentinel: Backing off for 5100ms to prevent IP ban (HTTP 418/429)
โ Status: PASSED โ Proactive Exchange Safety Protected
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ๐ ๏ธ MCP Tools & Capabilities
Tool Name | Auth | Description |
| Public | Real-time 24hr rolling window price, volume, and spread stats. |
| Public | Depth analysis with live bid/ask spread and imbalance ratio. |
| Public | Candlestick series for technical indicator processing (EMA/RSI/MACD). |
| Public | Autonomous multi-pair triangular arbitrage opportunity scanner. |
| Signed | Safe SPOT order execution with policy validation & dry-run toggle. |
| Signed | Order cancellation with deterministic ID matching. |
| Signed | Account balances, asset allocation, and free margin inspection. |
๐ Quickstart
1. Prerequisites
Bun runtime (
bun >= 1.1.0)
2. Installation
git clone https://github.com/eikarna/binance-agent-mcp.git
cd binance-agent-mcp
bun install3. Environment Setup (.env)
BINANCE_API_KEY="your_api_key_here"
BINANCE_API_SECRET="your_api_secret_here"
BINANCE_USE_TESTNET="true" # Set to false for live production API
BINANCE_DRY_RUN="true" # Simulation mode for testing4. Connect to Cursor / Claude Desktop / Hermes Agent
Add the server to your claude_desktop_config.json or Cursor MCP settings:
{
"mcpServers": {
"binance-agent-os": {
"command": "bun",
"args": ["run", "C:/path/to/binance-agent-mcp/src/index.ts"],
"env": {
"BINANCE_API_KEY": "your_api_key",
"BINANCE_API_SECRET": "your_api_secret",
"BINANCE_DRY_RUN": "true"
}
}
}
}๐งช Testing & Verification
# Run unit & security test suite
bun test
# Strict TypeScript type checking
bun run typecheck
# Run interactive TUI demo
bun run demo๐๏ธ Full MCP Specification Compliance
Unlike tool-only wrappers, this server implements all 3 core primitives of the Model Context Protocol:
Tools: Hardened execution functions guarded by pre-trade risk policies and float-drift protection.
Resources (
binance://market/{symbol},binance://risk/parameters): Dynamic contextual feeds exposing real-time order books, spreads, and pre-trade risk thresholds directly into the LLM context.Prompts (
analyze_orderbook_imbalance,execute_guarded_trade): Standardized system workflows guiding autonomous agents to inspect order book depth and evaluate risk boundaries before submitting orders.
๐ License
MIT ยฉ Nix Seymour
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 Connectors
Build, backtest, and deploy quantitative trading strategies from your AI agent.
Non-custodial trading for AI agents: 1,900+ assets โ US stocks, treasuries, gold, 250+ perps.
Crypto trading intelligence MCP โ 34+ endpoints, x402 pay-per-use, AI agent strategy & execution
DeFi safety layer for AI agents: wallet safety, token risk, tx decode/simulate. 20 tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to perform cryptocurrency trading operations on Binance exchange through 30 comprehensive tools supporting spot trading, futures contracts, options, account management, market data analysis, and risk control features. Provides enterprise-grade security with local encrypted API key storage and supports multiple account types with sandbox environment testing.9MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to perform cryptocurrency trading analysis and execution with 38+ tools including real-time market data, technical indicators, risk management, and support for both paper trading and live execution on Hyperliquid.7MIT

AlgoChains MCP Serverofficial
AlicenseAqualityAmaintenanceEnables AI assistants to interact with a complete trading infrastructure, including live futures bots, real market data, backtesting, and copy-trading signals. Supports 503 tools across 20 domains, from market data to order execution, with zero synthetic data.1001MIT- AlicenseNot gradedqualityBmaintenanceConnects LLM agents to Binance Spot API for safe market data access and testnet trading with built-in risk controls.68MIT
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/eikarna/binance-agent-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server