
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 分