Playwright

Bridges Playwright with MCP to automate browser tasks via natural language prompts, including vision-based interactions, PDF exports, and tests.
  • html

0

GitHub Stars

html

Language

7 months ago

First Indexed

3 months 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": {
    "sumit06-09-playwright_mcp": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest",
        "--caps=vision,pdf,testing,tracing"
      ]
    }
  }
}

You can control Playwright through natural language prompts using the Model Context Protocol (MCP). This lets you describe browser automation tasks in plain language and have them translated into browser actions, with capabilities like vision-based interactions, PDF exports, and testing assertions. This approach enables rapid prototyping and AI-assisted testing without writing explicit Playwright code.

How to use

Start the MCP server and then connect your AI assistant to issue natural language commands. The server exposes a local endpoint that your AI tools can reach to perform browser actions through MCP.

How to install

Prerequisites: you need Node.js and npm, plus Playwright. Follow these steps to set up the environment and run the MCP-enabled Playwright workflow.

# Install dependencies for the project
npm install

# Install Playwright browsers if not present
npx playwright install

Configuration and usage tips

The MCP server is configured to run with specific capabilities that enable browser automation features. You start the server, then issue natural language commands through your preferred AI tool to control the browser.

# Start the MCP-enabled Playwright server with vision, pdf, testing, and tracing capabilities
npx @playwright/mcp@latest --caps=vision,pdf,testing,tracing --output-dir=playwright-mcp-output

Configuration details

MCP server configuration is defined to run as a local process via npx. The server exposes an endpoint for MCP-based browser actions and is designed to work with compatible AI assistants.

{
  "servers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest",
        "--caps=vision,pdf,testing,tracing"
      ],
      "env": {}
    }
  }
}

Available tools

vision

Enable coordinates-based interactions and optical character recognition (OCR) to locate and interact with elements on the screen.

pdf

Capture and export the current page as a PDF for documentation or sharing.

testing

Run assertions on visibility, text content, values, and other page state to validate outcomes.

tracing

Collect detailed traces for debugging and performance analysis of browser automation tasks.

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