hummingbot-mcp
drasticstatic ワーキングコピー — Fortuna取引システムで使用されています。これはhummingbot/mcpのローカルクローンから作成された独立したリポジトリです。アップストリームは比較のためにリモートとして追跡されており、変更は適用前にレビューされます。
# Check for upstream updates (review before applying) git fetch upstream && git log upstream/main --oneline
MCP Hummingbotサーバー
ClaudeおよびGemini CLIがHummingbotと連携し、複数の取引所にわたる自動暗号資産取引を可能にするMCP(Model Context Protocol)サーバーです。
インストールと設定
オプション1: uvを使用する(開発に推奨)
uvをインストールする(まだインストールされていない場合):
curl -LsSf https://astral.sh/uv/install.sh | shクローンを作成し、依存関係をインストールする:
git clone https://github.com/hummingbot/mcp cd mcp uv sync.envファイルを作成する:
cp .env.example .env.envファイルを編集し、HummingbotのAPI認証情報を入力します:
HUMMINGBOT_API_URL=http://localhost:8000 HUMMINGBOT_USERNAME=admin HUMMINGBOT_PASSWORD=adminClaude CodeまたはGemini CLIで設定する:
{ "mcpServers": { "hummingbot-mcp": { "type": "stdio", "command": "uv", "args": [ "--directory", "/path/to/mcp", "run", "main.py" ] } } }注意:
/path/to/mcpは、実際のMCPディレクトリへのパスに置き換えてください。
オプション2: Dockerを使用する(本番環境に推奨)
.envファイルを作成する:
touch .env.envファイルを編集し、HummingbotのAPI認証情報を入力します:
HUMMINGBOT_API_URL=http://localhost:8000 HUMMINGBOT_USERNAME=admin HUMMINGBOT_PASSWORD=admin重要: DockerでMCPサーバーを実行し、ホスト上のHummingbot APIに接続する場合:
Linux: コンテナが
localhost:8000にアクセスできるように--network hostを使用します(下記参照)Mac/Windows:
HUMMINGBOT_API_URLをhttp://host.docker.internal:8000に変更します
Dockerイメージをプルする:
docker pull hummingbot/hummingbot-mcp:latestClaude CodeまたはGemini CLIで設定する:
Linuxの場合(--network hostを使用):
{ "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" ] } } }Mac/Windowsの場合:
{ "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" ] } } }(
.envファイルでHUMMINGBOT_API_URL=http://host.docker.internal:8000を設定することを忘れないでください)注意:
/path/to/mcpは、実際のMCPディレクトリへのパスに置き換えてください。
Docker Composeによるクラウドデプロイ
Hummingbot APIとMCPサーバーの両方を同じサーバーで実行するクラウドデプロイの場合:
.envファイルを作成する:
touch .env.envファイルを編集し、HummingbotのAPI認証情報を入力します:
HUMMINGBOT_API_URL=http://localhost:8000 HUMMINGBOT_USERNAME=admin HUMMINGBOT_PASSWORD=admindocker-compose.ymlを作成する:
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: { }デプロイする:
docker compose up -d既存のコンテナに接続するようにClaude CodeまたはGemini CLIを設定する:
{ "mcpServers": { "hummingbot-mcp": { "type": "stdio", "command": "docker", "args": [ "exec", "-i", "hummingbot-mcp", "uv", "run", "main.py" ] } } }注意:
hummingbot-mcpは実際のコンテナ名に置き換えてください。コンテナ名は以下を実行して確認できます:docker ps
Related MCP server: ai-trader
サーバー設定
初回実行時、サーバーは環境変数からデフォルト設定を作成します(またはデフォルトの認証情報で http://localhost:8000 を使用します)。設定は ~/.hummingbot_mcp/server.yml に保存されます。
configure_serverツールの使用
# 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"
)指定されたパラメータのみが変更され、省略されたパラメータは現在の値を保持します。クライアントは更新後に自動的に再接続します。
環境変数
MCPサーバーの .env ファイルには、以下の環境変数を設定できます:
変数 | デフォルト | 説明 |
|
| 初期のデフォルトAPIサーバーURL(初回実行時のみ使用) |
|
| 初期のユーザー名(初回実行時のみ使用) |
|
| 初期のパスワード(初回実行時のみ使用) |
|
| 接続タイムアウト(秒) |
|
| 最大再試行回数 |
|
| 再試行間隔(秒) |
|
| ログレベル(DEBUG, INFO, WARNING, ERROR, CRITICAL) |
注意: 初期設定後、サーバー接続を更新するには configure_server ツールを使用してください。環境変数は初期のデフォルト設定を作成するためにのみ使用されます。
要件
Python 3.11以上
実行中のHummingbot APIサーバー
有効なHummingbot API認証情報
利用可能なツール
MCPサーバーは以下のためのツールを提供します:
サーバー管理
configure_server: アクティブなHummingbot APIサーバー接続の表示または更新
パラメータなし: 現在のサーバー設定を表示
パラメータあり: 更新して再接続
設定は
~/.hummingbot_mcp/server.ymlに永続化されます
取引およびアカウント管理
アカウント管理とコネクタ設定
ポートフォリオの残高と配分
注文の発注と管理
ポジション管理
市場データ(価格、オーダーブック、ローソク足)
ファンディングレート
ボットのデプロイと管理
コントローラー設定
開発
開発モードでサーバーを実行するには:
uv run main.pyテストを実行するには:
uv run pytestトラブルシューティング
MCPサーバーは、接続や認証の問題を診断するために包括的なエラーメッセージを提供するようになりました:
接続エラー
以下のようなエラーメッセージが表示された場合:
❌ Cannot reach Hummingbot API at <url>- APIサーバーが実行されていないか、アクセスできません❌ Authentication failed when connecting to Hummingbot API- ユーザー名またはパスワードが正しくありません❌ Failed to connect to Hummingbot API- 一般的な接続失敗
エラーメッセージには以下が含まれます:
使用されている正確なURL
設定されたユーザー名(パスワードはマスクされます)
問題を解決するための具体的な提案
configure_serverなどのツールへの参照
一般的な解決策
APIが実行されていない:
Hummingbot APIサーバーが実行されていることを確認してください
APIが設定されたURLでアクセス可能であることを確認してください
認証情報が間違っている:
configure_serverツールを使用してサーバーの認証情報を更新してくださいまたは
.envファイルの設定を確認してください
URLが間違っている:
configure_serverツールを使用してサーバーURLを更新してくださいMac/Windows上のDockerの場合は、
localhostの代わりにhost.docker.internalを使用してください
Dockerネットワークの問題:
Linuxでは、Docker設定で
--network hostを使用してくださいMac/Windowsでは、API URLとして
host.docker.internal:8000を使用してください
エラー防止
MCPサーバーは以下の動作を行います:
認証失敗(401エラー)時には再試行しません - 認証情報が間違っていることを即座に通知します
接続失敗時には、何が問題であるかについての役立つメッセージとともに再試行します
Dockerで実行しているかどうかについてのコンテキストを提供し、適切な修正を提案します
問題を解決するために適切なツール(
configure_server)へ案内します
Maintenance
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
AlicenseAqualityDmaintenanceAn MCP server that enables Claude and Gemini CLI to interact with Hummingbot for automated cryptocurrency trading across multiple exchanges.1159Apache 2.0- Alicense-qualityDmaintenanceEnables AI assistants like Claude to run backtests, fetch market data, list strategies, and analyze trading algorithms via natural language.995GPL 3.0
- Alicense-qualityDmaintenanceEnables Claude Desktop to interact directly with the Hyperliquid decentralized exchange, allowing natural language trading, market analysis, and strategy automation.1MIT

TradeStaq MCPofficial
AlicenseBqualityBmaintenanceProvides 31 AI-powered crypto trading tools for Claude, Cursor, and any MCP client, enabling strategy creation, backtesting, bot deployment, copy trading, and portfolio management across multiple exchanges.3454MIT
Related MCP Connectors
Trade Robinhood through natural language in Claude Code.
Trade, monitor portfolios, and build Coinrule strategies by chat.
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/drasticstatic/hummingbot-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server