Add persistent browser contexts and Chrome channel support with custom launch args - #3
Draft
EarthmanWeb wants to merge 10 commits into
Draft
Add persistent browser contexts and Chrome channel support with custom launch args#3EarthmanWeb wants to merge 10 commits into
EarthmanWeb wants to merge 10 commits into
Conversation
Adds persistent flag to browser_create_instance to use Playwright's launchPersistentContext() instead of ephemeral newContext(). This preserves cookies, localStorage, IndexedDB, and session data across browser restarts. - persistent: true = auto temp directory - persistent: "/path" = custom userDataDir path 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Combines responsive viewport and persistent context features. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Adds ability to use installed browsers (Chrome, Edge) instead of bundled Playwright Chromium. Enables features like password manager that are disabled in automation builds. New parameters for browser_create_instance: - channel: 'chrome' | 'msedge' | etc. - Use installed browser - args: string[] - Custom browser launch arguments 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Combines channel/args support with responsive/persistent features. New parameters for browser_create_instance: - channel: Use installed browser (Chrome/Edge) with password manager - args: Custom browser launch arguments - persistent: Persistent context (from features branch) - responsive: Null viewport support (from features branch) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Author
|
This needs more testing, running into overloaded context with the change |
EarthmanWeb
marked this pull request as draft
November 26, 2025 09:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Summary: Enhanced Browser Features
This allows an end user to achieve, through optional configurations, the end result to be more like the PlaywrightMCP default, allowing password manager, cookie and history retention, while still retaining the great multi-instance features provided in the core.
Overview
Adds persistent browser contexts, Chrome channel support, custom launch arguments, and responsive viewport mode to concurrent-browser-mcp.
1. Persistent Browser Contexts (
src/browser-manager.ts,src/types.ts)New Functionality
persistent: true→ Auto-generated temp directorypersistent: "/path/to/profile"→ Custom userDataDir pathlaunchPersistentContext()instead of ephemeralbrowser.newContext()Key Changes
BrowserInstance.browsernowBrowser | null(null for persistent contexts)launchPersistentContext()method handles persistent browser launchescloseInstance()andcloseAllInstances()updated to handle both browser and context closuresUse Cases
2. Chrome Channel Support (
src/types.ts,src/tools.ts)New Functionality
chrome,chrome-beta,chrome-dev,chrome-canarymsedge,msedge-beta,msedge-dev,msedge-canaryBenefits
3. Custom Launch Arguments (
src/types.ts,src/tools.ts,src/browser-manager.ts)New Parameters
args: string[]["--disable-extensions", "--start-maximized"]ignoreDefaultArgs: string[]["--enable-automation", "--no-sandbox"]--enable-automationdisables password save prompts--no-sandboxunsupported on some macOS versionsImplementation
launchBrowser()andlaunchPersistentContext()4. Responsive Viewport Mode (
src/types.ts,src/tools.ts,src/browser-manager.ts)New Functionality
responsive: true→ Passesviewport: nullto PlaywrightImplementation
5. Tool Schema Updates (
src/tools.ts)Added Parameters to
browser_create_instanceresponsive(boolean, default: false)channel(enum: Chrome/Edge channels)args(string array)ignoreDefaultArgs(string array)persistent(boolean | string, default: false)Updated Descriptions
6. Bug Fixes & Improvements
Instance Creation (
src/browser-manager.ts)context.pages()[0] || context.newPage()responsive,channel,persistentfieldsfs.mkdirSync()Proxy Handling
Args Management
launchBrowser()andlaunchPersistentContext()Configuration Example
Enable Password Manager with Persistent Profile
Testing Recommendations
channel: "chrome"responsive: truechrome://versionBreaking Changes
None - All additions are backward compatible with optional parameters.