Playwright Mcp

Author:@microsoft
View on GitHub

Overview

Playwright MCP is a Model Context Protocol server for browser automation. It enables large language models to control and interact with web pages using structured accessibility snapshots, removing the dependency on screenshots or vision models.

To start using it, run npx @playwright/mcp@latest in your terminal. It can be configured to run in headless mode or with a visible display.

Its key features include fast operation via Playwright's accessibility tree, an LLM-friendly design that relies on structured data rather than visual understanding, and deterministic tool application for clearer outcomes compared to image-based methods.

Common use cases are web navigation, form-filling, data extraction from structured content, LLM-driven automated testing, and general-purpose agent interactions with browsers.

Playwright MCP supports a wide range of web automation tasks, including navigation, data extraction, and form submission. It is open-source and free for everyone. Interaction is handled through accessibility snapshots, which enhance performance and reliability.

Configuration

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}