Playwright MCP
Microsoft's official MCP server for browser automation, driving Playwright through structured accessibility snapshots instead of screenshots, so any MCP client can browse, click and fill forms without a vision model.
Overview
Playwright MCP exposes browser automation capabilities through the Model Context Protocol, built on top of Playwright. Instead of feeding screenshots to a vision model, it hands the agent a structured accessibility snapshot of the page.
How it works
It's fast and lightweight, using Playwright's accessibility tree instead of pixel input; LLM-friendly, since it works purely on structured data with no vision model required; and deterministic, avoiding the ambiguity common with screenshot-based approaches.
It supports a persistent profile (keeps you logged in across sessions, like a regular browser) or an isolated profile per session (nothing persists after the browser closes), plus connecting to an existing browser via the Playwright browser extension. Requires Node.js 18+ and works with VS Code, Cursor, Windsurf, Claude Desktop, Goose, Grok, Junie and other MCP clients.
- Register the server with your MCP client using the standard
npx @playwright/mcp@latestconfig. - The agent asks the server to navigate, click, type or take a snapshot.
- Playwright executes the action in a real (headed or headless) browser and returns the resulting accessibility snapshot.
- Optional capabilities (
--caps=vision,pdf,devtools,network,storage,testing) can be opted into for coordinate-based interaction, PDF generation, or test assertions.
Examples
// Standalone HTTP mode, e.g. for headed browsers without a display
npx @playwright/mcp@latest --port 8931
"Go to our staging site, log in as demo@example.com, and tell me what the
dashboard's empty state looks like."
"Open /checkout, fill the form with test data, and report any console errors."
Useful for exploratory automation, self-healing test generation and long-running agentic browsing where the agent needs to reason over page structure, not pixels.
Installation
You need Node.js 18+.
- Add the server to your MCP client's config using the block in the sidebar.
- Restart your client. It downloads the Playwright browser binaries on first run if they aren't already installed.
- Optional: add
--caps=vision,pdf,devtools,network,storage,testingfor extra capabilities, or runnpx @playwright/mcp@latest --port 8931for standalone HTTP mode. - Ask the agent to open a page and take a snapshot to confirm the browser launches correctly.
Related assets
Awesome MCP Servers
The largest community catalog of MCP servers: thousands of entries across dozens of categories (databases, browser automation, cloud, communication and more), tagged by language and scope.
Context7
Pulls updated, version-specific documentation and code examples straight from the source into your prompt, so agents stop citing outdated APIs or hallucinating ones that don't exist.
Debug Mode Agent
Runs a four-phase debugging workflow: reproduces the bug first, traces the root cause, applies a minimal fix, then verifies with tests instead of guessing at a patch.