Skip to content

docs+chore: browser-mcp CDP roadmap + strip phase-A tools#356

Merged
MocA-Love merged 1 commit intomainfrom
docs/browser-mcp-cdp-plan
Apr 20, 2026
Merged

docs+chore: browser-mcp CDP roadmap + strip phase-A tools#356
MocA-Love merged 1 commit intomainfrom
docs/browser-mcp-cdp-plan

Conversation

@MocA-Love
Copy link
Copy Markdown
Owner

@MocA-Love MocA-Love commented Apr 20, 2026

Summary

次のフェーズ (CDP endpoint 公開型 = "バインディングルーター" 化) に向けた準備 PR。

plan.md

  • リポジトリ直下に `plan.md` を追加
  • 最終 UX / 現状 / PR1〜PR4 の境界 / 設計上の注意(Chromium targetId マッピング、Electron debugger と外部 CDP の同居、セキュリティ、マルチ Superset)を固定
  • 途中でコンテキストが失われても再開できる形にまとめる

Phase A tools の整理

  • `superset-browser-mcp` の tools から `navigate` / `screenshot` / `evaluate_js` / `get_console_logs` を削除。chrome-devtools-mcp / browser-use / playwright-mcp が既に強力に実装している領域を自前で持たないことを明示
  • `get_connected_pane` だけ残す(UI binding の sanity check 用)
  • bridge server から対応する `/mcp/navigate` / `/mcp/screenshot` / `/mcp/evaluate` / `/mcp/console-logs` エンドポイント + `ensureDebuggerAttached` + console buffer を削除
  • 残るのは `/mcp/register` / `/mcp/binding` のみ。PR1 で `/mcp/cdp-endpoint` を足す

破壊的変更

  • これまで MCP 経由で `navigate` / `screenshot` / `evaluate_js` / `get_console_logs` を呼んでいた自動化は動かなくなる
  • 代替: PR1 以降で CDP endpoint を公開し、LLM 側から好きな外部 browser MCP (chrome-devtools-mcp 等) に接続してもらう運用に移行

Test plan

  • dev 起動時に runtime info が従来通り書き出される
  • `/mcp/binding` が引き続き PPID -> pane 情報を返す
  • Connect モーダル / Install ボタンの挙動は変わらず動く
  • 削除したツールを LLM から呼ぶと "Method not found" などで明示的に失敗する

Summary by CodeRabbit

リリースノート

  • Documentation

    • ブラウザペーン統合のロードマップドキュメントを追加しました
  • Refactor

    • MCP ツール実装(ナビゲート、スクリーンショット、JavaScript評価、コンソールログ)を削除し、内部構造を最適化しました

- plan.md: full roadmap for PR1-PR4 so the Phase B (expose each pane as
  a filtered CDP endpoint and let external browser MCPs drive it) can be
  resumed even if working context is lost. Records the final UX, the
  current state after #354, per-PR scope, mapping / multi-attach /
  security notes, and explicitly-out-of-scope items.
- superset-browser-mcp tools: remove navigate / screenshot / evaluate_js
  / get_console_logs. These duplicate functionality that chrome-devtools-mcp
  and browser-use already ship in a more mature form. Keep only
  get_connected_pane as a metadata shim so LLMs can verify the UI
  binding.
- browser-mcp-bridge server: drop ensureDebuggerAttached + per-pane
  console buffering + /mcp/navigate|/screenshot|/evaluate|/console-logs
  endpoints. They backed the removed tools. The bridge now only serves
  /mcp/register and /mcp/binding; PR1 will add /mcp/cdp-endpoint next.

Prepares the surface area for the CDP-endpoint work.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

📝 Walkthrough

Walkthrough

MCP HTTPエンドポイント(navigate、screenshot、evaluate、console-logs)の実装とそれに対応するツール登録を削除し、ブラウザMCPブリッジとツールスイートを簡素化。将来のアーキテクチャへの移行ロードマップドキュメントを追加。

Changes

