playwright-parallel-mcp logo

playwright-parallel-mcp

Community
sumyapp

MCP server for parallel browser automation with Playwright

Publishersumyapp
Repositoryplaywright-parallel-mcp
LanguageTypeScript
Forks
8
Stars
18
Available tools
63
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    playwright-parallel-mcp exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 63 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    18 stars and 8 forks from the linked repository.

playwright-parallel-mcp

CI Coverage Status npm version

English | 日本語 | 中文

A Model Context Protocol (MCP) server that enables AI agents to control multiple independent browser instances in parallel.

The Problem

Existing browser automation MCP servers (Chrome DevTools MCP, Playwright MCP) share a single browser instance across all sessions, causing conflicts when multiple AI agents try to use them simultaneously.

The Solution

playwright-parallel-mcp creates isolated browser instances for each session by spawning independent MCP backend processes, enabling true parallel browser automation.

Architecture (v0.3.0+)

playwright-parallel-mcp uses a wrapper architecture that spawns child MCP server processes for each session:

┌─────────────────────────────────────────────────────────────────┐
│              playwright-parallel-mcp (Wrapper)                   │
│  ┌─────────────────────────────────────────────────────────┐    │
│  │  Session Manager                                         │    │
│  │  - Session lifecycle management                          │    │
│  │  - Tool routing with sessionId                           │    │
│  │  - Automatic cleanup                                     │    │
│  └─────────────────────────────────────────────────────────┘    │
└───────────────┬─────────────────────┬─────────────────────┬─────┘
                │                     │                     │
                ▼                     ▼                     ▼
    ┌───────────────────┐ ┌───────────────────┐ ┌───────────────────┐
    │  Session A        │ │  Session B        │ │  Session C        │
    │  ┌─────────────┐  │ │  ┌─────────────┐  │ │  ┌─────────────┐  │
    │  │ MCP Backend │  │ │  │ MCP Backend │  │ │  │ MCP Backend │  │
    │  │ (Child      │  │ │  │ (Child      │  │ │  │ (Child      │  │
    │  │  Process)   │  │ │  │  Process)   │  │ │  │  Process)   │  │
    │  └──────┬──────┘  │ │  └──────┬──────┘  │ │  └──────┬──────┘  │
    │         │         │ │         │         │ │         │         │
    │         ▼         │ │         ▼         │ │         ▼         │
    │  ┌─────────────┐  │ │  ┌─────────────┐  │ │  ┌─────────────┐  │
    │  │  Browser    │  │ │  │  Browser    │  │ │  │  Browser    │  │
    │  │  Instance   │  │ │  │  Instance   │  │ │  │  Instance   │  │
    │  └─────────────┘  │ │  └─────────────┘  │ │  └─────────────┘  │
    └───────────────────┘ └───────────────────┘ └───────────────────┘

Key Benefits

  • Process-Level Isolation: Each session runs in a separate OS process
  • Backend Agnostic: Works with any MCP browser automation server
  • Always Latest: Uses @latest versions, no dependency updates needed
  • Automatic Cleanup: Sessions are cleaned up on timeout or process exit

Session Isolation Guarantee

Each session is 100% isolated. This is architecturally guaranteed by process-level separation.

ResourceIsolated?How
Browser Process✅ YesSeparate OS process per session
Cookies✅ YesSeparate browser instance
localStorage✅ YesSeparate browser instance
DOM✅ YesSeparate page instance
Navigation History✅ YesSeparate page instance

Features

  • Parallel Sessions - Each session gets its own browser instance
  • Process Isolation - True isolation via separate OS processes
  • Pluggable Backends - Use Playwright MCP, Chrome DevTools MCP, or any npm package
  • Dynamic Tools - Tools are dynamically loaded from the backend
  • Low Overhead - Only 3 session management tools + backend tools
  • Free & Local - No cloud service required

Installation

With Claude Code

Add to your MCP settings:

json
{
  "mcpServers": {
    "playwright-parallel": {
      "command": "npx",
      "args": ["playwright-parallel-mcp"]
    }
  }
}

With npm

bash
npm install -g playwright-parallel-mcp
playwright-parallel-mcp

Available Tools

Session Management (3 tools)

ToolDescription
create_sessionCreate a new isolated browser session
close_sessionClose a browser session and terminate its backend process
list_sessionsList all active sessions

Backend Tools (dynamically loaded)

All tools from the backend MCP server are automatically available with an added sessionId parameter. For example, with the default Playwright backend:

ToolDescription
browser_navigateNavigate to a URL
browser_snapshotGet accessibility tree snapshot
browser_clickClick an element
browser_fillFill a form input
browser_typeType text
browser_press_keyPress keyboard key
...And many more from @playwright/mcp

Usage Examples

Basic Navigation

User: Open example.com and take a screenshot

Claude: I'll create a browser session and navigate to example.com.

[create_session] -> sessionId: "abc123"
[browser_navigate sessionId="abc123" url="https://example.com"]
[browser_screenshot sessionId="abc123"]

Parallel Sessions

User: Compare the homepage of two websites side by side

Claude: I'll create two browser sessions in parallel.

[create_session] -> sessionId: "session-a"
[create_session] -> sessionId: "session-b"
[browser_navigate sessionId="session-a" url="https://example.com"]
[browser_navigate sessionId="session-b" url="https://google.com"]
[browser_snapshot sessionId="session-a"]
[browser_snapshot sessionId="session-b"]

Form Interaction

User: Fill out the login form

Claude: I'll fill in the form fields and submit.

[browser_fill sessionId="abc123" element="Email input" ref="e1" value="user@example.com"]
[browser_fill sessionId="abc123" element="Password input" ref="e2" value="***"]
[browser_click sessionId="abc123" element="Submit button" ref="e3"]

Backend Configuration

Default Backend (Playwright)

By default, playwright-parallel-mcp uses @playwright/mcp as the backend:

json
{
  "mcpServers": {
    "playwright-parallel": {
      "command": "npx",
      "args": ["playwright-parallel-mcp"]
    }
  }
}

Chrome DevTools Backend

To use Chrome DevTools MCP instead:

json
{
  "mcpServers": {
    "playwright-parallel": {
      "command": "npx",
      "args": ["playwright-parallel-mcp"],
      "env": {
        "MCP_BACKEND": "chrome-devtools"
      }
    }
  }
}

Custom Backend

Any npm package that provides an MCP server can be used:

json
{
  "mcpServers": {
    "playwright-parallel": {
      "command": "npx",
      "args": ["playwright-parallel-mcp"],
      "env": {
        "MCP_BACKEND": "my-custom-mcp-server"
      }
    }
  }
}

Environment Variables

VariableDefaultDescription
MCP_BACKENDplaywrightBackend MCP server: playwright, chrome-devtools, or any npm package
MAX_SESSIONS10Maximum number of concurrent browser sessions
SESSION_TIMEOUT_MS3600000Session inactivity timeout (1 hour)

Comparison

FeatureChrome DevTools MCPPlaywright MCPThis Project
Parallel SessionsNoNoYes
Session IsolationNoNoYes (Process-level)
Backend ChoiceChrome onlyPlaywright onlyAny MCP server
Tool UpdatesManualManualAutomatic (@latest)
CostFreeFreeFree

Requirements

  • Node.js 20+
  • Backend browser requirements (e.g., Playwright browsers)

Development

bash
git clone https://github.com/sumyapp/playwright-parallel-mcp
cd playwright-parallel-mcp
pnpm install
pnpm build
pnpm start

Running Tests

bash
pnpm test

Project Structure

src/
  index.ts           # MCP server entry point with tool definitions
  session-manager.ts # Session lifecycle management
  mcp-client.ts      # MCP client for child process communication
  types.ts           # Type definitions and backend configuration

Security Warning

This MCP server provides powerful browser automation capabilities.

  • Backend tools like browser_evaluate execute arbitrary JavaScript
  • File upload tools can access the file system
  • Only use in controlled environments with trusted clients

License

MIT

Installation

TypingMind
{
  "mcpServers": {
    "playwright-parallel-mcp": {
      "command": "npx",
      "args": [
        "playwright-parallel-mcp"
      ]
    }
  }
}

