Files
Tommy D. Rossi 96575c1b69 feat: custom tab group names and colors per session
Sessions can now specify a custom Chrome tab group name and color via
`playwriter session new --name myproject --color red`. Different sessions
with different names get separate Chrome tab groups.

The metadata flows through: CLI options → relay HTTP → CDP URL query params →
relay state (PlaywrightClient) → forwardCDPCommand params → extension TabInfo →
chrome.tabGroups API.

Key changes:

**Extension (0.0.74 → 0.0.77)**
- Add groupName/groupColor fields to TabInfo
- Rewrite syncTabGroup to manage multiple named groups independently
- Add updateTabGroupWithRetry to handle Chrome's race condition where
  tabGroups.update() silently fails right after tabs.group()
- Fix tab group flapping bug: only apply group metadata on
  Target.createTarget, not on every CDP command. Broadcast commands like
  Target.setAutoAttach were overwriting unrelated tabs' group metadata
- Add tabsBeingMoved guard set so programmatic ungroup/regroup during
  syncTabGroup doesn't trigger disconnect via onUpdated handler
- Narrow store subscriber to only trigger syncTabGroup on group-relevant
  field changes (state, groupName, groupColor)

**Playwriter MCP/CLI (0.0.85 → 0.0.87)**
- Add --name and --color options to `session new` CLI command
- Forward groupName/groupColor through getCdpUrl query params
- Store group metadata on PlaywrightClient in relay state
- Only inject group fields into forwardCDPCommand on Target.createTarget
  to prevent the flapping bug
- Pass clientId through handleCDPCommand so relay can look up group metadata

**Website**
- Add markdown.tsx route using safe-mdx for markdown-driven editorial pages

Backward compatible: older extensions ignore the new fields, omitting
options preserves the default 'playwriter' green group.
2026-03-07 22:34:42 +01:00
..
2026-02-22 15:21:38 +01:00
2026-02-22 15:21:38 +01:00
2025-11-22 12:28:21 +01:00
2026-02-22 15:21:38 +01:00

Playwriter MCP

Control your Chrome browser via Model Context Protocol (MCP) using Chrome DevTools Protocol (CDP) events.

Install from Chrome Web Store

What is Playwriter MCP?

Playwriter MCP is a Chrome extension that enables Playwright to connect to your existing Chrome instance without spawning a new browser or requiring Chrome to be started in CDP mode. This allows AI assistants and automation tools to interact with your browser seamlessly through the Model Context Protocol.

Key Features

  • No new Chrome instances: Works with your current browser session
  • No CDP mode required: No need to restart Chrome with special flags
  • MCP integration: Exposes browser control through the Model Context Protocol
  • CDP events: Full access to Chrome DevTools Protocol capabilities
  • Playwright compatible: Connect Playwright directly to your running Chrome

How it Works

  1. Install the extension in your Chrome browser
  2. Click the extension icon to attach the debugger to the current tab
  3. The extension creates a relay connection using CDP
  4. Connect your MCP client (like Playwright) to control the browser
  5. The icon changes color to indicate connection status:
    • Gray: Not connected
    • Green: Successfully connected

Use Cases

  • Browser automation without disrupting your workflow
  • AI-assisted web browsing and testing
  • Debugging and development with MCP-enabled tools
  • Remote browser control for various applications

Permissions

This extension requires the following permissions:

  • debugger: To access Chrome DevTools Protocol
  • activeTab: To interact with the current tab
  • tabs: To manage browser tabs
  • all_urls: To work with any website

Getting Started

  1. Install the extension from the Chrome Web Store
  2. Navigate to any webpage
  3. Click the Playwriter MCP extension icon
  4. The debugger will attach and the icon will turn green when connected
  5. Connect your MCP client to start controlling the browser

Privacy & Security

Playwriter MCP runs locally in your browser and does not send any data to external servers. All browser control happens through the standard Chrome DevTools Protocol on your machine.

Support

For issues, feature requests, or contributions, visit the GitHub repository.

License

Apache-2.0