Playwright MCP

by Microsoft

Official Browser Automation 36k likes

Microsoft's official MCP server that gives coding agents a real, controllable browser — driven through the accessibility tree instead of screenshots, for deterministic clicking, typing, and testing.

Add to Claude Code

claude mcp add playwright npx @playwright/mcp@latest

Source: https://github.com/microsoft/playwright-mcp

About

Playwright MCP operates on the accessibility tree — the structured representation of what's on a page — rather than screenshots and pixel coordinates, so an agent can click, type, fill forms, and navigate deterministically without a vision model in the loop.

Beyond testing, the same tool surface covers general browser automation: scraping structured data, generating PDFs, monitoring network requests, and evaluating JavaScript on a live page.

Key features

  • Accessibility-tree-based interaction — no screenshots or pixel coordinates needed
  • Click, type, fill forms, and navigate deterministically
  • Take screenshots, generate PDFs, and capture network traffic
  • Isolated browser profile by default, or connect to an existing Chrome instance

Use cases

  • Verify a UI change actually works by driving the real browser end to end
  • Scrape structured data from pages that require JavaScript rendering
  • Automate repetitive browser workflows like form submission or data entry

Available tools

browser_navigate

Navigates the browser to a given URL.

browser_snapshot

Captures the current accessibility tree of the page.

browser_click

Clicks an element identified from the accessibility snapshot.

browser_type

Types text into a focused input field.

browser_screenshot

Takes a screenshot of the current page or a specific element.

Frequently asked questions

Does my agent see my logged-in browser?

Not by default — it launches an isolated browser profile. You can point it at a persistent profile or an existing Chrome instance via flags if you need an authenticated session.

What do I need installed?

Node.js 18 or later — Playwright installs its own browser binary automatically on first run.