Skip to content

feat: runtime-split-mcp-plugins MCP plugins#51

Closed
takemi-ohama wants to merge 10 commits into
release/runtime-plugin-splitfrom
feature/runtime-split-mcp-plugins
Closed

feat: runtime-split-mcp-plugins MCP plugins#51
takemi-ohama wants to merge 10 commits into
release/runtime-plugin-splitfrom
feature/runtime-split-mcp-plugins

Conversation

@takemi-ohama

@takemi-ohama takemi-ohama commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • plan: issues/agent-runtime-plugin-split.md
  • release PR: release: runtime plugin split #45
  • 担当範囲: MCP plugin を plugins/mcp/shared|claude|codex|kiro に分離する
  • 既存 MCP plugin の編集元を plugins/mcp/shared/<plugin> に集約
  • Claude / Codex / Kiro 用の runtime 配布物を build 生成し、marketplace source を runtime 別 path へ更新
  • Codex 用 .codex-plugin/plugin.json と Kiro 用 install.sh を build script から生成
  • MCP plugin README に Claude / Codex / Kiro の導入手順と必要な環境変数を追記

Test plan

  • bash scripts/build-runtime-plugins.sh --check
  • python3 -m json.tool .claude-plugin/marketplace.json
  • python3 -m json.tool .agents/plugins/marketplace.json
  • find plugins/mcp -name .mcp.json -exec python3 -m json.tool {} \;
  • find plugins/mcp/codex -path '*/.codex-plugin/plugin.json' -exec python3 -m json.tool {} \;
  • git diff --check
  • rg -n "plugins/mcp-[a-z]" README.md AGENTS.md CLAUDE.md KIRO.md docs plugins scripts .claude-plugin .agents が該当なし

@takemi-ohama takemi-ohama mentioned this pull request Jul 5, 2026
15 tasks
@takemi-ohama takemi-ohama force-pushed the feature/runtime-split-mcp-plugins branch from e34a1b9 to 93db5db Compare July 7, 2026 03:56

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 1 | codex | REQUEST_CHANGES

Codex 向け MCP plugin がインストール後に MCP server を正しく読み込めない可能性があるため、生成時の .mcp.json 変換を修正してください。

Comment thread scripts/build-runtime-plugins.sh

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 1 | gemini | APPROVE

MCPプラグインの各ランタイム別の分離と同期スクリプトの実装を確認しました。問題箇所はありません。

@takemi-ohama

Copy link
Copy Markdown
Contributor Author

