MCP Playwright Server

Provides multi-browser automation for MCP clients, with Claude Desktop compatibility and Docker-ready deployments.
  • javascript

0

GitHub Stars

javascript

Language

3 months ago

First Indexed

3 weeks ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mostafaraafat91-mcp-playwright-server": {
      "command": "node",
      "args": [
        "/path/to/your/mcpplaywright/src/index.js"
      ],
      "env": {
        "PLAYWRIGHT_SLOWMO": "100",
        "PLAYWRIGHT_HEADLESS": "true"
      }
    }
  }
}

MCP Playwright Server provides browser automation capabilities powered by Playwright and connects with MCP clients such as Claude Desktop. It supports multiple browsers, offers a production-ready Docker path, and is designed for AI-driven testing, scraping, and automation workflows.

How to use

You run the MCP Playwright Server locally or in Docker and connect your MCP client to control browser automation. Start by launching the server in headless mode (default) or headed mode if you need to see the browser. You can perform common automation actions such as launching a browser, creating pages, navigating to URLs, interacting with elements, taking screenshots, and retrieving text. Use the server with Claude Desktop or any MCP-compatible client by configuring an MCP server entry that points to the running process and enables the appropriate environment settings.

How to install

Prerequisites: ensure you have Node.js installed (preferably an active LTS version) and npm available in your environment.

# One-line global install and start
npm install -g mcp-playwright && mcp-playwright start

Local development flow to run the server directly after cloning a project (adjust paths as needed):

# Install dependencies
npm install

# Install Playwright browsers (Chromium, Firefox, WebKit)
npm run install:browsers

# Start the MCP server
npm start

Docker deployment flow to build and run the container:

# Build the Docker image
npm run docker:build

# Run the container
npm run docker:run

Configuration and usage notes

Configure the MCP server to integrate with Claude Desktop or other MCP clients by providing an MCP configuration that specifies how to start the server and which environment variables to apply. The server can run in headless mode by default, which is suitable for CI and automated testing pipelines.

Configuration examples for Claude Desktop

{
  "mcpServers": {
    "playwright": {
      "command": "node",
      "args": ["/path/to/your/mcpplaywright/src/index.js"],
      "env": {
        "PLAYWRIGHT_HEADLESS": "true"
      }
    }
  }
}
{
  "mcpServers": {
    "playwright": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "mcp-playwright"],
      "env": {
        "PLAYWRIGHT_HEADLESS": "true"
      }
    }
  }
}

Available tools

launch_browser

Launch a new browser instance with specified browser type and options.

new_page

Create a new page within an existing browser session.

navigate

Navigate the active page to a given URL.

click

Click on a UI element identified by a selector.

type_text

Type text into an input field identified by a selector.

get_text

Extract text content from elements matching a selector.

screenshot

Capture a screenshot of the current page.

wait_for_selector

Wait until a selector appears on the page.

close_page

Close a specific page in a browser.

close_browser

Close the browser and all its pages.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational