This is an early release preview. You may encounter bugs.
Playwright MCP logo
Unclaimed

Tool interface

Playwright MCP

MCP server giving LLMs Playwright browser automation through structured accessibility snapshots rather than screenshots

Built by Microsoft

A 86/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
No votes yet

01 / About

What Playwright MCP is.

Playwright MCP is a Model Context Protocol (MCP) server that lets a language model drive a web browser through Playwright. Rather than sending screenshots, the server hands the model a structured accessibility snapshot of the page; tools then act on elements referenced from that snapshot. This means a text-only model can browse without a vision model, and tool calls resolve to specific elements instead of pixel coordinates.

An MCP client such as VS Code, Cursor, Windsurf, Claude Desktop, Claude Code, Codex, Goose, Gemini CLI, or Warp spawns the server over stdio, or you run it as a standalone HTTP server or Docker container (headless Chromium only) that several clients can reach. Command-line options select the browser or Chrome channel, headed or headless mode, device emulation, a persistent or isolated user profile, a CDP endpoint to attach to, allowed and blocked origins, and optional capability groups.

The project frames MCP as the interface for agentic loops that need persistent browser state and iterative reasoning over page structure, such as exploratory automation, self-healing tests, and long-running autonomous workflows. For coding agents that must conserve context, it points to the separate Playwright CLI with skills, which avoids loading tool schemas and accessibility trees into the model context.

Features

  • Accessibility snapshots: browser_snapshot returns the page as structured data that later tool calls reference by element
  • Interaction tools: click, type, hover, drag and drop, fill forms, select options, press keys, upload files, handle dialogs, and wait for text or time
  • Navigation and tabs: navigate, go back, resize the viewport, and list, open, or close tabs
  • Network control: list requests, issue requests, set route mocks, and toggle network state such as offline
  • Storage tools: get, set, delete, and clear cookies, localStorage, and sessionStorage, plus export and restore full storage state
  • Diagnostics: console messages by level, screenshots, PDF export, Playwright tracing, and video recording with chapters and action overlays
  • Verification tools: assert that an element, text, list, or value is visible, and generate a locator for an element
  • Code generation: records actions as Playwright code in TypeScript, Python, Java, or C# (or none)
  • Optional capabilities: --caps vision adds coordinate-based mouse tools, pdf adds PDF export, and devtools adds developer-tools access
  • Browser and profile options: Chrome, Firefox, WebKit, or Edge; persistent, isolated, or extension-attached sessions; device emulation such as iPhone 15
  • Initial state: storage state files, init scripts, and TypeScript init-page files set up context before a session
  • Access boundaries: allowed and blocked origin lists, workspace-scoped file access, host checks for the HTTP server, and explicit permission grants such as geolocation

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

04 / Build

Build with Playwright MCP.

Browse the catalogue for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get Playwright MCP →

Browse the catalogue