home / mcp / playwright record mcp server

Playwright Record MCP Server

playwright-mcp with video record

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "korwabs-playwright-record-mcp": {
      "command": "npx",
      "args": [
        "@playwright/record-mcp@latest"
      ],
      "env": {
        "YOUR_TOKEN": "YOUR_TOKEN"
      }
    }
  }
}

The Playwright Record MCP server provides browser automation via Playwright with built-in video recording, designed for use by MCP clients and LLM-driven agents. It emphasizes structuring interactions through accessibility snapshots rather than pixel-based visuals, enabling reliable automation and analysis of web activity.

How to use

To use the Playwright Record MCP server with an MCP client, install the server, then launch it via the supported runtime command. Run in an environment where you want to automate browser interactions and capture video when needed. Use the MCP client to invoke the available browser actions (snapshot, click, navigate, type, and recording controls) and manage recordings as part of your automated workflows.

How to install

Prerequisites: Node.js 18 or higher, and a supported browser installed on your system.

Installation via npm or npx can be done with the following commands:

npm install @playwright/record-mcp
```

```bash
npx @playwright/record-mcp

Additional sections

Configuration and usage options are provided to tailor how the server runs and records video. The server supports running with different browsers, enabling or disabling vision-based interaction, and recording browser activity to a file in configurable formats. You can also run a headed or headless browser, and you can specify a port for SSE transport when running in environments without a display.

Key configuration examples show how to enable headless operation and how to enable video recording. The NPX configuration demonstrates how to register the MCP server under a named entry, and the CLI options document the runtime flags available to customize behavior.

Video recording features include starting and stopping the capture, choosing a file path, and selecting a format such as mp4 or webm. The server can capture interactions as a video while performing browser actions through MCP invocations.

There are examples showing how to start recording, navigate to a page, take a snapshot, interact with elements, and stop the recording. These illustrate a typical workflow combining browser navigation, interaction, and recording.

Supported browsers include Chrome, Firefox, WebKit, and Microsoft Edge. The server requires Node.js 18+ and a browser installation, or the use of a browser-install tool if available.

The Docker-based deployment is also described, with a note that the Docker image currently supports headless Chromium. Build commands and run examples are provided to help you containerize the server.

MCP server configurations

The Playwright Record MCP can be run as a local stdio server using a command like npx with the latest package, optionally including the headless flag. An example configuration shows how to register this server under the mcpServers section.

Example stdio configuration (headless by default) shows how to start the MCP server locally via npx and pass additional flags if needed.

Notes

If you operate a displayless environment, you may need to run the server with a DISPLAY available and specify the SSE transport port to enable communication with the MCP client.

Video recording is a new feature and may require additional permissions or runtime considerations depending on the environment. Ensure you comply with applicable policies for automated web interactions and recording.