Add browser session parity options to MCP#110
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit de97ef4. Configure here.
| content: [ | ||
| { type: "text", text: JSON.stringify(browser, null, 2) }, | ||
| ], | ||
| }; |
There was a problem hiding this comment.
Update omits falsy response guard
Medium Severity
The new update action serializes the result of client.browsers.update without checking it, unlike create and get in the same tool. When the client returns a falsy session (as create and retrieve already handle), JSON.stringify can yield a non-string text value and the caller gets a broken or misleading tool result instead of a clear failure message.
Reviewed by Cursor Bugbot for commit de97ef4. Configure here.
Monitoring Plan: manage_browsers MCP Tool — Update Action & New ParametersWhat this PR does: Enables AI agents using the Kernel MCP server to update live browser sessions — changing proxy, profile, viewport, and telemetry settings mid-session — and adds new create-time parameters ( Intended effect:
Risks:
Status updates will be posted automatically on this PR as monitoring progresses. |


Summary
manage_browserscreate with SDK 0.58 browser-session options:start_url,chrome_policy,gpu, and telemetry category controlsmanage_browsersupdate for supported session settings:disable_default_proxy, proxy/profile updates, viewport updates, and telemetry updatesValidation
bunx prettier --write src/lib/mcp/tools/browsers.tsgit diff --checkKERNEL_CLI_PROD_CLIENT_ID=dummy-prod KERNEL_CLI_STAGING_CLIENT_ID=dummy-staging KERNEL_CLI_DEV_CLIENT_ID=dummy-dev NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_Y2xlcmsuZXhhbXBsZS5jb20k bun run buildhttp://127.0.0.1:3002/mcpwithAPI_BASE_URL=http://127.0.0.1:3001: initialized MCP, verifiedmanage_browserswas listed, created a short-lived headless browser withstart_url,chrome_policy, telemetry, and viewport options, updated telemetry/viewport through the newupdateaction, retrieved it, and deleted itNotes
disable_default_proxy: truethrough the same localhost MCP path reached the API but the local backend returned500 proxy swap did not complete; browser cleanup succeeded. The MCP request wiring is present, but that backend behavior was not green in local smoke.Note
Medium Risk
Changes how browser sessions are created and mutated over MCP (proxies, profiles, telemetry, Chrome policy), which can affect live sessions and routing behavior if misused, though validation limits wrong-action fields.
Overview
Extends the MCP
manage_browserstool so agents can align with newer Kernel browser-session APIs:updateis added alongside create/list/get/delete, and create gainsstart_url,chrome_policy,gpu, and granular telemetry controls.Create and update now share typed helpers (SDK-derived
BrowserCreateParams/BrowserUpdateParams) that build profile, viewport, and telemetry payloads, withactionFieldErrorrejecting fields used on the wrong action (e.g. extensions only on create). Update supports proxy changes (clear_proxy,disable_default_proxy), profile/viewport/telemetry tweaks, andviewport_force; invalid combinations return clear text errors instead of ad-hoc inline checks for viewport pairing.Reviewed by Cursor Bugbot for commit de97ef4. Bugbot is set up for automated code reviews on this repo. Configure here.