hub-bus
An MCP broker that provides local communication between Manager and Lead agents for message routing and coordination.
README
@claude-max-agent/hub-bus
hub-bus MCP ブローカー — claude-agent-hub から切り出した独立パッケージ。
agent-herd および claude-agent-hub の両プロジェクトが共有する MCP(Model Context Protocol)ブローカー。 Manager ↔ Lead 間のローカル通信路として機能する。
アーキテクチャ
Manager (Claude Code)
├── hub-claude-transport.ts ← MCP stdio サーバー (Claude 用)
│ └── hub-bus-broker.ts ← 独立 HTTP ブローカーデーモン (:9100)
│ └── hub-core.ts ← コアロジック (inbox / peer registry)
└── hub-codex-transport.ts ← Codex 向け pull 型 inbox
Lead (Claude Code)
└── hub-claude-transport.ts ← MCP stdio サーバー (:9101, :9102, ...)
ファイル構成
| ファイル | 役割 |
|---|---|
hub-bus.ts |
エントリーポイント(transport 分岐) |
hub-bus-broker.ts |
HTTP ブローカーデーモン(per-agent / central モード) |
hub-core.ts |
コアロジック・型定義・設定パーサー |
hub-claude-transport.ts |
Claude Code 向け MCP stdio サーバー |
hub-codex-transport.ts |
Codex 向け pull 型 inbox MCP サーバー |
hub-notification.ts |
Claude channel 通知ルーティング |
使い方
bun 直接実行
bun hub-bus.ts
MCP サーバーとして設定(.mcp.json)
{
"mcpServers": {
"hub-bus": {
"command": "bun",
"args": ["/path/to/hub-bus.ts"],
"env": {
"HUB_BUS_PORT": "9100",
"HUB_BUS_ROLE": "manager",
"HUB_BUS_CENTRAL": "true",
"HUB_BUS_BROKER_URL": "http://127.0.0.1:9100",
"HUB_BUS_AGENT_ID": "manager"
}
}
}
}
パッケージとして依存追加
# bun の場合
bun add github:claude-max-agent/hub-bus
環境変数
| 変数 | 説明 | 既定値 |
|---|---|---|
HUB_BUS_PORT |
ブローカーポート | 9100 |
HUB_BUS_ROLE |
エージェント役割 (manager/lead/resident) |
lead |
HUB_BUS_TRANSPORT |
トランスポート種別 (claude/codex) |
claude |
HUB_BUS_TEAM_ID |
Lead チーム識別子 | `` |
HUB_BUS_CENTRAL |
セントラルモード有効化 | false |
HUB_BUS_BROKER_URL |
セントラルブローカー URL | `` |
HUB_BUS_AGENT_ID |
エージェント識別子 | `` |
HUB_BUS_PEERS |
peer URL リスト(カンマ区切り) | `` |
HUB_BUS_EXTRA_SENDERS |
追加送信者許可リスト | `` |
HUB_BUS_STATE_DIR |
状態ファイル保存ディレクトリ | ~/.hub-bus |
テスト
bun test
ライセンス
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.