This MCP server provides comprehensive access to Binance Futures API endpoints, implementing all major trading, account management, and market data functionality. It allows you to interact with Binance Futures directly from your MCP-enabled applications.
Install the package from PyPI:
pip install binance_futures_mcp
For containerized deployment:
# Clone the repository
git clone https://github.com/alexcandrabersiva/bin-mcp.git
cd binance-mcp-server
# Build the Docker image
docker build -t binance-mcp-server .
# Run with environment variables
docker run -e BINANCE_API_KEY="your_api_key" -e BINANCE_SECRET_KEY="your_secret_key" \
binance-mcp-server --binance-api-key "$BINANCE_API_KEY" --binance-secret-key "$BINANCE_SECRET_KEY"
Create a docker-compose.yml
:
version: '3.8'
services:
binance-mcp:
build: .
environment:
- BINANCE_API_KEY=${BINANCE_API_KEY}
- BINANCE_SECRET_KEY=${BINANCE_SECRET_KEY}
command: [
"--binance-api-key", "${BINANCE_API_KEY}",
"--binance-secret-key", "${BINANCE_SECRET_KEY}"
]
Then run:
docker-compose up
Your Binance API key needs the following permissions:
This server can be integrated with various MCP clients. Here are configuration examples:
Add to your VS Code settings.json
:
{
"mcp": {
"servers": {
"binance": {
"command": "uvx",
"args": ["--from", "binance_futures_mcp", "binance-mcp-server.exe", "--binance-api-key", "your_api_key", "--binance-secret-key", "your_secret_key"]
}
}
}
}
Add to your Cursor configuration file (.cursor/mcp.json
):
{
"servers": {
"binance": {
"command": "uvx",
"args": ["--from", "binance_futures_mcp", "binance-mcp-server.exe", "--binance-api-key", "your_api_key", "--binance-secret-key", "your_secret_key"]
}
}
}
Add to your Windsurf configuration (.windsurf/mcp.json
):
{
"mcpServers": {
"binance": {
"command": "uvx",
"args": ["--from", "binance_futures_mcp", "binance-mcp-server.exe", "--binance-api-key", "your_api_key", "--binance-secret-key", "your_secret_key"]
}
}
}
Add to your Claude Desktop configuration file:
On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"binance": {
"command": "uvx",
"args": ["--from", "binance_futures_mcp", "binance-mcp-server.exe", "--binance-api-key", "your_api_key", "--binance-secret-key", "your_secret_key"]
}
}
}
your_api_key
and your_secret_key
with your actual Binance API credentialsuvx binance_futures_mcp
or python -m binance_mcp
The server provides 11 essential tools organized into the following categories:
get_account_info
- Get account informationget_balance
- Get account balanceget_position_info
- Get position informationget_position_mode
- Get position mode (Hedge vs. One-way)get_commission_rate
- Get commission rateget_exchange_info
- Get exchange trading rulesget_book_ticker
- Get best price/qty on the order bookget_price_ticker
- Get latest price for a symbolget_order_book
- Get order book depthget_klines
- Get candlestick dataget_mark_price
- Get mark price and funding rate{
"tool": "place_order",
"arguments": {
"symbol": "BTCUSDT",
"side": "BUY",
"order_type": "MARKET",
"quantity": 0.001
}
}
{
"tool": "place_order",
"arguments": {
"symbol": "BTCUSDT",
"side": "BUY",
"order_type": "LIMIT",
"quantity": 0.001,
"price": 50000.0,
"time_in_force": "GTC"
}
}
{
"tool": "get_account_info",
"arguments": {}
}
{
"tool": "get_klines",
"arguments": {
"symbol": "BTCUSDT",
"interval": "1h",
"limit": 100
}
}
{
"tool": "get_24hr_ticker",
"arguments": {
"symbol": "BTCUSDT"
}
}
{
"tool": "get_taker_buy_sell_volume",
"arguments": {
"symbol": "BTCUSDT"
}
}
Your Binance API key and secret remain completely local to your computer. The MCP server runs entirely on your machine; neither the package author nor any third-party remote service can access your credentials.
This server implements all endpoints documented in the Binance Futures API:
https://fapi.binance.com
For detailed parameter specifications, see the Binance Futures API Documentation.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "binance" '{"command":"uvx","args":["--from","binance_futures_mcp","binance-mcp-server.exe","--binance-api-key","your_api_key","--binance-secret-key","your_secret_key"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"binance": {
"command": "uvx",
"args": [
"--from",
"binance_futures_mcp",
"binance-mcp-server.exe",
"--binance-api-key",
"your_api_key",
"--binance-secret-key",
"your_secret_key"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"binance": {
"command": "uvx",
"args": [
"--from",
"binance_futures_mcp",
"binance-mcp-server.exe",
"--binance-api-key",
"your_api_key",
"--binance-secret-key",
"your_secret_key"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect