talira

Playwright MCP

Playwright MCP server: browser automation for AI agents through accessibility snapshots

open sourceApache-2.0self-hostablefreeMCP

Playwright MCP is Microsoft's MCP server that lets an AI agent drive a browser with Playwright, reading pages as structured accessibility snapshots rather than screenshots. By default it launches its own browser with a persistent or isolated profile; with --extension and the Playwright Extension from the Chrome Web Store it connects to the Chrome or Edge you already have open, with your sign-ins, cookies and other extensions. In extension mode several MCP clients can be connected at once: each gets its own named, coloured tab group, a tab belongs to one client at a time, and you approve each connection or skip the prompt with a per-profile PLAYWRIGHT_MCP_EXTENSION_TOKEN. It runs locally over stdio, or over HTTP with --port, and works with any MCP client (Claude Code, Codex, Cursor, VS Code, Gemini CLI and others); it isn't tied to any AI account.

Ways to install

Problems it solves

  • let Claude Code drive the Chrome I'm already logged into instead of a fresh browser
  • my coding agent needs to use a site behind SSO and 2FA that I've already signed into
  • connect Codex or Cursor to my real browser tabs over MCP without any Anthropic sign-in
  • an alternative to Claude in Chrome that doesn't care which Claude account I'm logged in with
  • run many agent sessions against one Chrome without them fighting over the same tab
  • give each agent session its own tab group in my browser so I can see what it's doing
  • stop approving the browser connection every time a new agent session starts
  • let an AI agent click through a web app using the accessibility tree, not screenshots
  • browser automation MCP server for a coding agent to test my local web app
  • keep the agent's browser in the background so it doesn't steal focus while I work
  • agent browser that starts with a clean isolated profile for each test session
  • point an agent at a specific Chrome profile, like my work profile, not the default one

Features

  • accessibility-snapshot tools: navigate, click, type, fill forms, tabs, screenshots, console and network
  • --extension connects to your running Chrome or Edge through the Playwright Extension
  • each connected client gets its own tab group, named and coloured by --session-name and --session-color
  • several clients connected at once; a tab belongs to one client at a time
  • PLAYWRIGHT_MCP_EXTENSION_TOKEN skips the per-connection approval
  • --background keeps controlled tabs from taking focus (extension 0.5.0 or later)
  • --profile-dir-name picks the Chrome profile
  • persistent, isolated (--isolated) or storage-state profiles when it launches its own browser
  • stdio, or HTTP with --port; --cdp-endpoint for a remote browser
  • Chromium, Firefox and WebKit when it launches the browser itself

Limitations

  • Extension mode works only in Chrome and Edge: Firefox and WebKit only when it launches its own browser23
  • Can't control a tab whose page has a frame from another extension or a chrome:// URL: Chrome detaches the debugger3
  • Can't change browser-wide state in extension mode: adding or clearing cookies and granting permissions are refused3
  • Isn't a security boundary: an agent connected to it can act as you on every site the browser is signed into2

Capabilities

Has a command line toolplan not known
Has an MCP serverplan not known

Alternatives

The same job

These do what Playwright MCP does.

  1. Browser MCP Let AI apps use your real Chrome, with your logins, in tabs you can watch and stop
  2. Browser Use Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API
  3. Claude in Chrome Anthropic's Chrome extension: Claude browses, clicks and fills forms in your own browser
  4. Real Browser MCP MCP server and Chrome extension for the Chrome you already have open
  5. BrowserTools MCP Give your AI coding agent eyes on the browser: console, network, screenshots and Lighthouse audits
  6. mcp-chrome Chrome MCP Server: a Chrome extension that exposes your browser to AI assistants over MCP

Compare Playwright MCP with the top 3