Skip to main content
Glama
jordy33

Binance MCP Server

by jordy33

Binance MCP Server

A Model Context Protocol (MCP) server for cryptocurrency trading on Binance and Base network interactions. This server provides tools for automated trading, market analysis, and blockchain operations.

Features

  • Binance Trading Tools: Place orders, check balances, fetch market data, and calculate technical indicators.

  • Base Network Integration: Monitor blockchain status and prepare for DeFi operations.

  • Technical Analysis: Built-in RSI, MACD, Bollinger Bands, and moving averages.

  • Secure API Handling: Environment variables for API keys.

Related MCP server: Binance MCP Server

Installation

  1. Clone or navigate to the project directory.

  2. Create a virtual environment:

    python3 -m venv .venv
  3. Activate the virtual environment:

    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  4. Upgrade pip and install dependencies:

    pip install --upgrade pip
    pip install -r requirements.txt

Environment Variables

Create a .env file in the root directory with your API credentials:

# Binance API Configuration
BINANCE_API_KEY=your_binance_api_key_here
BINANCE_SECRET_KEY=your_binance_secret_key_here

Security Note: Never commit the .env file to version control. It is already included in .gitignore.

Running the MCP Server

Start the server with Server-Sent Events (SSE) transport:

python mcp_server.py

The server will run on http://127.0.0.1:8080/sse by default.

Available Tools

The MCP server exposes the following tools for integration with AI agents:

Trading Tools

  • get_account_balance(asset="USDT"): Get balance for a specific asset.

  • get_market_price(symbol="BTCUSDT"): Get current market price.

  • fetch_chart_data(symbol="BTCUSDT", interval="1h", limit=100): Fetch historical OHLCV data.

  • calculate_indicators(symbol="BTCUSDT", interval="1h", limit=100): Calculate technical indicators (RSI, MACD, Bollinger Bands, etc.).

  • get_symbol_rules(symbol="BTCUSDT"): Get trading rules and precision requirements.

  • adjust_leverage(symbol="BTCUSDT", leverage=5): Adjust leverage for futures trading.

  • place_order(symbol="BTCUSDT", side="BUY", quantity=0.001): Place a market order.

Blockchain Tools

  • get_base_network_status(): Check Base network health (block number, gas price).

Utility Tools

  • read_bot_logs(lines=20, log_type="general"): Read bot logs for debugging.

Testing

Run the tests to verify functionality:

python -m pytest tests/

Or run a specific test:

python tests/test_mcp_registration.py

Configuration

Trading parameters can be adjusted in config.py:

  • TRADING_PAIRS: List of symbols to trade.

  • MIN_ORDER_VALUE: Minimum order value in USDT.

  • STOP_LOSS_PERCENTAGE: Stop loss percentage.

  • TAKE_PROFIT_PERCENTAGE: Take profit percentage.

  • POLLING_INTERVAL: Time between checks (in seconds).

Security Considerations

  • Use testnet for initial testing.

  • Implement proper risk management.

  • Monitor API rate limits.

  • Keep API keys secure and rotate regularly.

Contributing

  1. Fork the repository.

  2. Create a feature branch.

  3. Make your changes.

  4. Add tests for new functionality.

  5. Submit a pull request.

License

This project is licensed under the MIT License.

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    -
    quality
    D
    maintenance
    Enables 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.
    Last updated
    9
    MIT
  • A
    license
    -
    quality
    F
    maintenance
    Enables AI agents to interact with Binance cryptocurrency exchange for trading operations, real-time market data access, portfolio management, and account monitoring through secure API integration.
    Last updated
    47
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    Provides real-time investment news, technical analysis via TA-Lib, and Binance trading capabilities including order management and market data retrieval. It enables AI assistants to perform financial market research and execute trades through the Model Context Protocol.
    Last updated
  • A
    license
    B
    quality
    A
    maintenance
    Provides Binance futures market data, trading capabilities, and technical indicators to AI assistants through the Model Context Protocol.
    Last updated
    72
    20
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Live financial data MCP: FX, crypto, stocks, news, URL reader. x402 on Base: $0.001/call.

  • Visual DeFi workflow automation on Base + Ethereum mainnet.

  • 63 pay-per-call tools for agents: vision, text, data, web, blockchain. USDC on Base via x402.

View all MCP Connectors

Latest Blog Posts

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/jordy33/binance_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server