playwright-mcp-parallel
Enables running multiple isolated browser instances in parallel, each with independent state and auth cloning, for concurrent task execution.
README
playwright-mcp-parallel
Drop-in parallel enhancement over @playwright/mcp
Run multiple isolated browser instances simultaneously, each with its own context, auth, and state.
Why playwright-mcp-parallel?
Standard @playwright/mcp supports only one browser instance per server. This package extends it to support N parallel instances, enabling:
- š Parallel task execution ā Run multiple browser tasks at the same time
- š Auth cloning ā Clone cookies/localStorage from your logged-in Chrome to all new instances
- š§© Isolated contexts ā Each instance has fully independent state
- š Drop-in compatible ā All original
@playwright/mcptools available viapage_*prefix
Installation & Setup
Claude Desktop / Cursor / VS Code / Any MCP client
{
"mcpServers": {
"playwright-parallel": {
"command": "npx",
"args": [
"playwright-mcp-parallel@latest"
]
}
}
}
With options (headless, etc.)
{
"mcpServers": {
"playwright-parallel": {
"command": "npx",
"args": [
"playwright-mcp-parallel@latest",
"--headless"
]
}
}
}
Tools Reference
š Connection & Auth
| Tool | Description |
|---|---|
browser_connect |
Connect to an existing Chrome via CDP and extract auth (cookies + localStorage). Chrome must be started with --remote-debugging-port=9222. |
instance_export_auth |
Export auth state from a specific instance (or the connected Chrome). Updates global auth so new instances will inherit it. |
š„ļø Instance Management
| Tool | Description |
|---|---|
instance_create |
Create a new isolated browser instance. Optionally auto-clone auth from connected Chrome. |
instance_list |
List all active instances with their current URLs and titles. |
instance_close |
Close a specific instance and release its resources. |
instance_close_all |
Close all instances at once. |
š Browser Tools (All Original @playwright/mcp tools)
All tools from @playwright/mcp are available with a page_ prefix and require an instanceId parameter:
| Tool | Description |
|---|---|
page_browser_navigate |
Navigate an instance to a URL |
page_browser_click |
Click an element in an instance |
page_browser_type |
Type text into an element |
page_browser_screenshot |
Take a screenshot of an instance |
page_browser_snapshot |
Get accessibility snapshot of an instance |
page_browser_evaluate |
Execute JavaScript in an instance |
page_browser_wait_for |
Wait for a condition in an instance |
| ... | All other @playwright/mcp tools with page_ prefix |
Usage Examples
Typical Workflow: Auth Cloning + Parallel Tasks
1. Start Chrome with debugging:
chrome.exe --remote-debugging-port=9222
2. Log in manually in Chrome
3. In your AI agent:
ā browser_connect() # Extract auth from Chrome
ā instance_create({ instanceId: "task-1", url: "https://app.example.com" })
ā instance_create({ instanceId: "task-2", url: "https://app.example.com" })
ā (Both instances are logged in automatically!)
4. Run tasks in parallel:
ā page_browser_click({ instanceId: "task-1", ... })
ā page_browser_click({ instanceId: "task-2", ... })
5. Export auth from a running instance (e.g., after login flow):
ā instance_export_auth({ instanceId: "task-1" })
ā instance_create({ instanceId: "task-3" }) # Also logged in
Export Auth from Instance
ā instance_create({ instanceId: "login-bot", url: "https://example.com/login" })
ā page_browser_click({ instanceId: "login-bot", ... }) # complete login
ā instance_export_auth({ instanceId: "login-bot" }) # export & set as global auth
ā instance_create({ instanceId: "worker-1" }) # inherits login state
ā instance_create({ instanceId: "worker-2" }) # inherits login state
CLI Options
All @playwright/mcp CLI options are supported:
npx playwright-mcp-parallel@latest [options]
| Option | Description |
|---|---|
--headless |
Run browser in headless mode |
--browser <browser> |
Browser to use: chrome, firefox, webkit, msedge |
--viewport-size <size> |
Viewport size, e.g. 1280x720 |
--user-data-dir <path> |
Path to user data directory |
--storage-state <path> |
Path to storage state JSON file |
--proxy-server <proxy> |
Proxy server, e.g. http://myproxy:3128 |
--no-sandbox |
Disable sandbox |
--port <port> |
Port for SSE transport |
--isolated |
Keep browser profile in memory only |
For the full list of options, see @playwright/mcp documentation.
How It Works
playwright-mcp-parallel
āāā Management Layer
ā āāā browser_connect ā Extract auth from existing Chrome
ā āāā instance_create ā Launch isolated browser + clone auth
ā āāā instance_list ā List active instances
ā āāā instance_close ā Dispose instance
ā āāā instance_close_all ā Dispose all
ā āāā instance_export_auth ā Export cookies/localStorage from instance
ā
āāā Per-Instance Tool Dispatch
āāā page_* tools ā routed to the correct BrowserBackend by instanceId
Each instance_create call launches a new Chromium process with an isolated context. Auth state (cookies + localStorage) extracted via browser_connect or instance_export_auth is automatically injected into new contexts.
Differences from @playwright/mcp
| Feature | @playwright/mcp | playwright-mcp-parallel |
|---|---|---|
| Browser instances | 1 | Unlimited |
| Parallel execution | ā | ā |
| Auth cloning | ā | ā |
| Auth export | ā | ā |
| Original tools | ā | ā
(via page_ prefix) |
| Drop-in config | ā | ā |
Requirements
- Node.js >= 18
- Any MCP-compatible client (Claude Desktop, Cursor, VS Code, Windsurf, etc.)
License
Apache-2.0 ā based on @playwright/mcp by Microsoft.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.