Skip to content
MCP Shelf

Playwright MCP

View on GitHub

Microsoft's browser automation server: navigate, click, type, read.

  • Started in our test
  • ★ 38.7K GitHub stars
  • 3.8M downloads a week
  • Last commit 22 Oct 2026

At a glance

Playwright MCP gives the assistant a real Chromium, Firefox or WebKit browser. Instead of screenshots it reads pages through the accessibility tree, which is cheaper on context and more reliable for clicking the right button.

It is the default choice for "go to this site and do X" and for checking your own web app after a change.

Made by
Microsoft (the Playwright team)
Licence
Apache-2.0
Latest version
0.0.83 (28 Sept 2026)
npm package
@playwright/mcp
GitHub stars
38.7K
Downloads
3.8M a week
Last commit
22 Oct 2026
Tools
25
Runs on
Your computer

Our check: We ran this exact config on 26 Oct 2026: it started and answered with 25 tools.

What's in the pod: its tools

We found 25 tools when we started it on 26 Oct 2026. 7 only read. The rest can change things, so keep your app's "ask before each tool call" setting on for them.

Runs commands1 tool · Can start programs or run code.

ToolWhat it is for
browser_run_code_unsafeRuns a snippet of Playwright code inside the server process. Treat it like a shell.

Changes things17 tools · Can create, edit, send or delete.

ToolWhat it is for
browser_clickClicks a button, link or other element, with an optional double click, mouse button or modifier keys.
browser_closeShuts the current page.
browser_dragDrags one element and drops it on another.
browser_dropDrops files or raw data onto an element, as if dragged in from your desktop.
browser_emulate_mediaSwitches the page to dark mode, reduced motion, print styles and similar media settings.
browser_evaluateRuns a JavaScript function on the page or on one element and returns the result.
browser_file_uploadPicks local files for an open file chooser.
browser_fill_formFills several form fields in one go.
browser_handle_dialogAccepts or dismisses an alert, confirm or prompt box.
browser_hoverMoves the mouse over an element to reveal menus or tooltips.
browser_navigateOpens a URL.
browser_navigate_backGoes back one page in history.
browser_press_keyPresses a single key, such as Enter or an arrow.
browser_resizeChanges the window size, for checking layouts at other widths.
browser_select_optionChooses one or more values in a drop-down list.
browser_tabsLists, opens, switches or closes tabs.
browser_typeTypes text into a field, optionally pressing Enter afterwards.

Only reads7 tools · Looks things up and changes nothing.

ToolWhat it is for
browser_console_messagesReturns what the page logged to the browser console, filtered by level.
browser_findSearches the page's accessibility tree for text or a pattern.
browser_network_requestShows the headers and body of one recorded request.
browser_network_requestsLists the requests the page has made since it loaded.
browser_snapshotReads the page as a structured outline of its elements, which the assistant uses to decide what to click.
browser_take_screenshotSaves an image of the page or of one element.
browser_wait_forWaits for some text to appear or vanish, or for a set time.

Grouped and described by us. The README on GitHub lists the inputs each tool takes.

Set it up

Pick your app for the exact snippet and where it goes.

Where it goes: claude_desktop_config.json (Settings → Developer → Edit Config)

Claude Desktop
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ]
    }
  }
}

Add "--headless" to args if you do not want a browser window to open.

New to this? See the setup guides for Claude Code, Cursor, Claude Desktop and ChatGPT.

Settings

Names are exactly as the project spells them. Required ones are marked.

SettingWhat it does
--headlessCommand line flagRuns the browser without a visible window. Without it you watch every step.--headless
--browserCommand line flagChooses the browser: chrome, firefox, webkit or msedge.--browser=firefox
--isolatedCommand line flagKeeps the browser profile in memory, so nothing (cookies, logins) is saved between sessions.--isolated
--user-data-dirCommand line flagPoints at a profile folder you choose, so logins persist where you want them.--user-data-dir=./pw-profile
--storage-stateCommand line flagLoads saved cookies and local storage into an isolated session, so it starts logged in.--storage-state=auth.json
--extensionCommand line flagDrives your already-open Chrome or Edge through the Playwright browser extension instead of a new browser.--extension
--capsCommand line flagTurns on extra tool sets: vision (click by coordinates), pdf and devtools.--caps=vision,pdf
--allowed-originsCommand line flagLimits which sites the browser may request. Useful, but the project says it is not a security boundary.--allowed-origins=https://example.com
--deviceCommand line flagEmulates a phone or tablet by name.--device="iPhone 15"
--viewport-sizeCommand line flagSets the window size in pixels.--viewport-size=1280x720

What it can touch

It can read

  • Any web page the browser can open, including pages behind logins kept in its profile
  • Console output and network traffic of those pages

It can change

  • Submits forms, clicks buttons and uploads files as you, on any site it is logged into
  • Can run JavaScript on pages, and browser_run_code_unsafe can run code on your machine

Safer setup: Use --isolated so no logins carry over, keep the browser headed so you can watch, and narrow sites with --allowed-origins. Leave your client asking before each tool call.

Before you start

  • Node.js 18 or newer
  • A browser download on first run (Playwright handles it)

If it does not work

The browser is not installed, or the first run hangs
Playwright downloads its browser on first use. Run npx playwright install chromium once, or pick an installed one with --browser=chrome.
"Browser is already in use" when a second app connects
A saved profile can serve only one browser at a time. Start the second client with --isolated or its own --user-data-dir.
It runs on a server or in Docker and crashes on launch
There is no display, so add --headless. In some containers you also need --no-sandbox.
The assistant clicks the wrong thing on a busy page
Ask it to take a fresh browser_snapshot first, or turn on --caps=vision so it can click by position on a screenshot.

Peas in a pod: similar servers

How Playwright MCP lines up against other browser and web data servers on the shelf.

ServerToolsRuns onLicenceStars
Playwright MCP25Your computerApache-2.038.7K
Firecrawl28Your computerMIT7.7K
Exa2Your computer or hosted–5.2K
Bright Data32Your computerMIT2.7K
SearXNG4Your computerMIT1.3K

Questions

Does Playwright MCP use screenshots to see the page?

Not by default. It reads the page's accessibility tree, a text outline of headings, buttons and fields, which is faster and cheaper than images. Screenshots are available as a separate tool.

Can it log in to sites for me?

Yes. Log in once in the browser it opens and the profile remembers you, or load saved cookies with --storage-state. Use --isolated when you want a clean session every time.

Is it the same as the Playwright test framework?

It is built on the same library by the same team, but it is a server for AI assistants, not a test runner. It can generate Playwright test code from what it did.

Which browsers does it support?

Chromium by default, plus Chrome, Edge, Firefox and WebKit through the --browser setting.

Full docs on GitHubmicrosoft/playwright-mcp

Something wrong on this page? Tell us.

More in Browser and web data