Skip to content

Troubleshooting

  1. Node.js 20+ (node --version)
  2. Config present (ls hatago.config.json) for STDIO mode
  3. Run with --verbose and read first error

Symptoms

hatago: command not found / npx: not found

Causes:

  • Global install missing, or PATH not set

Fix:

  • Use npx @himorishige/hatago-mcp-hub ... or add global bin to PATH

Symptoms

ENOENT: hatago-config.json

Fix:

Terminal window
npx @himorishige/hatago-mcp-hub init
hatago serve --stdio --config ./hatago.config.json

Prevention: keep an example (hatago-config.example.json) and document copying.

Fix: validate with cat hatago.config.json | jq . and fix syntax.

Symptoms

${VAR} not found

Fix: export vars or add defaults (${VAR:-default}).

Causes: wrong command, missing deps, permissions.

Fix: run the server directly (e.g. npx @modelcontextprotocol/server-filesystem .) and read its logs.

Symptoms

ECONNREFUSED / timeout

Fixes:

  • Verify URL and DNS
  • Check firewall/proxy
  • Increase timeouts on the remote side if applicable

Fixes:

  • Ensure Authorization header present
  • Refresh token / check scopes

Fixes:

  • Confirm child server is running
  • Check notifications/tools/list_changed support and wait a moment
  • Read internal resource hatago://servers to confirm connected servers

Use --verbose for debug, or --quiet to reduce noise.

Change port: hatago serve --http --port 3536.

LayerSymptomCommandFirst action
1. Startupcommand not foundwhich hatagoUse npx or fix PATH
2. ConfigInvalid config`cat configjq .`
3. Env${VAR} not foundecho $VARExport or set default
4. Spawnspawn ENOENTwhich npxUse absolute path
5. NetworkECONNREFUSEDcurl -I <url>Verify URL/firewall
6. Auth401/403echo $TOKENRefresh token/scopes
7. TimeoutRequest timeouttime curl <url>Increase timeout
Terminal window
hatago serve --verbose
hatago serve --tags development