Skip to content

Config Inheritance

Use extends to compose configs and keep them DRY.

{
"extends": ["~/.hatago/base.json", "./team.json"],
"mcpServers": {
"local": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
}
}
}
  • Multiple parents are supported: "extends": ["./base1.json", "./base2.json"]
  • Paths support ~ (home), relative, and absolute
  • Deep merge: child values override parent values
  • Remove inherited env vars by setting null
{
"extends": "~/.hatago/global.json",
"mcpServers": {
"github": {
"env": {
"GITHUB_TOKEN": "${WORK_GITHUB_TOKEN}",
"DEBUG": null
}
}
}
}
Terminal window
hatago serve --stdio --config ./hatago.config.json --verbose

Break the cycle and ensure each file appears once in the chain.

Check path correctness, ~ expansion, and relative path base (current file).

Remember child overrides parent. Inspect the effective config with --verbose and review logs.