Logo van playwright-parallel-mcp

playwright-parallel-mcp

Community
sumyapp

MCP server for parallel browser automation with Playwright

Uitgeversumyapp
Repositoryplaywright-parallel-mcp
TaalTypeScript
Forks
8
Sterren
18
Beschikbare tools
63
Transporttypestdio
Categorieën
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    playwright-parallel-mcp biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 63 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    18 sterren en 8 forks in de gekoppelde 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

Installatie

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

Beschikbare 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

Gebruik playwright-parallel-mcp MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra playwright-parallel-mcp is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg playwright-parallel-mcp toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van playwright-parallel-mcp.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "playwright-parallel-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "playwright-parallel-mcp"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van playwright-parallel-mcp in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van playwright-parallel-mcp in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je playwright-parallel-mcp gebruiken om me hiermee te helpen?
playwright-parallel-mcp
Zeker. Ik heb het gelezen.
Dit vond ik met playwright-parallel-mcp.

Veelgestelde vragen

Waarvoor wordt de MCP-server playwright-parallel-mcp gebruikt?

playwright-parallel-mcp is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik playwright-parallel-mcp MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je playwright-parallel-mcp gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom playwright-parallel-mcp MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als playwright-parallel-mcp verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik playwright-parallel-mcp MCP met TypingMind?

playwright-parallel-mcp werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt playwright-parallel-mcp MCP in TypingMind?

playwright-parallel-mcp biedt 63 MCP-tools die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om playwright-parallel-mcp MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als playwright-parallel-mcp authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