Skip to main content
Glama

Binance MCP Server

by tistaharahap

Binance MCP Server

A comprehensive FastMCP server implementation providing datetime utilities and Binance API integration tools for cryptocurrency market operations.

Features

  • 🕒 DateTime Tools: Get current date and time in ISO8601 format
  • 📈 Binance API Integration: Direct connectivity to Binance cryptocurrency exchange
  • 🔄 Connectivity Testing: Test Binance API connectivity and server time sync
  • 🚀 FastMCP Framework: Built with FastMCP for efficient MCP server implementation
  • ⚙️ Configuration Management: Environment-based configuration with dotenv support
  • 📊 Observability: Logfire integration for monitoring and debugging

Installation

Requirements

  • Python 3.8+
  • Dependencies listed in pyproject.toml

Setup

# Install dependencies using rye (recommended) rye sync # Or using uv uv sync

Environment Configuration

Create a .env file in the project root:

# Server Configuration PORT=8000 TRANSPORT=http # Binance API Credentials (optional for basic tools) BINANCE_API_KEY=your_api_key_here BINANCE_API_SECRET=your_api_secret_here # Observability (optional) LOGFIRE_TOKEN=your_logfire_token_here

Note: API credentials are only required for authenticated Binance operations. Basic tools like datetime and connectivity testing work without credentials.

Usage

Running the Server

Standalone Mode
# Run the server directly python -m binance_mcp.main # Or use the installed script mcp # For development (from project root) python -m src.binance_mcp.main
With MCP Client (e.g., Claude Desktop)

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):

{ "mcpServers": { "binance-mcp": { "command": "python", "args": ["-m", "binance_mcp.main"], "cwd": "/path/to/binance-mcp", "env": { "BINANCE_API_KEY": "your_api_key", "BINANCE_API_SECRET": "your_api_secret" } } } }

Available Tools

get_current_datetime

Returns the current date and time in ISO8601 format.

Parameters: None

Response:

  • timestamp (string): Current date and time in ISO8601 format

Example Response:

{ "timestamp": "2025-08-18T23:01:41.949232+00:00" }

binance_test_connectivity

Tests connectivity to the Binance API endpoints.

Parameters: None

Response:

  • timestamp (string): ISO8601 timestamp when the test was performed
  • reachable (boolean): True if Binance API is reachable, False otherwise

Example Response:

{ "timestamp": "2025-08-18T23:01:41.949232+00:00", "reachable": true }

get_binance_server_time

Retrieves the current server time from Binance.

Parameters: None

Response:

  • server_time (integer): Unix timestamp in milliseconds representing Binance server time

Example Response:

{ "server_time": 1692396701949 }

Development

Project Structure

binance-mcp/ ├── src/ │ └── binance_mcp/ │ ├── __init__.py │ ├── main.py # Main MCP server implementation │ ├── models.py # Pydantic response models │ ├── settings.py # Configuration management │ ├── client.py # Binance client factory │ └── tools/ │ ├── __init__.py │ └── timestamp.py # DateTime and Binance time tools ├── pyproject.toml # Project configuration ├── .env # Environment variables (create from template) └── README.md # This file

Testing

Test the server functionality:

# Test individual tools (requires server to be running) # The FastMCP framework provides built-in testing capabilities # Run the server in development mode rye run mcp # Or if the virtualenv is activated mcp # Or use ruff for code quality checks rye run ruff check src/

Future Enhancements

  • Market data tools (ticker prices, order book, candlestick data)
  • Account information tools (balances, trading history)
  • Trading operations (place orders, cancel orders)
  • WebSocket streaming tools for real-time data
  • Additional cryptocurrency exchange integrations
  • Rate limiting and advanced error handling
  • Caching mechanisms for frequently accessed data
  • Portfolio analytics and reporting tools

License

[Add your license here]

Contributing

[Add contribution guidelines if needed]

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables interaction with Binance cryptocurrency exchange through API integration. Provides datetime utilities, connectivity testing, and server time synchronization for cryptocurrency market operations.

  1. Features
    1. Installation
      1. Requirements
      2. Setup
      3. Environment Configuration
    2. Usage
      1. Running the Server
    3. Available Tools
      1. get_current_datetime
      2. binance_test_connectivity
      3. get_binance_server_time
    4. Development
      1. Project Structure
      2. Testing
    5. Future Enhancements
      1. License
        1. Contributing

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            This server provides a robust interface for Binance spot trading operations, including secure management of API credentials, execution and management of spot orders, and monitoring of account balances and open orders.
            Last updated -
            1
            13
          • A
            security
            A
            license
            A
            quality
            Interact with Upbit cryptocurrency exchange services to retrieve market data, manage accounts, and execute trades. Simplify your trading experience with tools for order management, deposits, withdrawals, and technical analysis.
            Last updated -
            10
            13
            MIT License
            • Apple
          • A
            security
            F
            license
            A
            quality
            A backend service that enables interaction with the Binance exchange API, allowing users to view their portfolio, convert tokens, and execute trades with minimal market impact.
            Last updated -
            1
            6
            40
            • Apple
            • Linux
          • -
            security
            F
            license
            -
            quality
            Backend service that enables users to connect with Binance exchange for viewing portfolio data, converting tokens, and executing trades with minimal market impact through the Model Context Protocol framework.
            Last updated -
            6
            • Apple
            • Linux

          View all related MCP servers

          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/tistaharahap/binance-mcp'

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