mcp-binance-futures is an MCP (Model Context Protocol) server designed to provide large language models with the ability to interact with Binance USDT-M futures. The project is built using FastMCP and httpx, wrapping Binance API calls as tools that LLMs can invoke.
Purpose
This server is used to let LLMs monitor, open positions, and manage futures trading, covering market data, account status, order management, and position and margin control.
Main Capabilities
The tools exposed by the server are divided into the following categories:
- Market data (public endpoints, no authentication required)
- Account information (requires signed authentication)
- Order management (requires signed authentication)
- Position management (requires signed authentication)
The combination of these tools is intended to provide the comprehensive functionality LLMs need to monitor, place orders for, and manage futures trading.
Usage
First, you need to create a Binance API key with Futures trading enabled and set the environment variables. Installing with uv or pip is recommended. For security reasons, using an IP whitelist is recommended, and never commit keys to a version control system.
For MCP clients, the server configuration can be added to ~/Library/Application Support/Claude/claude_desktop_config.json file.
The project provides tests that use respx to mock all HTTP calls, so no real API key or network is required.
The client and server are deliberately separated in the code:client.py handles all Binance API mechanics (HMAC signing, error parsing, HTTP verbs), while server.py contains only the tool logic and MCP connection. This design allows the two to be tested independently.
Applicable Scenarios
Suitable for scenarios that require automating or assisting with Binance USDT-M futures trading through LLMs, such as opening long positions with stop-loss and take-profit, modifying limit orders, emergency closing of positions, etc.
Limitations
Specific limitation information is not currently provided. Before use, ensure you have Binance futures trading permissions and comply with relevant security practices.