docs+chore: browser-mcp CDP roadmap + strip phase-A tools#356
Conversation
- 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.
📝 WalkthroughWalkthroughMCP HTTPエンドポイント(navigate、screenshot、evaluate、console-logs)の実装とそれに対応するツール登録を削除し、ブラウザMCPブリッジとツールスイートを簡素化。将来のアーキテクチャへの移行ロードマップドキュメントを追加。 Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 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".
| @@ -0,0 +1,159 @@ | |||
| # Browser Pane × LLM Binding Roadmap | |||
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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
📒 Files selected for processing (3)
apps/desktop/src/main/lib/browser-mcp-bridge/server.tspackages/superset-browser-mcp/src/tools/index.tsplan.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.", |
There was a problem hiding this comment.
現時点では外部 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.
| "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).
| - **この PR では生の CDP URL を返すだけ**。フィルタリングは PR2 で。 | ||
| 外部 MCP が接続すると他 pane も見えるが、動作検証のマイルストーンとして価値あり。 | ||
| - 既存の webContents.debugger.attach 経路は navigate/screenshot のままにして共存。 |
There was a problem hiding this comment.
ロードマップの順序を、この 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.
| ``` | ||
| # 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> | ||
| ``` |
There was a problem hiding this comment.
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.
Summary
次のフェーズ (CDP endpoint 公開型 = "バインディングルーター" 化) に向けた準備 PR。
plan.md
Phase A tools の整理
破壊的変更
Test plan
Summary by CodeRabbit
リリースノート
Documentation
Refactor