修正サマリー

  • Codex major 指摘 1 件に対応しました。
  • scripts/build-runtime-plugins.sh に Codex MCP config 変換処理を追加し、plugins/mcp/codex/*/.mcp.json を direct server map 形式へ再生成しました。
  • 検証: bash scripts/build-runtime-plugins.sh --check、全 runtime MCP JSON parse、Codex manifest/direct-map 構造チェック。
  • CI: 現時点で reported checks なし。

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 2 | codex | REQUEST_CHANGES

Codex runtime 生成物に Claude 固有の ${CLAUDE_PLUGIN_ROOT} 参照が残っており、該当 plugin の hook/skill が Codex で script を解決できない箇所があります。runtime 生成時に root 変数を Codex/Kiro 向けへ変換する処理を追加してください。

Comment thread plugins/mcp/codex/mcp-playwright/hooks/hooks.json Outdated
Comment thread plugins/mcp/codex/mcp-redash/skills/redash-add/SKILL.md Outdated

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 2 | gemini | REQUEST_CHANGES

新設された mcp-redashmcp-playwright、および MCP プラグインのマルチランタイム対応(build-runtime-plugins.sh)についてレビューしました。
Codex 環境向けに同期された際、フックやスキルが欠落したり、環境変数の未定義によってエラーになる問題が含まれているため、これらを中心に修正を提案します。

Comment thread scripts/build-runtime-plugins.sh Outdated
Comment thread plugins/mcp/shared/mcp-playwright/hooks/hooks.json Outdated
Comment thread plugins/mcp/shared/mcp-redash/skills/redash-add/SKILL.md Outdated
Comment thread plugins/mcp/shared/mcp-redash/scripts/redash-mcp-config.js Outdated
@takemi-ohama

Copy link
Copy Markdown
Contributor Author

修正サマリー

  • round 2 の major 指摘 5 件を修正しました。
    • Codex MCP manifest 生成を Claude manifest ベースに変更し、skills / hooks を Codex runtime へ引き継ぐようにしました。
    • Redash skills と Playwright hook の ${CLAUDE_PLUGIN_ROOT} 固定参照を runtime 非依存の root フォールバックへ変更しました。
    • shared 変更を scripts/build-runtime-plugins.sh で Claude/Codex/Kiro runtime 生成物へ反映しました。
  • minor 指摘 1 件は rejected として返信しました。Redash の process.cwd() は、plugin 同梱 MCP ではなくユーザー作業プロジェクトの追加 Redash MCP を管理する意図通りの挙動です。
  • 検証: bash scripts/build-runtime-plugins.sh --check, MCP/Codex manifest JSON 構造チェック, 全 JSON parse, node --check, git diff --check, claude plugin validate .
  • CI: 現時点で reported checks なし。

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 3 | codex | REQUEST_CHANGES

Kiro MCP runtime installer が hook / skill 付き plugin を完全に有効化できていません。installer の反映対象を .mcp.json 以外にも広げるか、Kiro 版から未サポート要素を外してください。

Comment thread scripts/build-runtime-plugins.sh Outdated

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 3 | gemini | REQUEST_CHANGES

  • scripts/build-runtime-plugins.shsync_mcp_plugins において、shared/ 側で削除・リネームされた MCP プラグインの出力先フォルダがクリーンアップされず、古い生成物が claude/, codex/, kiro/ 配下に取り残される(ゾンビ化する)問題があります。同期対象外となったプラグインを検知して削除する処理、またはループ前に出力先全体をクリアする処理を追加してください。

Comment thread scripts/build-runtime-plugins.sh
@takemi-ohama

Copy link
Copy Markdown
Contributor Author

修正サマリー

  • round 3 の major 指摘 2 件に対応しました。
    • Kiro MCP installer が .mcp.json だけでなく .kiro/plugins / .kiro/skills / .kiro/agents/default.json へ hooks・skills・scripts 参照を反映するようにしました。
    • sync_mcp_plugins で shared に存在しない runtime 出力先ディレクトリを削除し、--check では stale 生成物として検出するようにしました。
  • 生成済み Kiro MCP runtime を再生成し、Redash skill と Playwright hook の Kiro 用 root 参照も反映しました。
  • 検証: bash scripts/build-runtime-plugins.sh --check, 全 JSON parse, git diff --check, Kiro install.sh 構文チェック, 一時プロジェクトでの Kiro installer 実行検証。
  • CI: 現時点で reported checks なし。

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 4 | codex | REQUEST_CHANGES

Codex runtime の Redash 追加コマンドが、Codex 用 MCP 設定形式と不整合です。

Comment thread plugins/mcp/codex/mcp-redash/scripts/redash-mcp-config.js

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 4 | gemini | REQUEST_CHANGES

  • mcp-redash の設定スクリプトにおいて、サブディレクトリから実行した際に .mcp.json が意図しない場所に作成・編集される問題(process.cwd() 依存)の修正を提案します。
  • mcp-serena の設定にて、VSCode 固有の変数 ${workspaceFolder} が使用されており、Claude Code 等での動作不全の懸念があります。
  • 未使用の関数の削除を提案しています。

Comment thread scripts/build-runtime-plugins.sh Outdated
Comment thread plugins/mcp/shared/mcp-redash/scripts/redash-mcp-config.js Outdated
Comment thread plugins/mcp/shared/mcp-serena/.mcp.json Outdated
@takemi-ohama

Copy link
Copy Markdown
Contributor Author

修正サマリー

  • round 4 の指摘 4 件を修正しました。
    • Codex runtime の Redash 追加コマンドが新規 .mcp.json を direct server map で作成し、既存の mcpServers / mcp_servers / direct map 形式も保持するようにしました。
    • Redash 設定スクリプトの project root 解決を改善し、subdir 実行でも Git root / project .mcp.json を更新するようにしました。
    • Serena MCP 設定から VSCode/Cursor 固有の ${workspaceFolder} を含む envFile を削除しました。
    • 未使用の json_string 関数を削除しました。
  • round 2 の類似 Redash thread 1 件にも重複対応として返信し Resolve しました。
  • 検証: bash scripts/build-runtime-plugins.sh --check, 全 JSON parse, git diff --check, node --check, bash -n, Redash config smoke test。
  • CI: 現時点で reported checks なし。

修正コミット: e91a6f7

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 5 | gemini | APPROVE

ラウンド4の指摘事項(Redash設定スクリプトのプロジェクトルート解決とVSCode固有変数の削除)が修正されていることを確認しました。MCPプラグインのランタイム別分割と同期スクリプトの実装も問題ありません。

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 5 | codex | REQUEST_CHANGES

外部コマンド実行経路に修正が必要です。

Comment thread plugins/mcp/shared/mcp-redash/skills/redash-add/SKILL.md Outdated
Comment thread plugins/mcp/shared/mcp-playwright/scripts/ensure-playwright.js Outdated
@takemi-ohama

Copy link
Copy Markdown
Contributor Author

cross-review round 5 Codex 指摘対応\n\n対応件数: 2件(major 2件)\n\n- Redash skill の $ARGUMENTS を quote し、suffix を英小文字・数字・ハイフンのみ許可する検証を追加しました。\n- Playwright 初回セットアップの npm / npx 実行を execFileSync + 引数配列へ変更し、version whitelist 検証を追加しました。\n\n検証:\n- bash scripts/build-runtime-plugins.sh --check\n- JSON parse\n- git diff --check\n- node -c(対象 JS 2件)\n- Redash suffix validation の簡易動作確認\n\n修正コミット: f7b604c

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 6 | gemini | APPROVE

Windows互換性の1点のみコメントしました。

Comment thread plugins/mcp/shared/mcp-playwright/scripts/ensure-playwright.js

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 6 | codex | REQUEST_CHANGES

Codex runtime 配布物の README が他 runtime の手順をそのまま含んでいるため、README 生成またはテンプレートを runtime 別に分けてください。

Comment thread plugins/mcp/codex/mcp-playwright/README.md Outdated
@takemi-ohama

Copy link
Copy Markdown
Contributor Author

cross-review round 6 指摘対応

対応件数: 2件(major 1件、minor 1件)

  • Codex runtime の mcp-playwright README を runtime 別テンプレートで生成するようにし、Codex 向け install / 起動手順、direct server map 形式の MCP 設定説明へ差し替えました。
  • Playwright 初回セットアップの execFileSync に Windows のみ shell: true を付与し、npm / npx 起動の互換性を改善しました。

検証:

  • bash scripts/build-runtime-plugins.sh --check
  • JSON parse
  • git diff --check
  • 対象 JS の node --check
  • Codex README runtime 文言確認

修正コミット: d5c57f9

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 7 | codex | REQUEST_CHANGES

Playwright 自動セットアップの再検証条件に修正が必要です。

Comment thread plugins/mcp/shared/mcp-playwright/scripts/ensure-playwright.js Outdated

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 7 | gemini | REQUEST_CHANGES

  • CLAUDE.md や一部ドキュメントが自動生成された plugins/mcp/claude/* 配下を参照しており、誤編集のリスクがあります。shared の実体を参照するように修正してください。
  • Redash MCP の設定追加・削除 (/redash-add, /redash-remove) が .mcp.json のみを更新するため、Kiro 環境 (.kiro/agents/default.json) に反映されません。Kiro 環境下での同期処理を追加するか、README に制限を記載してください。
  • mcp-serena/.mcp.json の環境変数での Bash 文字列展開 (${...}) は、MCP クライアントによっては意図通りに展開されないため見直しを推奨します。
  • redash-mcp-config.js に実行権限 (+x) が付与されていないため、他のスクリプトと揃えることを推奨します。

Comment thread CLAUDE.md Outdated
Comment thread docs/specifications/ndf-knowledge-and-kiro.md Outdated
Comment thread plugins/mcp/shared/mcp-serena/.mcp.json Outdated
Comment thread plugins/mcp/shared/mcp-redash/scripts/redash-mcp-config.js
Comment thread plugins/mcp/shared/mcp-redash/scripts/redash-mcp-config.js
@takemi-ohama

Copy link
Copy Markdown
Contributor Author

cross-review round 7 指摘対応

対応件数: 6件(major 2件、minor 4件)

  • Playwright auto setup のフラグを playwrightVersion 比較に変更し、@playwright/mcp@latest の依存更新時は Chromium を再インストールするようにしました。
  • Kiro runtime の /redash-add / /redash-remove 実行時に .kiro/agents/default.json の Redash MCP 定義を project .mcp.json と同期するようにしました。
  • Serena 関連ドキュメント参照を generated な plugins/mcp/claude から plugins/mcp/shared へ修正しました。
  • Serena MCP の SERENA_HOME をシェル展開に依存しない .serena に変更しました。
  • redash-mcp-config.js に実行権限を付与し、runtime 生成物へ反映しました。

検証:

  • bash scripts/build-runtime-plugins.sh --check
  • JSON parse
  • git diff --check
  • 対象 JS の node --check
  • Kiro Redash add/remove sync smoke test

CI: 現時点で reported checks なし。

修正コミット: 6a4b091

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 8 | codex | REQUEST_CHANGES

Redash の suffix 命名と環境変数名の対応に修正が必要です。

Comment thread plugins/mcp/shared/mcp-redash/scripts/redash-mcp-config.js Outdated

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 cross-review | round 8 | gemini | REQUEST_CHANGES

redash-mcp-config.js におけるプロジェクトルートの .mcp.json 操作について、Codex 判定時のみファイルフォーマット(スキーマ)を変える設計は、複数のランタイムで共有される設定ファイルとしての整合性を壊すため修正が必要です。

Comment thread plugins/mcp/shared/mcp-redash/scripts/redash-mcp-config.js Outdated
@takemi-ohama

Copy link
Copy Markdown
Contributor Author

cross-review round 8 指摘対応

対応件数: 2件(major 2件)

  • Redash suffix にハイフンが含まれる場合、環境変数名では _ に正規化するよう修正しました(例: sandbox-1 -> REDASH_SANDBOX_1_URL / REDASH_SANDBOX_1_API_KEY)。
  • project root の .mcp.json は Codex runtime 実行時でも常に mcpServers 標準スキーマで作成・書き戻すよう修正しました。既存 direct map / mcp_servers 形式も add/remove 時に mcpServers へ正規化します。
  • README / redash-guide と Claude/Codex/Kiro runtime 生成物へ同期済みです。

検証:

  • bash scripts/build-runtime-plugins.sh --check
  • JSON parse
  • git diff --check
  • 対象 JS の node --check
  • Redash add/remove smoke test(Codex 新規作成、既存 direct map 正規化、Kiro sync)

CI: 現時点で reported checks なし。

修正コミット: e47f478

@takemi-ohama

Copy link
Copy Markdown
Contributor Author

ℹ️ レビューコメント履歴整理のため本 PR を一度 close し、同じブランチ feature/runtime-split-mcp-plugins で新 PR を作り直します。ブランチの内容・base は変えません。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant