hatago-mcp-hub — Claude Code MCP server: one hub for many servers
Puts several MCP servers behind a single endpoint. You describe them in hatago.config.json, and your editor talks to the hub instead of each server on its own.
claude mcp add hatago-mcp-hub -- npx -y @himorishige/hatago-mcp-hubWhat hatago-mcp-hub does
The hub spawns child MCP servers and exposes their tools to the client. Transports cover STDIO, HTTP and SSE, plus proxying to remote HTTP servers and managing npm packages through npx. Running npx @himorishige/hatago-mcp-hub serve --http starts a demo without any config file, on port 3535.
The hatago CLI has init and serve commands. Configs are validated against Zod schemas, ${VAR} and ${VAR:-default} expansion works, servers can be grouped by tags, and an extends field lets one config build on another. The hatago://servers resource returns a JSON snapshot of connected servers with status, tools and prompts. Progress notifications from child servers are passed through, so long operations stay visible.
Config edits apply only after a restart. The README points to nodemon --exec "hatago serve --http" --watch hatago.config.json or PM2 with --watch if you want that automated. STDIO mode needs --config with a file path; without it the process will not start. Metrics stay off unless you set HATAGO_METRICS=1, then they appear at /metrics.
What it helps with
- wire up many MCP servers through one config instead of editing each client
- proxy a remote HTTP MCP server into a client that only speaks STDIO
- see every connected server and its tools in one JSON snapshot
- pass environment variables with fallback defaults in the config
- run an MCP hub for testing without a global install
Example prompts for the agent
- Add the filesystem server to
hatago.config.jsonand list the tools it exposes - Start the hub over HTTP on port 3535 and show me what
hatago://serversreturns - Proxy a remote MCP server through the hub config and name its tools
How to install hatago-mcp-hub
Platform CLI
claude mcp add hatago-mcp-hub -- npx -y @himorishige/hatago-mcp-hubPlatform CLI
codex mcp add hatago-mcp-hub -- npx -y @himorishige/hatago-mcp-hubConfig file
{
"mcpServers": {
"hatago-mcp-hub": {
"command": "npx",
"args": [
"-y",
"@himorishige/hatago-mcp-hub"
]
}
}
}Config file
{
"servers": {
"hatago-mcp-hub": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@himorishige/hatago-mcp-hub"
]
}
}
}Platform CLI
gemini mcp add hatago-mcp-hub npx -y @himorishige/hatago-mcp-hubStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about hatago-mcp-hub
How do I install hatago-mcp-hub in Claude Code?
Run claude mcp add hatago-mcp-hub -- npx -y @himorishige/hatago-mcp-hub. Then create a config with npx @himorishige/hatago-mcp-hub init.
What does hatago-mcp-hub do?
It brings multiple MCP servers under one endpoint and forwards their tools to the client. Your editor connects to the hub rather than to each server separately.
Does STDIO mode need a config file?
Yes. --stdio requires --config with a path such as ./hatago.config.json. HTTP mode runs without a config for demo and development work.