Available Tools

  • create_session

    Create a new isolated browser session

  • close_session

    Close a browser session

  • list_sessions

    List all active browser sessions

  • navigate

    Navigate to a URL

  • go_back

    Go back in browser history

  • go_forward

    Go forward in browser history

  • reload

    Reload the current page

  • get_url

    Get the current URL and page title

  • snapshot

    Get accessibility tree snapshot of the current page (ARIA snapshot format)

  • screenshot

    Take a screenshot of the current page

  • get_content

    Get the text content of the page or an element

  • get_html

    Get the HTML of the page or an element

  • get_console_logs

    Get console logs from the browser session

  • get_network_logs

    Get network request logs from the browser session

  • run_script

    Execute JavaScript in the browser context

  • get_cookies

    Get cookies from the browser context

  • set_cookies

    Set cookies in the browser context

  • get_storage

    Get localStorage or sessionStorage values

  • set_storage

    Set localStorage or sessionStorage values

  • click

    Click on an element

  • fill

    Fill in a form field

  • select_option

    Select option(s) from a dropdown

  • hover

    Hover over an element

  • press_key

    Press a key or key combination

  • type

    Type text with realistic key-by-key input simulation

  • check

    Check a checkbox

  • uncheck

    Uncheck a checkbox

  • wait_for_selector

    Wait for an element to appear in the DOM

  • wait_for_load_state

    Wait for page to reach a specific load state

  • wait_for_url

    Wait for URL to match a pattern

  • wait_for_function

    Wait for a JavaScript function to return truthy value

  • wait_for_timeout

    Wait for a specified amount of time

  • get_dialogs

    Get dialog history from the session

  • set_dialog_handler

    Configure automatic dialog handling

  • get_element_state

    Get the state of an element (visible, enabled, checked, editable)

  • get_attribute

    Get an attribute value from an element

  • get_bounding_box

    Get the bounding box of an element

  • count_elements

    Count elements matching a selector

  • get_all_texts

    Get text content from all elements matching a selector

  • upload_file

    Upload file(s) to a file input element

  • drag_and_drop

    Drag an element and drop it on another element

  • scroll

    Scroll the page or an element

  • scroll_into_view

    Scroll an element into view

  • mouse_move

    Move mouse to specific coordinates

  • mouse_click

    Click at specific coordinates

  • mouse_down

    Press mouse button down

  • mouse_up

    Release mouse button

  • mouse_wheel

    Scroll using mouse wheel

  • set_viewport

    Change the viewport size

  • set_geolocation

    Set geolocation for the browser context

  • set_offline

    Set browser offline/online mode

  • set_extra_http_headers

    Set extra HTTP headers for all requests

  • generate_pdf

    Generate a PDF of the current page (Chromium only)

  • list_frames

    List all frames in the page

  • frame_click

    Click on an element within a frame

  • frame_fill

    Fill an input within a frame

  • frame_get_content

    Get text content from an element within a frame

  • get_page_errors

    Get JavaScript errors from the page

  • clear_logs

    Clear console logs, network logs, or page errors

  • expose_function

    Expose a function to the page that logs calls

  • add_init_script

    Add a script to run before page load

  • get_metrics

    Get page performance metrics

  • get_accessibility_tree

    Get the accessibility tree (ARIA snapshot) of the page or element

Use playwright-parallel-mcp MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once playwright-parallel-mcp is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add playwright-parallel-mcp as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the playwright-parallel-mcp MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "playwright-parallel-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "playwright-parallel-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the playwright-parallel-mcp MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the playwright-parallel-mcp MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use playwright-parallel-mcp to help me with this task?
playwright-parallel-mcp
Sure. I read it.
Here is what I found using playwright-parallel-mcp.

Frequently asked questions

What is the playwright-parallel-mcp MCP server used for?

playwright-parallel-mcp is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use playwright-parallel-mcp MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use playwright-parallel-mcp with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use playwright-parallel-mcp MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With playwright-parallel-mcp connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect playwright-parallel-mcp MCP to TypingMind?

playwright-parallel-mcp runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does playwright-parallel-mcp MCP provide in TypingMind?

playwright-parallel-mcp exposes 63 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use playwright-parallel-mcp MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If playwright-parallel-mcp requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