Playwright

Playwright

A Model Context Protocol (MCP) server that provides browser automation capabilities using Playwright.

23,622
Stars
1,912
Forks
20
Releases

Overview

Playwright MCP is a Model Context Protocol server that exposes browser automation to large language models via structured accessibility data from Playwright. It avoids pixel-based inputs and screenshots, delivering a machine-readable accessibility tree and page data to enable reliable reasoning and deterministic actions. The server supports core tasks such as clicking, navigation, typing, form filling, page snapshots, and retrieval of console messages and network requests, all through MCP commands. It can run with persistent or isolated browser contexts, supports storage-state and initialization scripts, and offers optional tracing, video capture, and page snapshots. Deployment options include standalone mode on a port, Docker, or programmatic integration with custom transports. Configuration is via JSON schemas or CLI options for host, port, allowed origins, browser type, and capabilities, and it is designed to work with many MCP clients like VS Code, Cursor, Windsurf, Claude Desktop, Goose, and others. The README also lists a rich set of core automation tools accessible by the MCP server.

Details

Owner
microsoft
Language
TypeScript
License
Apache License 2.0
Updated
2025-12-07

Features

Fast and lightweight

Uses Playwright's accessibility tree rather than pixel-based input, enabling rapid, deterministic interactions.

LLM-friendly

No vision models needed; operates on structured accessibility data, making it suitable for LLM-based automation.

Deterministic tool application

Provides predictable interactions by avoiding ambiguity common with screenshot-based approaches.

Audience

LLMsEnable LLMs to automate and reason about web pages using structured accessibility data.
DevelopersIntegrate Playwright MCP with clients like VS Code, Cursor, Windsurf, Goose.

Tags

playwrightmcpbrowser-automationaccessibility-snapshotstructured-datallm-friendlynodejsdockercli-configprogrammatic-usage