
Hatago Mcp Hub
io.github.himorishige由 GitHub 帳號 himorishige 發布v0.0.16更新於 Nov 10, 2026
Unified MCP Hub for managing multiple Model Context Protocol servers
概覽
一個本機中樞,把多個 MCP 伺服器聚合到單一端點,讓助理透過單一連線使用它們的全部工具。
- 可以做什麼
- Hatago MCP Hub 以本機行程執行,可同時連接多個 MCP 伺服器,並透過統一介面提供。它支援 STDIO、HTTP 與 SSE 傳輸,可透過 npx 啟動 npm 發佈的伺服器,也能代理遠端 HTTP MCP 伺服器。它提供以標籤為基礎的篩選、設定繼承、環境變數展開,以及列出已連線伺服器狀態與工具的內建資源。
- 適用情境
- 當你已使用多個 MCP 伺服器,希望用一份設定檔統一管理,而不必在 Claude Code、Codex CLI、Cursor、Windsurf 或 VS Code 中逐一註冊時適用。也適合用標籤與共用基礎設定,依環境或團隊分組管理伺服器。
- 執行需求
- 需要 Node.js 與 npm,以便透過 npx 或全域安裝執行此套件。STDIO 模式必須提供設定檔,HTTP 模式可無設定啟動。下游伺服器的憑證透過設定中的環境變數或標頭提供,連接遠端伺服器需要網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Hatago Mcp Hub,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
English | 日本語
🏮 Hatago MCP Hub
[npm] [GitHub Release] [Ask DeepWiki]
Hatago (旅籠) — A relay point connecting modern AI tools with MCP servers.
Overview
Hatago MCP Hub is a lightweight hub that unifies access to multiple MCP (Model Context Protocol) servers from tools like Claude Code, Codex CLI, Cursor, Windsurf, and VS Code.
Documentation
- Docs index:
docs/README.md - Canonical CLI & Hub guide:
packages/mcp-hub/README.md - Public docs site (JA default): https://hatago.dev/ja/ — English: https://hatago.dev/en/
Dev.to: Getting Started with Multi-MCP Using Hatago MCP Hub — One Config to Connect Them All
✨ Features
🚀 Performance (v0.0.14)
- 8.44x Faster Startup - 85.66ms → 10.14ms
- 17% Smaller Package - 1.04MB → 854KB
- Simplified Architecture - Direct server management without abstraction layers
🎯 Simple & Lightweight
- Zero Configuration Start (HTTP mode) -
npx @himorishige/hatago-mcp-hub serve --http - Non-invasive to Existing Projects - Doesn't pollute your project directory
🔌 Rich Connectivity
- Multi-Transport Support - STDIO / HTTP / SSE
- Remote MCP Proxy - Transparent connection to HTTP-based MCP servers
- NPX Server Integration - Dynamic management of npm package MCP servers
🏮 Additional Features
Configuration Updates
- Manual Restart Required - Configuration changes require server restart
- Alternative Solutions:
- Use process managers (PM2, nodemon) for auto-restart
- Example:
nodemon --exec "hatago serve --http" --watch hatago.config.json - Or with PM2:
pm2 start "hatago serve" --watch hatago.config.json
- Dynamic Tool List Updates - Supports
notifications/tools/list_changednotification
Progress Notification Forwarding
- Child Server Notification Forwarding - Transparent forwarding of
notifications/progress - Long-running Operation Support - Real-time progress updates
- Local/Remote Support - Works with many MCP server types
Built-in Internal Resource
hatago://servers- JSON snapshot of currently connected servers (id, status, type, tools, resources, prompts)
Enhanced Features
- Environment Variable Expansion - Claude Code compatible
${VAR}and${VAR:-default}syntax - Configuration Validation - Type-safe configuration with Zod schemas
- Tag-based Server Filtering - Group and filter servers using tags
- Configuration Inheritance - Extend base configurations with
extendsfield for DRY principle
Minimal Hub Interface (IHub)
External packages (server/test-utils) use a thin IHub interface to avoid tight coupling with the concrete class.
Extracted modules for thin hub:
- RPC handlers:
packages/hub/src/rpc/handlers.ts - HTTP handler:
packages/hub/src/http/handler.ts
📁 Project Structure
📦 Installation
Quick Start (No Installation)
Global Installation
As Project Dependency
🚀 Usage
Claude Code, Codex CLI, Gemini CLI
STDIO Mode (Recommended)
Claude Code / Gemini CLI
Add to .mcp.json:
Codex CLI
Add to ~/.codex/config.toml:
HTTP Mode
Claude Code / Gemini CLI
Add to .mcp.json:
Codex CLI
Add to ~/.codex/config.toml:
MCP Inspector
For testing and debugging:
Visit MCP Inspector
Metrics (opt-in)
Enable lightweight in-memory metrics and expose an HTTP endpoint:
Notes:
- Metrics are disabled by default and add near-zero overhead when off.
- JSON logs are available when
HATAGO_LOG=json(respectingHATAGO_LOG_LEVEL).
⚙️ Configuration
Basic Configuration
Create hatago.config.json:
Remote Server Configuration
Configuration Strategies
Strategy 1: Tag-based Filtering
Group servers with tags in a single configuration file:
Start with specific tags:
Strategy 2: Configuration Inheritance
Split configurations by environment using the extends field:
Base configuration (~/.hatago/base.config.json):
Work configuration (./work.config.json):
Features:
- Inheritance: Child configs override parent values
- Multiple parents:
"extends": ["./base1.json", "./base2.json"] - Path resolution: Supports
~, relative, and absolute paths - Environment deletion: Use
nullto remove inherited env vars
Choosing a Strategy
Environment Variable Expansion
Supports Claude Code compatible syntax:
${VAR}- Expands to the value of VAR (error if undefined)${VAR:-default}- Uses default value if VAR is undefined
📋 Commands
hatago init
Create configuration file with interactive setup:
hatago serve
Start MCP Hub server:
Loading Environment Variables from Files
Use --env-file <path...> to load variables before config parsing. This helps resolve ${VAR} and ${VAR:-default} placeholders without exporting variables globally.
- Format:
KEY=VALUE,export KEY=VALUE,#comments, blank lines. - Quotes are stripped; supports escaped
\n,\r,\t. - Paths: relative to CWD,
~/expanded to home. - Precedence: files are applied in the given order; existing
process.envkeys are preserved unless--env-overrideis provided.
✨ Performance Improvements (v0.0.14)
- 8.44x faster startup: 85.66ms → 10.14ms
- 17% smaller package: 1.04MB → 854KB (181KB reduction)
- Simplified architecture: Removed EnhancedHub and management layers
- Trade-off: Built-in config watching removed (use nodemon/PM2 instead)
🔧 Advanced Usage
Programmatic API
Creating Custom Hub
🏗️ Architecture
Supported MCP Servers
Local Servers
- Any executable MCP server
- Python, Node.js, or binary servers
- Custom scripts with MCP protocol
NPX Servers
@modelcontextprotocol/server-filesystem@modelcontextprotocol/server-github@modelcontextprotocol/server-memory- Any npm-published MCP server
Remote Servers
- DeepWiki MCP (
https://mcp.deepwiki.com/sse) - Any HTTP-based MCP endpoint
- Custom API servers with MCP protocol
🐛 Troubleshooting
Common Issues
-
"No onNotification handler set" warning
- Normal in HTTP mode with StreamableHTTP transport
- Hub handles notifications appropriately
-
Server connection failures
- Verify environment variables are set
- Check remote server URLs are accessible
- Use
--verboseflag for detailed logs
-
Tool name collisions
- Hatago automatically prefixes with server ID
- Original names preserved in hub
Debug Mode
📚 Documentation
🤝 Contributing
Contributions are welcome! Please see our GitHub repository for more information.
📄 License
MIT License
🔗 Links
🙏 Credits
Built with the Hono and the Model Context Protocol SDK by Anthropic.
來源:README.md,提交 fcb2bef
工具
0版本歷史
1- v0.0.16最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分