設定リファレンス
設定リファレンス
Section titled “設定リファレンス”Hatago MCP Hubの設定ファイル(hatago.config.json)の詳細リファレンスです。
{ "$schema": "https://raw.githubusercontent.com/himorishige/hatago-mcp-hub/main/schemas/config.schema.json", "version": 1, "logLevel": "info", "mcpServers": { // サーバー定義 }}version
Section titled “version”- 型:
number - 必須: はい
- 説明: 設定ファイルのバージョン(現在は1)
logLevel
Section titled “logLevel”- 型:
"debug" | "info" | "warn" | "error" - デフォルト:
"info" - 説明: ログレベルの設定
mcpServers
Section titled “mcpServers”- 型:
object - 必須: はい
- 説明: MCPサーバーの定義
サーバー設定
Section titled “サーバー設定”ローカルサーバー
Section titled “ローカルサーバー”{ "server-id": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "."], "env": { "KEY": "value" }, "cwd": "./path", "disabled": false, "tags": ["dev", "local"] }}リモートサーバー
Section titled “リモートサーバー”{ "server-id": { "url": "https://api.example.com/mcp", "type": "http", "headers": { "Authorization": "Bearer ${TOKEN}" }, "disabled": false, "tags": ["production"] }}環境変数の展開
Section titled “環境変数の展開”${VAR}- 環境変数VARの値に展開(未定義時エラー)${VAR:-default}- 環境変数VARの値、未定義時はdefault
タグベースフィルタリング
Section titled “タグベースフィルタリング”hatago serve --tags dev,test指定したタグを持つサーバーのみ起動します。
設定の自動リロード
Section titled “設定の自動リロード”組み込みの監視は簡素化のため削除した。自動リロードが必要なら外部ツールを使う。
# nodemon を使うnpx nodemon --exec "hatago serve --http" --watch hatago.config.json
# PM2 を使うpm2 start "hatago serve --http" --name hatago --watch hatago.config.json