Repository navigation
feat: render MCP servers declared once in the source - #268
Conversation
Read MCP servers from the optional source file mcp_servers.json, which the Home Manager option mcpServers can override by name, and render them for Claude Code as a skills-directory plugin and for Codex as the mcp_servers table of config.toml. Claude Code loads the plugin in place and never writes to it, so no sync races the running agent for ~/.claude.json. Codex tracks the servers in its existing sidecar, so servers the user or `codex mcp add` wrote stay. generate-skills now renders a provider's own skills directory, so the plugin reaches Claude only. Refs #267 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add ADR-0033 for where each provider's servers are rendered and why servers the user added survive, and document the source file shape, the Home Manager option, and how to supply a credential. Refs #267 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Review summaryNo blocking findings (P0/P1: 0). No P2/P3 findings either. What I checked:
Not verified here: the x86_64-linux flake check (left to CI) and the runtime behavior of Claude Code's skills-directory plugins (the PR reports a manual test). 🤖 Generated with Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70c29a00fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The Home Manager merge rebuilt the file from its `servers` key, so a misspelled root key silently became an empty server map instead of failing as it does outside Home Manager. Merge into `servers` and keep every other root key, so the harness parser still rejects it. Refs #267 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
|
Review summary (read-only): no findings. Checked:
Blocking findings (P0/P1): 0. 🤖 Generated with Claude Code |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Prefix the MCP server parse, Codex table, and skills plugin errors with the operation that failed, and match the ownership and MCP variants exhaustively in the registry tests. Refs #267 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
Review summaryNo P0–P3 findings. I didn't post any inline comments. What I checked:
Note: Codex sync replaces each harness-owned 🤖 Generated with Claude Code |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Devin and Antigravity keep servers in a file of their own that their CLIs also write, so the file is a second synced config of the provider, synced by `sync-config --provider <id> --file mcp-servers` and on Home Manager activation; its tracked `mcpServers` mapping keeps servers added there. Hermes tracks `mcp_servers` in the config it already syncs. Each provider declares the form it reads a remote server in. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Review summaryBlocking findings (P0/P1): none. No inline comments either: nothing reached the bar for a finding. What I checked:
Non-blocking notes:
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Automated review: no findings at P0–P3. What I checked:
Tests cover parsing, the form each provider gets, keeping user-added servers and dropping stale ones (with and without a sidecar), the sidecar-uniqueness invariant, and the golden output. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Review summary (read-only): no findings. What I checked:
No P0 or P1 issues. 🤖 Generated with Claude Code |
The sync declaration names the mapping and the form of a remote server, and the engine derives the tracked claim and the key exclusion from it, so the MCP spec, the tracked keys, and the key claims cannot disagree. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The link field named a provider id that always equals the provider that owns the link, so it becomes a flag and the module passes the provider's own id to generate-skills. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
`mcp` read as "no MCP" for Codex and Hermes, whose config holds the servers. The field is now `mcp_outside_config`, and `ProviderSpec::mcp_destination` tells every provider's destination, including none, from it and the config's sync declaration. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Automated review (read-only): no P0–P3 findings. What I checked:
I didn't run the tests in this environment, and I didn't check that Devin, Hermes, or Antigravity actually load the files on real installs. The PR also lists that last part as unchecked. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Automated review: no blocking findings (no P0/P1, no P2/P3 posted). What I checked:
The tests cover the changed behaviour: goldens, sync preservation and removal, the registry invariants, and the HM check. As the PR notes, nobody has yet confirmed on real installs that Devin, Hermes and Antigravity load the generated files. |
`ProviderSpec::mcp` is `Option<McpSpec>`, a registration (in the config, a file of its own, or the skills-directory plugin) and the form of a remote server. The config sync takes the tracked mapping from it, so `ConfigSync` holds no MCP and servers in both places cannot be declared. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Automated review summary: no findings I reviewed the MCP server pipeline end to end and found no correctness, security, or test-coverage problems that I could confirm.
Blocking findings (P0/P1): 0 🤖 Generated with Claude Code |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Review summary (read-only)No blocking findings (0 × P0/P1). I didn't post any inline comments. What I checked:
Not covered: Devin, Hermes and Antigravity actually loading the generated files (the PR also lists this as unverified). |
🤖 I have created a release *beep* *boop* --- ## [0.10.0](agent-harness-v0.9.16...agent-harness-v0.10.0) (2026-11-29) ### ⚠ BREAKING CHANGES * remove the generated protection of installed files ([#265](#265)) * remove the agent GitHub token ([#264](#264)) * **pi:** remove the srt sandbox extension ([#263](#263)) ### Features * render MCP servers declared once in the source ([#268](#268)) ([2eb9fe7](2eb9fe7)) ### Code Refactoring * **pi:** remove the srt sandbox extension ([#263](#263)) ([d1f8a11](d1f8a11)) * remove the agent GitHub token ([#264](#264)) ([ea5741d](ea5741d)) * remove the generated protection of installed files ([#265](#265)) ([2008c43](2008c43)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: furedea-release[bot] <353651101+furedea-release[bot]@users.noreply.github.com>
## 概要 furedea/agent-harness#264 でエージェント用 GitHub トークンの発行機能が agent-harness から削除されたため,発行を dotfiles に移した. - `scripts/github-app-token/mint_github_app_token.sh`(新規): `openssl`,`curl`,`jq` でトークンを発行する.`jq` は既存の依存. - App の鍵で RS256 の JWT に署名する. - `GET /app/installations` で App のインストールが 1 つだけであることを確かめ,`POST /app/installations/{id}/access_tokens` でトークンを発行する. - `<設定ディレクトリ>/hosts.yml` を一時ファイルからの rename で mode 0600 で書く.設定ディレクトリは 0700.`config.yml` がなければ `version: "1"` を書く. - 失敗したときは今の `hosts.yml` をそのまま残す. - JWT とトークンは標準入力で curl に渡すので,argv にも出力にも出ない. - **2 回前のトークンの失効**: 置き換える `hosts.yml` を同じディレクトリの `hosts.previous.yml`(mode 0600,一時ファイルからの rename)に残す.新しい `hosts.yml` に置き換えた後,`hosts.previous.yml` にあったトークン(2 回前の実行で発行したもの)を,そのトークン自身で `DELETE /installation/token` して失効させる. - 有効なトークンは最大 2 つになる.実行の直前に始まった `gh run watch` のような長い `gh` も,その次の実行まで(少なくとも 15 分)動き続ける. - 漏れたトークンは最大 30 分で失効する(もともと 1 時間で期限切れ). - 1 回目と 2 回目の実行は何も失効させない. - 発行に失敗したときは `hosts.yml` も `hosts.previous.yml` も変えず,何も失効させない. - 401 は期限切れなので何も出さない. - ほかの失敗はトークンを含めずにログへ出し,実行は成功として終える. - **権限の絞り込み**: 権限の指定を必須にし,指定がなければ usage で失敗する.App の全権限を持つトークンは発行されない. - `nix/home/default.nix`: - `programs.agent-harness.github.agentToken` を削除した. - launchd エージェント `agent-github-token` を両ホストに追加した(`RunAtLoad`,15 分ごとに実行,ログは `~/Library/Logs/agent-github-token.log`). - App ID,鍵のパス,設定ディレクトリ `~/.config/agent-harness/gh` は旧版と同じ. - Claude の `env` と Codex の `shell_environment_policy.set` に `GH_CONFIG_DIR` を設定した.source の設定は `~` を展開しないので,dotfiles が絶対パスで渡す. - `flake.lock`: agent-harness を 249aeac(0.10.0,furedea/agent-harness#268 を含む)に,agent-config を 4ea2075(0.6.0,furedea/agent-config#286 を含む)に一緒に更新した. - furedea/agent-harness#268 は,ソースの `mcp_servers.json` と Home Manager の `mcpServers` に宣言した MCP サーバーを,各プロバイダーの設定に生成する. - dotfiles と agent-config は MCP サーバーを宣言していないので,生成されるのはサーバーを含まない空のファイルだけ.`darwin-rebuild` 後に Mac に現れるのは次の 2 つ. - `~/.gemini/config/mcp_config.json`: 新しい activation `agentHarnessAntigravityMcpServers` が,なければ作る. - `~/.gemini/config/.agent-harness-managed.json`: そのサイドカー(`{"mcpServers": []}`). - 既存の `~/.codex/.agent-harness-managed.json` に空の `mcp_servers` が加わる.Codex の `config.toml` に `[mcp_servers]` は増えず,Claude の skills ツリーのファイル構成も変わらない.Devin は有効にしていないので `~/.config/devin` には何も書かれない. - agent-config 側の差分は 0.6.0 のリリースと依存の更新(hypothesis,ruff). - `nix/checks.nix`: - 新しい agent-harness は `composedSettings` を公開しないので,モジュールと同じ評価(source の設定に Home Manager の `settings` を `recursiveUpdate` で重ねる)で生成後の設定を組み立てるようにした. - 契約を追加した. - 旧 `github` オプションが削除済みであること - 両ホストのジョブの引数(App ID,鍵,設定ディレクトリ,権限) - 実行間隔が 1 時間の有効期限の 1/3 未満であること - Claude と Codex の `GH_CONFIG_DIR` - 組み込んだスクリプトが実行できること(darwinOnly) - Claude,Codex,Antigravity のそれぞれで鍵が読み取り拒否されていることを確かめる契約を追加した. - **Claude**: `Read(...)` と `denyRead` の両方 - **Codex**: `default_permissions` のプロファイルの filesystem に `"deny"` - **Antigravity**: `read_file(...)` - 鍵そのものに加え,`~/.ssh` などの親ディレクトリの拒否も鍵を含むものとして扱う. - 設定を生成するプロバイダーが増えたら失敗する契約もある. - ADR-0055 を追加し,README を更新した. Closes #531 ## 権限の選び方 `GET /apps/furedea-agent` で調べた App の権限は `actions:read`,`contents:write`,`issues:write`,`metadata:read`,`pull_requests:write` だった.エージェントはどれも使うので,5 つすべてを明示して要求する. | 権限 | 使い道 | | --- | --- | | `actions:read` | CI の確認 | | `contents:write` | push | | `issues:write` | Issue | | `pull_requests:write` | PR | | `metadata:read` | 常に必要 | 絞り込みの効果は,後から App に権限を足しても,dotfiles に書き足すまでエージェントには渡らないこと.リポジトリは絞らなかった.インストールが所有者の全リポジトリを対象にしていて,エージェントは複数のリポジトリにまたがって作業するため. ## マージ後の手順(各 Mac で) トークンは表示しない. 1. `sudo darwin-rebuild switch --flake ~/ghq/github.com/furedea/dotfiles#<host>` で反映する. 2. launchd エージェントが動いたことを確かめる. - `launchctl print gui/$(id -u)/org.nix-community.home.agent-github-token | grep -E 'state|last exit code'` で `last exit code = 0` になっている. - `~/Library/Logs/agent-github-token.log` にエラーがない. 3. エージェントの身元で gh が動くことを確かめる. - `GH_CONFIG_DIR=~/.config/agent-harness/gh gh api /installation/repositories --jq .total_count` が数を返す. - `stat -f %Lp ~/.config/agent-harness/gh/hosts.yml` が `600` を返す. 4. 新しく起動した Claude Code または Codex のセッションで `gh pr list --repo furedea/dotfiles` が動く. 5. 旧版の状態ファイル `~/.config/agent-harness/gh/agent_harness_token.json` は不要なので消してよい. ## 検証 - `bats tests/github-app-token`: 22 件すべて成功.スクリプトを作る前,失効と権限を足す前,2 回前の失効に変える前の各段階で,テストが先に失敗することを確認した. - `nix flake check`: 成功(`all checks passed!`). - lock 更新前は次の 4 件が失敗し,更新後に通ることを確認した. - `agent-harness-github-option-removed`(旧 `agent-harness-has-no-github-option`) - `github-app-key-unreadable-by-claude`,`-codex`,`-antigravity` - `GH_CONFIG_DIR` の 2 件は,dotfiles で設定した時点で通った. - `bats --recursive tests`(137 件): 今回の変更による失敗はなし.ローカルのサンドボックスで zsh の ssh-agent の 8 件と nvim の lspmux の 1 件が失敗したが,原因は Unix ソケットの listen と `~/.local/state/nvim` への書き込みの拒否で,今回の変更とは関係ない. - shellcheck,shfmt,lefthook,commitlint: 成功. - Nix のチェック `agent-github-token-script`(darwinOnly): bats の仕様を,launchd ジョブと同じ固定ツール(`nix/agent_github_token.nix`,curl のみ偽物)で実行し,22 件すべて成功. - CI: `codex-review` と,それに連動する `all-green` 以外はすべて成功.`codex-review` は利用上限で実行されていない(Codex のコメントで確認). - 実際の鍵とトークンは,読み取りも表示もしていない.テストは使い捨ての鍵と偽の curl を使う. ## レビュー対応 - **P1(Claude)**: launchd ジョブの `TOOLS_PATH` に `sed` がなく,2 回目以降の実行が exit 127 で失敗してトークンが更新されなくなる. - 29e11c7 で修正した.前のトークンは bash の正規表現で読むようにした. - bats の仕様をジョブと同じ固定ツールで実行する Nix チェックを足した.修正前のスクリプトで,このチェックが `sed: command not found` で失敗することを確認した. - **P2(Claude)**: 前のトークンをすぐ失効させるため,次の実行より長く動く `gh`(`gh run watch` など)が 401 になる. - 所有者の判断で,2 回前のトークンを失効させる方式に変えた(ae6e9e1).有効なトークンは最大 2 つ,漏れたトークンは最大 30 分で失効する. - ADR-0055 の Decision と Consequences を更新した(b4fecc3). - **P3(Claude)**: Claude Code の `Read(/path)` はプロジェクトからの相対パスとして読まれるので,鍵の契約が保護にならないエントリーを通しうる. - 398e377 で修正した.`Read(` の絶対パスは `//` で始まるものだけを数える. - **P3(Claude,変更なし)**: revoke の対象が `hosts.yml` の値をそのまま使う点.指摘自身が問題なしとしている.エージェントがそのディレクトリに書けても,送られるのはエージェントがすでに持つトークンだけ. - **P3(Claude,変更なし)**: checks は agent-harness の合成を再現していて,生成結果そのものは読んでいない.生成結果を読むには評価時のビルド(IFD)が要るので,今の形にとどめた.agent-harness の合成方法が変わったときは見直す. - 最終の再レビュー(Claude): P0〜P2 の指摘なし.未解決のスレッドなし. - 2 回前の失効と lock 更新後の再レビュー(Claude): P0〜P2 の指摘なし.P3 として,PR 本文の失効方式と lock のリビジョンが古いと指摘された.push 直後に本文を更新しており,どちらも反映済み. - Codex: 利用上限のため 2 回とも実行されていない. - CI の bats で,GNU の `stat -f` によって mode の確認がずれていた.テストの補助関数で `stat -c` を先に試すように直した. ## 計画からの逸脱 - JSON の読み取りに既存の `jq` を使った.インストール一覧の応答には入れ子の `id` があり,sed では確実に読めないため. - 期限を追跡せず,毎回発行する.状態は前の `hosts.yml` だけで済む代わりに,1 台あたり毎時 4 回の発行と失効になる(ADR-0055). - `nix/checks.nix` で agent-harness の合成を再現した.新しい agent-harness が `composedSettings` を公開しなくなったため. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: furedea <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Closes #269 ## 原因 #268 の MCP ファイル同期が installed の JSON を `Json::parse` でそのまま読むため,Antigravity が初回起動時に作る 0 バイトの `mcp_config.json` で `EOF while parsing` となり,activation 全体が中断していた.YAML には installed の空文書を blank とする既存の扱いがあったが,JSON にはなかった. ## 修正 - `Json::parse` が `Role::Installed` かつ空白のみのテキストを空オブジェクトとして読む(YAML と同じ方針.codec レベルなので全 installed JSON に適用) - generated の空 JSON,非空の不正 JSON,`[]`,`null` は従来どおりエラー(既存の `pi_rejects_invalid_documents…` が維持を確認) - 空の installed は通常の描画で書き戻される(同期テストで `mcpServers` が書かれることを確認) - TOML は空文字列を空ドキュメントとしてもともと受け付ける.テストを追加して固定した ## 備考 リリースと dotfiles の lock 更新後は,回避策の `printf '{}\n' >` は不要になる.ADR は YAML との整合のみで新たな決定がないため追加していない. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: furedea <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]>
## 変更 `agent-harness` の flake input を v0.10.1(58b900f)に更新する. v0.10.0(furedea/agent-harness#268)は Antigravity の MCP 設定ファイル `~/.gemini/config/mcp_config.json` を同期するようになったが,Antigravity が作る 0 バイトのファイルを JSON として読めず,home-manager の activation が `agentHarnessAntigravityMcpServers` で止まっていた(以降の activation,Claude の `settings.json` の同期などが走らない).v0.10.1(furedea/agent-harness#270)は,既存ファイルが空または空白だけのとき空の設定として扱う. ## 確認 - `nix flake check` が通る. - lock の commit が `agent-harness-v0.10.1` タグと一致する. ## マージ後の確認 1. `sudo darwin-rebuild switch` が最後まで通る(`{}` を書き込む回避策は不要). 2. Claude のセッションを起動し直し,ツールを使っても `Usage: audit_log.py denied …` の hook エラーが出ない. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: furedea <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
MCP サーバーをソースの
mcp_servers.json(と Home Manager のmcpServers)に 1 回だけ宣言し,MCP クライアントを持つすべてのプロバイダ(Claude Code,Codex,Devin,Hermes,Antigravity)のネイティブな場所へ生成する.Claude Code は
~/.claude.jsonではなく,Claude Code 自身が書き換えない skills-directory plugin に生成するので,activation 時の書き込み競合がなくなる.ほかのプロバイダでは,ユーザーや各 CLI が追加したサーバーを sidecar で区別して残す.判断点:Pi と dsh には生成しないこと(理由は下記),Devin と Antigravity の同期で
mcp_config.jsonがない場合は作ること.flowchart LR SRC["source: mcp_servers.json"] --> MERGE{"名前単位で上書き"} HM["HM: programs.agent-harness.mcpServers"] --> MERGE MERGE --> CC["~/.claude/skills/agent-harness/.claude-plugin/plugin.json<br/>(Claude Code は読むだけ)"] MERGE --> CX["~/.codex/config.toml の [mcp_servers.*]"] MERGE --> HE["~/.hermes/config.yaml の mcp_servers"] MERGE --> DV["~/.config/devin/mcp_config.json の mcpServers"] MERGE --> AG["~/.gemini/config/mcp_config.json の mcpServers"] USER["claude / codex / devin mcp add,Antigravity の MCP マネージャー"] -.残る.-> KEEP["同じファイルの他のエントリ"]使い方
ソース(agent-config など)の
mcp_servers.json:{ "servers": { "github": { "command": "github-mcp-server", "args": ["stdio"], "env": { "GITHUB_TOOLSETS": "repos,issues" } }, "docs": { "url": "https://docs.example.com/mcp" } } }command(任意でargs,env)かurl(streamable HTTP)のどちらか一方.未知のフィールド,両方/どちらもなし,http(s)://以外の URL,[A-Za-z0-9_-]以外の名前はファイル名とサーバー名付きのエラー.commandをキーチェーンなどから取り出してexecするラッパーにする.agent-harness installが Codex,Devin,Antigravity のファイルへ直接マージし,記録用の.agent-harness-managed.jsonも配置する.Home Manager では activation がsync-config --provider <id> --file mcp-serversを実行する.プロバイダごとの生成先
~/.claude/skills/agent-harness/.claude-plugin/plugin.jsontype: "http",url~/.claude.jsonに残る(harness は触れない)~/.codex/config.tomlの[mcp_servers.<name>]url~/.config/devin/mcp_config.jsonのmcpServersurl,transport: "http"~/.hermes/config.yamlのmcp_serversurl~/.gemini/config/mcp_config.jsonのmcpServersserverUrlpi-mcp-adapterなどの拡張はあるが,agent-harness がインストールするものには含まれない.@deepseek-ai/dsh-mcp-clientプラグイン経由のみ.各プロファイルが dsh のバージョンに合わせて自分でインストールするもので,agent-harness は入れない.入っていないプラグインを参照する行を harness のバンドルに書くとプロファイルが壊れ得る.書式も公式ドキュメントでは確認できなかった.変更前後
~/.claude.jsonへ jq マージ)ConfigSpec(McpSpec::ConfigFile)として生成・同期sync-config--file mcp-serversで専用ファイルを同期(既定は従来どおりconfig)nix/providers.jsonsyncのみmcp_syncを追加し,HM がagentHarness{Devin,Antigravity}McpServersを実行generate-skills --providerclaude/codex(描画形式)claude,codex,pi,dsh,antigravity).従来の 2 値はそのまま動くProviderSpec::mcp: Option<McpSpec>(hookと同じ形)に 1 回だけ書く.config の同期はInConfigから追跡とキー所有からの除外を導出するnix/providers.jsonのリンクskills_provider(描画形式)skills_directory: true(HM はそのプロバイダ自身の ID でgenerate-skillsを呼ぶ)[parent]ヘッダーが出る宣言の形
hookと同じく,すべてのプロバイダが 1 つのmcpフィールドで MCP を宣言する.Noneはサーバーを生成しない(Pi,dsh).config と別ファイルの両方に書く宣言は型として作れない.Claude Code の場所の選定
~/.claude.jsonのmcpServersmanaged-mcp.jsonmanagedMcpServers--mcp-config~/.claude/skills/<dir>/.claude-plugin/plugin.jsonをインストール不要でその場読み込み.stdio と HTTP の両方に対応し,Claude Code は書き込まない検証
cargo test:367 passed,0 failed(パーサ,プロバイダ別のリモートサーバー形式,Claude プラグインと Devin/Antigravity/Hermes/Codex の golden,Devin/Antigravity/Hermes の同期でユーザー追加分が残りソースから消したものが消えること,MCP ファイルを持たないプロバイダの同期エラー,レジストリ不変条件)cargo clippy --all-targets -- -D warnings,cargo fmt --check,lefthook(nixfmt,statix,deadnix,ls-lint,file-length)nix flake check --option allow-import-from-derivation false(aarch64-darwin):all checks passed.HM のチェックで Devin と Antigravity の MCP ファイルが symlink ではなく activation でsync-config --provider <id> --file mcp-serversされることを確認installを 2 回実行し,ソースから消したサーバーが削除され,ユーザーのサーバーが残ることをテストで確認(install も sidecar を読み,配置する)sync-config --provider devin --file mcp-serversが既存のユーザーサーバーを残して書き込み sidecar に記録すること,--provider pi --file mcp-serversが「MCP server file of its own がない」エラーになることclaude mcp listにplugin:agent-harness:docs(HTTP)とplugin:agent-harness:github(stdio)が出ることを確認(前回)範囲・出典・前提
~/.config/devin/mcp_config.jsonのmcpServers.リモートはurlとtransport(httpが Streamable HTTP).devin mcp add -s userもこのファイルに書く.v3000.3 以降,config.jsonのmcpServersは専用ファイルへ移行される.~/.gemini/config/mcp_config.jsonのmcpServers.リモートはserverUrl(urlは版によって受け付けないためserverUrlを使う).エディタ,アプリ,agyが同じファイルを読む.公式ページは取得できず,複数の解説と GitHub MCP server のインストールガイドで確認した.~/.hermes/config.yamlのmcp_servers.リモートはurl.managed-config.yamlがmcp_serversを持ち,同期はpluginsとmcp_servers以外のキーを置き換え,mcp_serversは sidecar で追跡する.mcp__plugin_agent-harness_<server>__<tool>になる(受け入れ済み).サーバー宣言時はagent-harnessという名前のスキルを置けない.Devin と Antigravity の同期は,サーバーを宣言していなくてもmcp_config.json({})と sidecar を作る.Hermes のmanaged-config.yamlはサーバー宣言時に YAML として書き直すため,インデントが変わる.installも sidecar を読むので,Codex のshell_environment_policy.setもsync-configと同じく追跡される(sidecar がなければ,以前 harness が管理していたGH_CONFIG_DIRだけを削除する)..agent-harness-managed.json)には常に空のリストも記録する.記録を省くと,後でユーザーが同名サーバーを追加したときに削除し得るため.同じディレクトリで 2 つの同期が sidecar を共有しないことをテストで保証する.Closes #267
🤖 Generated with Claude Code