Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

binance](https://glama.ai/mcp/servers/Muvon/mcp-binance-futures/badges/score.svg)](https://glama.ai/mcp/servers/Muvon/mcp-binance-futures) 🐍 ☁️ - MCP server for Binance USDT-M Futures trading β€” exposes tools for market data, account state, order...

README.md

mcp-binance-futures

MCP server for Binance USDT-M Futures trading. Exposes tools for market data, account state, order management, and position/margin control β€” designed to give an LLM everything it needs to monitor, place, and manage futures trades.

Built with FastMCP and httpx.

<a href="https://glama.ai/mcp/servers/Muvon/mcp-binance-futures"> <img width="380" height="200" src="https://glama.ai/mcp/servers/Muvon/mcp-binance-futures/badge" alt="mcp-binance-futures MCP server" /> </a>

---

Tools

Market Data (public, no auth)

| Tool | Description | |---|---| | ping | Test API connectivity | | get_ticker | Price, 24 h stats, mark price, funding rate for a symbol | | get_order_book | Top N bids/asks for a symbol | | get_recent_trades | Latest public trades | | get_klines | OHLCV candlestick data (1m β†’ 1w) | | get_symbol_info | Trading rules: tick size, lot size, min notional, order types |

Account (signed)

| Tool | Description | |---|---| | get_balance | Wallet balances (non-zero assets only) | | get_positions | Open positions with PnL, leverage, margin type β€” optionally scoped to one symbol | | get_account_summary | Total balance, unrealized PnL, margin usage, open position count |

Orders (signed)

| Tool | Description | |---|---| | place_order | Place LIMIT, MARKET, STOP, STOP\_MARKET, TAKE\_PROFIT, TAKE\_PROFIT\_MARKET, TRAILING\_STOP\_MARKET | | modify_order | Change price or quantity of an open LIMIT order | | cancel_order | Cancel a single order by ID | | cancel_all_orders | Cancel all open orders for a symbol | | get_open_orders | List all open orders for a symbol | | get_order | Get a specific order by ID | | get_order_history | Recent order history (all statuses) | | get_trade_history | Personal fill history for a symbol |

Position Management (signed)

| Tool | Description | |---|---| | set_leverage | Set leverage multiplier (1–125Γ—) for a symbol | | set_margin_type | Switch between ISOLATED and CROSSED margin | | adjust_isolated_margin | Add or remove margin from an isolated position | | set_position_mode | Switch between One-way and Hedge Mode | | get_position_mode | Get current position mode | | get_leverage_brackets | Leverage tiers with maintenance margin rates |

---

Setup

Requirements

  • Python 3.11+
  • uv (recommended) or pip

Install

# with uv (recommended)
uv sync

# or with pip
pip install -e .

API Keys

Create a Binance API key with Futures trading enabled. Set environment variables:

export BINANCE_API_KEY="your_api_key"
export BINANCE_API_SECRET="your_api_secret"

Security: Use IP whitelisting on your Binance API key. Never commit keys to version control.

---

Running

# stdio transport (default β€” for MCP clients like Claude Desktop)
python server.py

# or via the installed script
mcp-binance-futures

---

MCP Client Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "binance-futures": {
      "command": "python",
      "args": ["/path/to/mcp-binance-futures/server.py"],
      "env": {
        "BINANCE_API_KEY": "your_api_key",
        "BINANCE_API_SECRET": "your_api_secret"
      }
    }
  }
}

With uv

{
  "mcpServers": {
    "binance-futures": {
      "command": "uv",
      "args": ["run", "--project", "/path/to/mcp-binance-futures", "mcp-binance-futures"],
      "env": {
        "BINANCE_API_KEY": "your_api_key",
        "BINANCE_API_SECRET": "your_api_secret"
      }
    }
  }
}

---

Testing

# install dev dependencies
uv sync --extra dev

# run all tests
pytest

# run with output
pytest -v

Tests use respx to mock all HTTP calls β€” no real API keys or network required.

---

Common Usage Patterns

Open a long position with stop loss and take profit

1. get_ticker(symbol="BTCUSDT")          β†’ check current price
2. get_balance()                          β†’ check available margin
3. get_positions(symbol="BTCUSDT")        β†’ confirm no existing position
4. set_leverage(symbol="BTCUSDT", leverage=10)
5. set_margin_type(symbol="BTCUSDT", margin_type="ISOLATED")
6. place_order(symbol="BTCUSDT", side="BUY", order_type="MARKET", quantity=0.01)
7. place_order(symbol="BTCUSDT", side="SELL", order_type="STOP_MARKET",
               stop_price=45000, close_position=True)
8. place_order(symbol="BTCUSDT", side="SELL", order_type="TAKE_PROFIT_MARKET",
               stop_price=55000, close_position=True)

Modify a limit order

1. get_open_orders(symbol="BTCUSDT")      β†’ find the order ID
2. modify_order(symbol="BTCUSDT", order_id=123456, side="BUY",
                quantity=0.01, price=48500)

Emergency close all

1. cancel_all_orders(symbol="BTCUSDT")
2. place_order(symbol="BTCUSDT", side="SELL", order_type="MARKET",
               quantity=<position_size>, reduce_only=True)

---

Architecture

server.py      β€” FastMCP server, all tool definitions
client.py      β€” Async HTTP client: signing, transport, error handling
tests/
  test_client.py  β€” Unit tests for BinanceClient (signing, HTTP, errors)
  test_server.py  β€” Integration tests for all MCP tools

The client and server are intentionally kept in separate files: client.py handles all Binance API mechanics (HMAC signing, error parsing, HTTP verbs) while server.py contains only tool logic and MCP wiring. This makes both independently testable.

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Finance & Payments servers.