playwright-mcp

10,620

Playwright MCP is a server for browser automation using Playwright, designed to enable language models to interact directly with web pages using structured data. It emphasizes performance and ease of use, eliminating the need for visual testing models.

Playwright MCP

A Model Context Protocol (MCP) server utilizing Playwright for browser automation. It allows LLMs to interact with web pages through accessibility snapshots.

Key Features

  • Fast and lightweight, utilizing Playwright's accessibility tree.
  • LLM-friendly, operating purely on structured data without the need for vision models.
  • Offers deterministic tool application, avoiding ambiguities inherent in screenshot-based methods.

Requirements

  • Node.js 18+
  • Compatible with various MCP clients like VS Code, Cursor, Windsurf.

Configuration

Supports a variety of command-line arguments to customize behavior, such as allowed origins, browsers, and profiles. Configurable via JSON or command line options.

Installation

  • Install via MCP-compatible clients like VS Code, Cursor, or command line.

Tools

Available in two modes: Snapshot Mode for performance and Vision Mode for visual interactions, enabling precise browser automation tasks like navigating, interacting, and testing.

Usage

Start the server with custom configurations or defaults for diverse automation scenarios via MCP clients.

Standalone MCP server

Run a standalone server using SSE transport for integration with other environments.