Cohort / File(s) Summary
MCP HTTPエンドポイント削除
apps/desktop/src/main/lib/browser-mcp-bridge/server.ts
/mcp/navigate/mcp/screenshot/mcp/evaluate/mcp/console-logsエンドポイントを削除。CDP接続管理、コンソールログバッファリング、デバッガライフサイクル管理、URL/プロトコル検証を削除。readJson_readJsonに改名(動作変更なし)。
MCP ツール実装削除
packages/superset-browser-mcp/src/tools/index.ts
navigatescreenshotevaluate_jsget_console_logsツール実装を削除。Zodスキーマ検証とブリッジリクエスト/レスポンス処理を削除。registerTools()get_connected_paneのみを登録するように簡素化。説明文を更新。
ロードマップドキュメント追加
plan.md
Browser Pane × LLM Binding Roadmapを追加。現在のPhase A状態と、CDP エンドポイント発行モデルへの段階的な Phase B 移行ロードマップを記載。4つのPRステップと設計上の検討事項を説明。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 ツールを削除して、道を整える
古き機能は役目を終え
未来への地図を引きながら
シンプルさへ、ホップ・ステップ・ジャンプ!
新しい道、CDP のほとりへ 🛤️✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning PR の説明は詳細で主要な変更を明確に記述しているが、テンプレートで指定されている「Related Issues」「Type of Change」などのセクション構造に従っていない。 PR テンプレートの指定セクション(Description、Related Issues、Type of Change、Testing など)に沿って説明を再構成し、GitHub キーワードでのイシューリンクと Type of Change のチェックボックスを追加してください。
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed タイトルは PR の主要な変更(plan.md の追加と Phase A ツールの削除)を正確に反映しており、簡潔かつ具体的である。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/browser-mcp-cdp-plan

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 958bc18838

ℹ️ 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".

Comment thread plan.md
@@ -0,0 +1,159 @@
# Browser Pane × LLM Binding Roadmap
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Move roadmap file into plans/ per repository policy

This commit adds a cross-cutting implementation roadmap as plan.md at the repository root, but /workspace/superset/AGENTS.md explicitly requires implementation plans to live under plans/ (and shipped plans under plans/done/). Keeping this file at root violates the documented project convention and makes plan discovery/maintenance inconsistent with the rest of the monorepo workflow; please relocate it to plans/.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/superset-browser-mcp/src/tools/index.ts`:
- Line 26: Update the descriptive string "Return the currently bound browser
pane for this LLM session (URL / title). Use this to confirm the UI-side binding
before asking a browser-automation MCP (chrome-devtools-mcp / browser-use /
etc.) to drive the pane." to clearly state that external MCPs cannot control the
pane yet and that a CDP endpoint is pending in a follow-up PR; locate this exact
string in packages/superset-browser-mcp/src/tools/index.ts and modify the text
to explicitly mention the limitation (no external MCP control currently, CDP
endpoint coming later).

In `@plan.md`:
- Around line 64-66: Update the roadmap text so it matches the current
implementation by removing or changing any statements that claim
navigate/screenshot/evaluate_js/get_console_logs endpoints still exist or that
the existing webContents.debugger.attach path will coexist; explicitly state
that those endpoints have already been removed in this PR and adjust the
future-PR sequencing accordingly, and apply the same edits to the corresponding
block that appears around lines referenced (the duplicate section at 101-112) so
the plan no longer implies incorrect coexistence or deferred removal.
- Around line 89-96: The fenced code block in plan.md containing the CLI
examples (the block with "chrome-devtools-mcp" and "browser-use" commands) lacks
a language tag and triggers markdownlint MD040; update that fenced block to
specify the shell language (e.g., ```shell) so the CLI examples are properly
labeled and linting passes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3dbe6333-5a99-4ffe-b5aa-af7c5bfa5761

📥 Commits

Reviewing files that changed from the base of the PR and between 126de31 and 958bc18.

📒 Files selected for processing (3)
  • apps/desktop/src/main/lib/browser-mcp-bridge/server.ts
  • packages/superset-browser-mcp/src/tools/index.ts
  • plan.md

title: "Get connected browser pane",
description:
"Return the currently bound browser pane for this LLM session. Reports whether a pane is bound, its URL and title.",
"Return the currently bound browser pane for this LLM session (URL / title). Use this to confirm the UI-side binding before asking a browser-automation MCP (chrome-devtools-mcp / browser-use / etc.) to drive the pane.",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

現時点では外部 MCP で pane を操作できないことを明記してください。

この説明は LLM に直接見えるため、CDP endpoint が follow-up PR まで未提供の現在だと「外部 MCP に頼めばこの pane を操作できる」と誤解されやすいです。

