MCP Hummingbot 服务器 logo

MCP Hummingbot 服务器

Organization
hummingbot

用于 Hummingbot API 集成的 MCP 服务器,支持跨多个交易所的自动加密货币交易。需要运行中的 Hummingbot 实例,启用 API 并通过环境变量配置有效的 API 凭据。

Publisherhummingbot
Repositorymcp
LanguagePython
Forks
38
Stars
55
Available tools
0
Transport typestdio
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    MCP Hummingbot 服务器 exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    55 stars and 38 forks from the linked repository.

MCP Hummingbot Server

An MCP (Model Context Protocol) server that enables Claude and Gemini CLI to interact with Hummingbot for automated cryptocurrency trading across multiple exchanges.

Installation & Configuration

Option 1: Using uv (Recommended for Development)

  1. Install uv (if not already installed):

    bash
    curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Clone and install dependencies:

    bash
    git clone https://github.com/hummingbot/mcp
    cd mcp
    uv sync
  3. Create a .env file:

    bash
    cp .env.example .env
  4. Edit the .env file with your Hummingbot API credentials:

    env
    HUMMINGBOT_API_URL=http://localhost:8000
    HUMMINGBOT_USERNAME=admin
    HUMMINGBOT_PASSWORD=admin
  5. Configure in Claude Code or Gemini CLI:

    json
    {
      "mcpServers": {
        "hummingbot-mcp": {
          "type": "stdio",
          "command": "uv",
          "args": [
            "--directory",
            "/path/to/mcp",
            "run",
            "main.py"
          ]
        }
      }
    }

    Note: Make sure to replace /path/to/mcp with the actual path to your MCP directory.

