Playwright MCP
- MCP server
- Official
- Tested by us
Microsoft's Playwright MCP lets Claude open a real browser, click, type and read pages, so it can test your site the way a visitor would.
MCP serverWeb and browserOn this page8 sections
Best for
- Clicking through your own web app to find broken flows
- Filling and checking forms automatically
- Reading pages that need JavaScript to load
Quick install
Local stdio server run with npx (requires Node.js 18 or newer)
Before you start
Install Node.js 18 or newer.
- Claude Desktop
Settings > Developer > Edit Config, add
{"mcpServers":{"playwright":{"command":"npx","args":["@playwright/mcp@latest"]}}}, save and restart.
Ask Claude to open a page, for example: Open example.com (opens in a new tab) and tell me the page title.
claude mcp add playwright npx @playwright/mcp@latestAsk Claude to open a page, for example: Open example.com (opens in a new tab) and tell me the page title.
Install Node.js 18 or newer.
Claude Code:
claude mcp add playwright npx @playwright/mcp@latestClaude Desktop: Settings > Developer > Edit Config, add
{"mcpServers":{"playwright":{"command":"npx","args":["@playwright/mcp@latest"]}}}, save and restart.
Ask Claude to open a page, for example: Open example.com (opens in a new tab) and tell me the page title.
At a glance
- Type
- MCP server
- Made by
- Microsoft (official)
- Tested by us
- Yes
- Works with
- Claude Desktop
- Claude Code
- Sign-in needed
- NoNo account or API key. Sites you visit may still ask you to log in inside the browser it opens.
- Cost
- Free and open source (Apache-2.0). Runs on your own computer.
- License
- Apache-2.0
- Registry name
io.github.microsoft/playwright-mcp- Facts checked
What it does (plain English)
Playwright MCP gives Claude its own web browser. Claude can open a URL, click buttons, type into fields, pick options from dropdowns, upload files, read console errors and take screenshots. An MCP server is a plug-in that gives Claude a new ability; this one comes from Microsoft’s Playwright team, the people behind the Playwright browser-testing library.
Instead of guessing from screenshots, it reads the page’s accessibility tree: the same structured list of buttons, links and headings that screen readers use. The README describes this as “LLM-friendly” because no vision model is needed and actions land on exact elements rather than pixel positions.
It runs on your computer. By default it opens a visible (“headed”) browser window, so you can watch what Claude does.
Is it for you?
Pick it if you are building a website or web app with Claude and want Claude to check its own work: “go sign up with a test email and tell me what breaks.” It is also handy for reading pages that only fill in after JavaScript runs.
It needs Claude Desktop or Claude Code, because it is a local program. It does not work as a claude.ai web connector.
One honest note from the README itself: if you mainly use a coding agent like Claude Code, Microsoft suggests its newer Playwright CLI with Skills may use fewer tokens, because MCP loads large tool lists and page snapshots into Claude’s context. The MCP version still makes sense for longer, back-and-forth sessions where keeping the browser open matters.
What you can do with it
- Smoke-test a sign-up flow: “Open http://localhost:4321, click Sign up, fill the form with test data, submit, and report any error message or console error.”
- Check a form’s validation: “Try submitting the contact form empty, then with an invalid email, and list what each attempt shows.”
- Compare light and dark mode: the
browser_emulate_mediatool can switch the colour scheme; ask Claude to screenshot both. - Debug a slow page: “Load the pricing page and list the network requests that failed.” It has
browser_network_requestsfor this. - Read a JavaScript-heavy page: “Open this dashboard URL and summarise the table.”
How to set it up
-
Install Node.js 18 or newer (the README’s stated requirement). Check with
node --version. -
Claude Code: run
claude mcp add playwright npx @playwright/mcp@latest -
Claude Desktop: open Settings > Developer > Edit Config and add the README’s standard config:
{ "mcpServers": { "playwright": { "command": "npx", "args": ["@playwright/mcp@latest"] } } }Save the file and restart Claude Desktop.
-
Start a chat and ask: “Open https://example.com and tell me the page title.” A browser window should appear.
-
Optional flags go after the package name in
args, for example--headlessto hide the window,--isolatedto keep each session’s logins separate, or--caps vision,pdffor extra capabilities.
What we tested (2026-10-18): we ran npx -y @playwright/mcp@latest (package version 0.0.83) in a Linux sandbox, completed the MCP handshake and listed 25 tools, including browser_navigate, browser_click, browser_snapshot and browser_fill_form. We then called browser_navigate on https://example.com and got back the page title “Example Domain”. Our container blocks Chromium’s sandbox, so that run needed --headless --isolated --no-sandbox; on a normal Mac or Windows machine you should not need --no-sandbox. Output is saved in our test log.
Watch out for
- Not a security boundary. The README says so plainly. Claude acts in a real browser, so anything you are logged into in that profile, it can reach.
- Logins persist. By default it uses a persistent profile (on macOS under
~/Library/Caches/ms-playwright/), so cookies stay between sessions. Use--isolatedif you want a clean slate each time. - An “unsafe” tool exists.
browser_run_code_unsaferuns arbitrary Playwright code; its own description calls it RCE-equivalent (able to run any code on your machine). Approve it only when you know why it is being called. - Context size. Page snapshots can be long. On big pages, ask Claude to use
browser_findto search the snapshot instead of capturing the whole thing. - Docker is headless-only. The Docker image only supports headless Chromium.
Alternatives
- Firecrawl MCP if you only need page content turned into clean Markdown, not clicks.
- Cloudflare’s Browser Run MCP server (
https://browser.mcp.cloudflare.com/mcp) for fetching pages and screenshots from a hosted service rather than your own machine. - Exa MCP when the job is finding pages by searching, not driving one.
Sources
- github.com/microsoft/playwright-mcp (opens in a new tab)
- raw.githubusercontent.com/microsoft/playwright-mcp/main/README.md (opens in a new tab)
- raw.githubusercontent.com/microsoft/playwright-mcp/main/LICENSE (opens in a new tab)
- registry.modelcontextprotocol.io/v0.1/servers?search=playwright (opens in a new tab)
- npmjs.com/package/@playwright/mcp (opens in a new tab)
Related tools
Claude in Chrome
by Anthropic
- Connector
- Official
Anthropic's Chrome extension lets Claude click, type and read pages in your own signed-in browser, from a side panel, Claude Desktop or Claude Code.
Works with- Claude.ai
- Claude Desktop
- Claude Code
Notion MCP
by Notion
- MCP server
- Official
Notion's hosted MCP server lets Claude search your workspace, read pages as Markdown, and create or update pages and databases you can access.
Works with- Claude.ai
- Claude Desktop
- Claude Code
Exa MCP Server
by Exa
- Connector
- Official
Exa's hosted MCP server adds Exa web search and clean page fetching to Claude, with an optional research agent for multi-step lookups.
Works with- Claude.ai
- Claude Desktop
- Claude Code
Fetch MCP server
by Model Context Protocol project
- MCP server
- Official
- Tested by us
The MCP project's reference server for reading web pages: Claude fetches a URL and gets it as Markdown, in chunks, with private addresses blocked.
Works with- Claude Desktop
- Claude Code