Skip to content

CLI Reference

Hatago MCP Hub exposes the hatago command.

Terminal window
# npx (recommended)
npx @himorishige/hatago-mcp-hub --version
# or global
npm install -g @himorishige/hatago-mcp-hub

Create hatago.config.json.

Terminal window
hatago init # interactive
hatago init --mode stdio # STDIO template
hatago init --mode http # HTTP template
hatago init --config my.json # custom path

Options: --config, --force, --mode <stdio|http>

Start the hub.

Terminal window
hatago serve --stdio --config ./hatago.config.json # STDIO
hatago serve --http # HTTP
# Hot reload using external tools (v0.0.14+)
npx nodemon --exec "hatago serve" --watch hatago.config.json
hatago serve --tags dev,api # tag filter
hatago serve --verbose # verbose logs

Options: --stdio|--http, --config, --host, --port, --tags, --verbose|--quiet

Built-in config watching was removed in v0.0.14 for performance improvements. Use external tools for auto-reload:

Terminal window
# Using nodemon
npx nodemon --exec "hatago serve" --watch hatago.config.json
# Using PM2
pm2 start "hatago serve" --watch hatago.config.json

Claude Code .mcp.json:

{
"mcpServers": {
"hatago": {
"command": "npx",
"args": ["@himorishige/hatago-mcp-hub", "serve", "--stdio", "--config", "./hatago.config.json"]
}
}
}

Codex CLI ~/.codex/config.toml:

[mcp_servers.hatago]
command = "npx"
args = ["-y", "@himorishige/hatago-mcp-hub", "serve", "--stdio", "--config", "./hatago.config.json"]

See also: Config Reference, Remote Servers, Tag Filtering.