修正案
-				"Return the currently bound browser pane for this LLM session (URL / title). Use this to confirm the UI-side binding before asking a browser-automation MCP (chrome-devtools-mcp / browser-use / etc.) to drive the pane.",
+				"Return the currently bound browser pane for this LLM session (URL / title). Use this to confirm the UI-side binding. Browser automation tools from this MCP were removed; per-pane CDP access for external browser MCPs will be exposed in a follow-up release.",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"Return the currently bound browser pane for this LLM session (URL / title). Use this to confirm the UI-side binding before asking a browser-automation MCP (chrome-devtools-mcp / browser-use / etc.) to drive the pane.",
"Return the currently bound browser pane for this LLM session (URL / title). Use this to confirm the UI-side binding. Browser automation tools from this MCP were removed; per-pane CDP access for external browser MCPs will be exposed in a follow-up release.",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/superset-browser-mcp/src/tools/index.ts` at line 26, Update the
descriptive string "Return the currently bound browser pane for this LLM session
(URL / title). Use this to confirm the UI-side binding before asking a
browser-automation MCP (chrome-devtools-mcp / browser-use / etc.) to drive the
pane." to clearly state that external MCPs cannot control the pane yet and that
a CDP endpoint is pending in a follow-up PR; locate this exact string in
packages/superset-browser-mcp/src/tools/index.ts and modify the text to
explicitly mention the limitation (no external MCP control currently, CDP
endpoint coming later).

Comment thread plan.md
Comment on lines +64 to +66
- **この PR では生の CDP URL を返すだけ**。フィルタリングは PR2 で。
外部 MCP が接続すると他 pane も見えるが、動作検証のマイルストーンとして価値あり。
- 既存の webContents.debugger.attach 経路は navigate/screenshot のままにして共存。
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

ロードマップの順序を、この PR の実装状態に合わせてください。

この PR で navigate / screenshot / evaluate_js / get_console_logs と対応 HTTP endpoints は既に削除されています。一方で文書上は「PR1 では既存経路と共存」「PR1〜3 後に PR4 で削除」と読めるため、再開時に誤った前提になります。

修正案
-- **この PR では生の CDP URL を返すだけ**。フィルタリングは PR2 で。
+- **PR1 では生の CDP URL を返すだけ**。フィルタリングは PR2 で。
   外部 MCP が接続すると他 pane も見えるが、動作検証のマイルストーンとして価値あり。
-- 既存の webContents.debugger.attach 経路は navigate/screenshot のままにして共存。
+- `#356` 時点で Phase A の自作 MCP tools / HTTP endpoints は削除済み。
+  PR1 までは `get_connected_pane` による binding metadata 確認のみを提供する。
-### PR4: 古い自作 tools の整理
+### PR4: 古い自作 tools の整理(#356 で先行削除済み)

-- PR1〜3 で代替が整い次第、以下の MCP tools を deprecated にするか削除:
+- `#356` で以下の MCP tools と対応 bridge endpoints は先行削除済み:
   - `navigate` / `screenshot` / `evaluate_js` / `get_console_logs`
   - 対応する HTTP bridge エンドポイントも
 - 残すのは:
-  - `get_cdp_endpoint` (メイン出口)
+  - `get_connected_pane` (メタ情報用 sanity check)
+  - `get_cdp_endpoint` (PR1 で追加するメイン出口)
-  - `get_connected_pane` (メタ情報用 sanity check)

Also applies to: 101-112

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plan.md` around lines 64 - 66, Update the roadmap text so it matches the
current implementation by removing or changing any statements that claim
navigate/screenshot/evaluate_js/get_console_logs endpoints still exist or that
the existing webContents.debugger.attach path will coexist; explicitly state
that those endpoints have already been removed in this PR and adjust the
future-PR sequencing accordingly, and apply the same edits to the corresponding
block that appears around lines referenced (the duplicate section at 101-112) so
the plan no longer implies incorrect coexistence or deferred removal.

Comment thread plan.md
Comment on lines +89 to +96
```
# chrome-devtools-mcp
claude mcp add chrome-devtools-mcp -s user -- \
npx -y chrome-devtools-mcp --browser-url <filtered-cdp-url>

# browser-use (pyproject 経由)
browser-use --cdp-url <filtered-cdp-url>
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

fenced code block に language を指定してください。

markdownlint の MD040 が出ています。ここは CLI 例なので shell が適切です。

修正案
-  ```
+  ```shell
   # chrome-devtools-mcp
   claude mcp add chrome-devtools-mcp -s user -- \
     npx -y chrome-devtools-mcp --browser-url <filtered-cdp-url>

   # browser-use (pyproject 経由)
   browser-use --cdp-url <filtered-cdp-url>

</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 89-89: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plan.md` around lines 89 - 96, The fenced code block in plan.md containing
the CLI examples (the block with "chrome-devtools-mcp" and "browser-use"
commands) lacks a language tag and triggers markdownlint MD040; update that
fenced block to specify the shell language (e.g., ```shell) so the CLI examples
are properly labeled and linting passes.

@MocA-Love MocA-Love merged commit 6c28cac into main Apr 20, 2026
14 checks passed
@MocA-Love MocA-Love deleted the docs/browser-mcp-cdp-plan branch April 20, 2026 18:27
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