Option 2: Using Docker (Recommended for Production)

  1. Create a .env file:

    bash
    touch .env
  2. Edit the .env file with your Hummingbot API credentials:

    env
    HUMMINGBOT_API_URL=http://localhost:8000
    HUMMINGBOT_USERNAME=admin
    HUMMINGBOT_PASSWORD=admin

    Important: When running the MCP server in Docker and connecting to a Hummingbot API on your host:

    • Linux: Use --network host (see below) to allow the container to access localhost:8000
    • Mac/Windows: Change HUMMINGBOT_API_URL to http://host.docker.internal:8000
  3. Pull the Docker image:

    bash
    docker pull hummingbot/hummingbot-mcp:latest
  4. Configure in Claude Code or Gemini CLI:

    For Linux (using --network host):

    json
    {
      "mcpServers": {
        "hummingbot-mcp": {
          "type": "stdio",
          "command": "docker",
          "args": [
            "run",
            "--rm",
            "-i",
            "--network",
            "host",
            "--env-file",
            "/path/to/mcp/.env",
            "-v",
            "$HOME/.hummingbot_mcp:/root/.hummingbot_mcp",
            "hummingbot/hummingbot-mcp:latest"
          ]
        }
      }
    }

    For Mac/Windows:

    json
    {
      "mcpServers": {
        "hummingbot-mcp": {
          "type": "stdio",
          "command": "docker",
          "args": [
            "run",
            "--rm",
            "-i",
            "--env-file",
            "/path/to/mcp/.env",
            "-v",
            "$HOME/.hummingbot_mcp:/root/.hummingbot_mcp",
            "hummingbot/hummingbot-mcp:latest"
          ]
        }
      }
    }

    (Remember to set HUMMINGBOT_API_URL=http://host.docker.internal:8000 in your .env file)

    Note: Make sure to replace /path/to/mcp with the actual path to your MCP directory.

Cloud Deployment with Docker Compose

For cloud deployment where both Hummingbot API and MCP server run on the same server:

  1. Create a .env file:

    bash
    touch .env
  2. Edit the .env file with your Hummingbot API credentials:

    env
    HUMMINGBOT_API_URL=http://localhost:8000
    HUMMINGBOT_USERNAME=admin
    HUMMINGBOT_PASSWORD=admin
  3. Create a docker-compose.yml:

    yaml
    services:
      hummingbot-api:
        container_name: hummingbot-api
        image: hummingbot/hummingbot-api:latest
        ports:
          - "8000:8000"
        volumes:
          - ./bots:/hummingbot-api/bots
          - /var/run/docker.sock:/var/run/docker.sock
        environment:
          - USERNAME=admin
          - PASSWORD=admin
          - BROKER_HOST=emqx
          - DATABASE_URL=postgresql+asyncpg://hbot:hummingbot-api@postgres:5432/hummingbot_api
        networks:
          - emqx-bridge
        depends_on:
          - postgres
    
      mcp-server:
        container_name: hummingbot-mcp
        image: hummingbot/hummingbot-mcp:latest
        stdin_open: true
        tty: true
        env_file:
          - .env
        environment:
          - HUMMINGBOT_API_URL=http://hummingbot-api:8000
        depends_on:
          - hummingbot-api
        networks:
          - emqx-bridge
    
      # Include other services from hummingbot-api docker-compose.yml as needed
      emqx:
        container_name: hummingbot-broker
        image: emqx:5
        restart: unless-stopped
        environment:
          - EMQX_NAME=emqx
          - EMQX_HOST=node1.emqx.local
          - EMQX_CLUSTER__DISCOVERY_STRATEGY=static
          - EMQX_CLUSTER__STATIC__SEEDS=[emqx@node1.emqx.local]
          - EMQX_LOADED_PLUGINS="emqx_recon,emqx_retainer,emqx_management,emqx_dashboard"
        volumes:
          - emqx-data:/opt/emqx/data
          - emqx-log:/opt/emqx/log
          - emqx-etc:/opt/emqx/etc
        ports:
          - "1883:1883"
          - "8883:8883"
          - "8083:8083"
          - "8084:8084"
          - "8081:8081"
          - "18083:18083"
          - "61613:61613"
        networks:
          emqx-bridge:
            aliases:
              - node1.emqx.local
        healthcheck:
          test: [ "CMD", "/opt/emqx/bin/emqx_ctl", "status" ]
          interval: 5s
          timeout: 25s
          retries: 5
    
      postgres:
        container_name: hummingbot-postgres
        image: postgres:15
        restart: unless-stopped
        environment:
          - POSTGRES_DB=hummingbot_api
          - POSTGRES_USER=hbot
          - POSTGRES_PASSWORD=hummingbot-api
        volumes:
          - postgres-data:/var/lib/postgresql/data
        ports:
          - "5432:5432"
        networks:
          - emqx-bridge
        healthcheck:
          test: ["CMD-SHELL", "pg_isready -U hbot -d hummingbot_api"]
          interval: 10s
          timeout: 5s
          retries: 5
    
    networks:
      emqx-bridge:
        driver: bridge
    
    volumes:
      emqx-data: { }
      emqx-log: { }
      emqx-etc: { }
      postgres-data: { }
  4. Deploy:

    bash
    docker compose up -d
  5. Configure in Claude Code or Gemini CLI to connect to existing container:

    json
    {
      "mcpServers": {
        "hummingbot-mcp": {
          "type": "stdio",
          "command": "docker",
          "args": [
            "exec",
            "-i",
            "hummingbot-mcp",
            "uv",
            "run",
            "main.py"
          ]
        }
      }
    }

    Note: Replace hummingbot-mcp with your actual container name. You can find the container name by running:

    bash
    docker ps

Server Configuration

On first run, the server creates a default configuration from environment variables (or uses http://localhost:8000 with default credentials). Configuration is stored in ~/.hummingbot_mcp/server.yml.

Using the configure_server Tool

# Show the current server configuration
configure_server()

# Update the host and port
configure_server(host="192.168.1.100", port=8001)

# Update credentials
configure_server(username="admin", password="secure_password")

# Update everything at once
configure_server(
    name="production",
    host="prod-server",
    port=8000,
    username="admin",
    password="secure_password"
)

Only the provided parameters are changed; omitted ones keep their current values. The client automatically reconnects after any update.

Environment Variables

The following environment variables can be set in your .env file for the MCP server:

VariableDefaultDescription
HUMMINGBOT_API_URLhttp://localhost:8000Initial default API server URL (used only on first run)
HUMMINGBOT_USERNAMEadminInitial username (used only on first run)
HUMMINGBOT_PASSWORDadminInitial password (used only on first run)
HUMMINGBOT_TIMEOUT30.0Connection timeout in seconds
HUMMINGBOT_MAX_RETRIES3Maximum number of retry attempts
HUMMINGBOT_RETRY_DELAY2.0Delay between retries in seconds
HUMMINGBOT_LOG_LEVELINFOLogging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)

Note: After initial setup, use the configure_server tool to update the server connection. Environment variables are only used to create the initial default configuration.

Requirements

  • Python 3.11+
  • Running Hummingbot API server
  • Valid Hummingbot API credentials

Available Tools

The MCP server provides tools for:

Server Management

  • configure_server: View or update the active Hummingbot API server connection
    • No parameters: show current server config
    • Any parameters: update and reconnect
    • Configuration persists in ~/.hummingbot_mcp/server.yml

Trading & Account Management

  • Account management and connector setup
  • Portfolio balances and distribution
  • Order placement and management
  • Position management
  • Market data (prices, order books, candles)
  • Funding rates
  • Bot deployment and management
  • Controller configuration

Development

To run the server in development mode:

bash
uv run main.py

To run tests:

bash
uv run pytest

Troubleshooting

The MCP server now provides comprehensive error messages to help diagnose connection and authentication issues:

Connection Errors

If you see error messages like:

  • ❌ Cannot reach Hummingbot API at <url> - The API server is not running or not accessible
  • ❌ Authentication failed when connecting to Hummingbot API - Incorrect username or password
  • ❌ Failed to connect to Hummingbot API - Generic connection failure

The error messages will include:

  • The exact URL being used
  • Your configured username (password is masked)
  • Specific suggestions on how to fix the issue
  • References to tools like configure_server

Common Solutions

  1. API Not Running:

    • Ensure your Hummingbot API server is running
    • Verify the API is accessible at the configured URL
  2. Wrong Credentials:

    • Use configure_server tool to update server credentials
    • Or check your .env file configuration
  3. Wrong URL:

    • Use configure_server tool to update the server URL
    • For Docker on Mac/Windows, use host.docker.internal instead of localhost
  4. Docker Network Issues:

    • On Linux, use --network host in your Docker configuration
    • On Mac/Windows, use host.docker.internal:8000 as the API URL

Error Prevention

The MCP server will:

  • Not retry on authentication failures (401 errors) - it will immediately tell you the credentials are wrong
  • Retry on connection failures with helpful messages about what might be wrong
  • Provide context about whether you're running in Docker and suggest appropriate fixes
  • Guide you to the right tools (configure_server) to fix issues

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "hummingbot-mcp": {
      "command": "uvx",
      "args": [
        "hummingbot_mcp"
      ]
    }
  }
}

Use MCP Hummingbot 服务器 MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCP Hummingbot 服务器 is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MCP Hummingbot 服务器 as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MCP Hummingbot 服务器 MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "hummingbot-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "hummingbot_mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MCP Hummingbot 服务器 MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MCP Hummingbot 服务器 MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP Hummingbot 服务器 to help me with this task?
MCP Hummingbot 服务器
Sure. I read it.
Here is what I found using MCP Hummingbot 服务器.

Frequently asked questions

What is the MCP Hummingbot 服务器 MCP server used for?

MCP Hummingbot 服务器 is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCP Hummingbot 服务器 MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCP Hummingbot 服务器 with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCP Hummingbot 服务器 MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCP Hummingbot 服务器 connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCP Hummingbot 服务器 MCP to TypingMind?

MCP Hummingbot 服务器 runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does MCP Hummingbot 服务器 MCP provide in TypingMind?

MCP Hummingbot 服务器 exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCP Hummingbot 服务器 MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCP Hummingbot 服务器 requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