
Hummingbot
io.github.hummingbot由 GitHub 账号 hummingbot 发布v0.1.0更新于 Oct 24, 2026
MCP server exposing Hummingbot API for automated multi-exchange trading
概览
将助手连接到 Hummingbot API 服务器,用于跨交易所管理加密货币交易账户、订单、持仓、行情数据与机器人。
- 可以做什么
- 管理 API 连接:查看或更新 Hummingbot API 服务器地址与凭据并重新连接。
- 管理账户与交易所连接器配置。
- 查询投资组合余额与资产分布。
- 下单并管理订单,管理持仓。
- 读取行情数据,如价格、订单簿、K 线与资金费率。
- 部署和管理交易机器人并配置其控制器。
- 适用场景
- 适合已自行运行 Hummingbot API 服务器、希望助手在对话中查看投资组合、行情与机器人状态,或跨多个交易所下单和管理持仓的场景。
- 运行要求
- 需要本地运行环境:Python 3.11+ 与 uv,或使用已发布的 Docker 镜像。需要可访问的 Hummingbot API 服务器(HUMMINGBOT_API_URL)以及有效的 HUMMINGBOT_USERNAME 和 HUMMINGBOT_PASSWORD。可选变量可调整超时、重试次数、重试间隔与日志级别。在 Mac/Windows 的 Docker 中需使用 host.docker.internal 作为 API 地址。
安装
在 SourceWeft 中
- 打开 控制台中的 Hummingbot,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
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)
-
Install uv (if not already installed):
-
Clone and install dependencies:
-
Create a .env file:
-
Edit the .env file with your Hummingbot API credentials:
-
Configure in Claude Code or Gemini CLI:
Note: Make sure to replace
/path/to/mcpwith the actual path to your MCP directory.
Option 2: Using Docker (Recommended for Production)
-
Create a .env file:
-
Edit the .env file with your Hummingbot API credentials:
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 accesslocalhost:8000 - Mac/Windows: Change
HUMMINGBOT_API_URLtohttp://host.docker.internal:8000
- Linux: Use
-
Pull the Docker image:
-
Configure in Claude Code or Gemini CLI:
For Linux (using --network host):
For Mac/Windows:
(Remember to set
HUMMINGBOT_API_URL=http://host.docker.internal:8000in your.envfile)Note: Make sure to replace
/path/to/mcpwith 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:
-
Create a .env file:
-
Edit the .env file with your Hummingbot API credentials:
-
Create a docker-compose.yml:
-
Deploy:
-
Configure in Claude Code or Gemini CLI to connect to existing container:
Note: Replace
hummingbot-mcpwith your actual container name. You can find the container name by running:
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
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:
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:
To run tests:
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
-
API Not Running:
- Ensure your Hummingbot API server is running
- Verify the API is accessible at the configured URL
-
Wrong Credentials:
- Use
configure_servertool to update server credentials - Or check your
.envfile configuration
- Use
-
Wrong URL:
- Use
configure_servertool to update the server URL - For Docker on Mac/Windows, use
host.docker.internalinstead oflocalhost
- Use
-
Docker Network Issues:
- On Linux, use
--network hostin your Docker configuration - On Mac/Windows, use
host.docker.internal:8000as the API URL
- On Linux, use
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
来源:README.md,提交 836f935
工具
0版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分