Verified MCP server: Playwright

The Playwright MCP server, verified live on a real Mac.

  • Verified2026-08-03macOS 14.4.1
  • Package@playwright/mcp 0.0.78
  • Self-reportedPlaywright 1.62.0-alpha-1783623505000
  • MCP protocol2025-06-18
  • Runtimev25.8.1

The short answer

Last verified 2026-08-03

The Playwright MCP server lets an AI assistant drive a real browser: open a page, read its structure, click, type, fill forms, and report what it found. It is Microsoft's own MCP wrapper around Playwright, it runs on your own Mac over stdio, and it needs no account, no API key, and no sign-up of any kind. We did not take the README's word for any of that: we ran the server, spoke the protocol to it, enumerated all 24 tools it exposes, made one real tool call, and kept the raw output, including the exact errors it returns when something goes wrong. All of it is on this page. [1][3][6]

  • Tools

    24, enumerated live

  • Credentials

    None needed

  • Transport

    stdio, runs on your Mac [6]

  • Maintainer

    Microsoft [1][3]

  • Downloads

    6.1M last week [2]

  • License

    Apache-2.0 [5]

Verification

How this MCP server was verified.

Method

We spawned the server with npx over stdio with the --headless and --isolated flags, wrote a raw JSON-RPC initialize frame to its standard input and read the reply straight off the wire, then called tools/list and ran one real tool call. This server prints nothing to standard error on startup, so the banner below is that raw initialize response rather than a log line. The tool table is the tools/list capture, word for word.

Startup banner

{"result":{"protocolVersion":"2025-06-18","capabilities":{"tools":{}},"serverInfo":{"name":"Playwright","version":"1.62.0-alpha-1783623505000"}},"jsonrpc":"2.0","id":1}

One real tool call

tools/call browser_navigate {"url": "about:blank"}
### Ran Playwright code
```js
await page.goto('about:blank');

Real lines from the captured result: enough to prove the call answered.

Tools

Every tool, enumerated from the running server.

The server answered tools/list with 24 tools on 2026-08-03. The names, descriptions and parameters below are its own words, copied from that response and never edited.

ToolWhat it does
browser_navigateurl*

Navigate to a URL

browser_navigate_back

Go back to the previous page in the history

browser_snapshottargetfilenamedepthboxes

Capture accessibility snapshot of the current page, this is better than screenshot

browser_findtextregex

Search the accessibility snapshot of the current page for text or a regular expression. Returns matching snapshot nodes with a few lines of surrounding context (like search snippets), each shown under its path from the root of the tree, which is cheaper than capturing the whole snapshot when you only need to locate an element and its ref.

browser_clickelementtarget*doubleClickbuttonmodifiers

Perform click on a web page

browser_typeelementtarget*text*submitslowly

Type text into editable element

browser_fill_formfields*

Fill multiple form fields

browser_select_optionelementtarget*values*

Select an option in a dropdown

browser_hoverelementtarget*

Hover over element on page

browser_press_keykey*

Press a key on the keyboard

browser_dragstartElementstartTarget*endElementendTarget*

Perform drag and drop between two elements

browser_dropelementtarget*pathsdata

Drop files or MIME-typed data onto an element, as if dragged from outside the page. At least one of "paths" or "data" must be provided.

browser_file_uploadpaths

Upload one or multiple files

browser_handle_dialogaccept*promptText

Handle a dialog

browser_wait_fortimetexttextGone

Wait for text to appear or disappear or a specified time to pass

browser_take_screenshotelementtargettype*filenamefullPagescale*

Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.

browser_console_messageslevel*allfilename

Returns all console messages

browser_network_requestsstatic*filterfilename

Returns a numbered list of network requests since loading the page. Use browser_network_request with the number to get full details.

browser_network_requestindex*partfilename

Returns full details (headers and body) of a single network request, or a single part if `part` is set. Use the number from browser_network_requests.

browser_tabsaction*indexurl

List, create, close, or select a browser tab.

browser_resizewidth*height*

Resize the browser window

browser_evaluateelementtargetfunction*filename

Evaluate JavaScript expression on page or element

browser_run_code_unsafecodefilename

Run a Playwright code snippet. Unsafe: executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent.

browser_close

Close the page

Parameters marked with * are required.

Setup

Working configs, one per app.

Copy the block for the app you use. Each one is the configuration this server was verified with.

Claude Desktop

Open the file ~/Library/Application Support/Claude/claude_desktop_config.json (in Claude Desktop: Settings, then Developer, then Edit Config) and add:

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

These are the two flags we verified with. Drop --headless and a browser window opens on screen so you can watch. Drop --isolated and the browser keeps a profile on disk between sessions, which means logins stick around and two clients cannot share it. Quit and reopen Claude Desktop after saving. [7]

Claude Code

One command in your terminal:

claude mcp add playwright -- npx -y @playwright/mcp@latest --headless --isolated

Everything after the double dash is the exact command Claude Code will run, which is what keeps the two flags from being read as flags for the claude command itself. [8]

Cursor

Add to ~/.cursor/mcp.json for every project, or to .cursor/mcp.json inside one project:

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

Cursor picks the file up on restart. If you run Cursor and another MCP client at the same time, keep --isolated in both, or the second one to start hits the profile-in-use error below. [9]

Routines

No JSON file and no terminal. In Routines: Settings, then Assistant, then Connections, then Add MCP Server. Switch the form to Command (stdio) and enter:

Name        Playwright
Command     npx
Arguments   -y @playwright/mcp@latest --headless --isolated

The Arguments field splits on spaces, so paste the line exactly as it is: every piece of it is one space-free word. Click Test Connection first: a working server answers with its tool count, twenty-four for this one. [10]

No terminal needed

Set the Playwright MCP server up without the terminal.

If you have never opened Terminal and never want to, this is your path. Routines is a Mac app that runs MCP servers for you: fill in three fields once, and this server's tools are available to your AI in chat and in scheduled routines.

  1. 01

    Install Routines

    Download the app from getroutines.ai/download, drag it to Applications, and sign in.

  2. 02

    Open the MCP settings

    Click your account at the bottom of the sidebar and choose Settings. Open the Assistant section, then the Connections tab, scroll to MCP Servers, and click Add MCP Server.

  3. 03

    Choose Command (stdio)

    The form opens in URL (SSE/HTTP) mode. Switch it to Command (stdio): this server is a command your Mac runs, not a web address it calls.

  4. 04

    Fill in three fields

    Name: Playwright. Command: npx. Arguments: -y @playwright/mcp@latest --headless --isolated. Leave Environment Variables empty, this server needs none.

  5. 05

    Test, then add

    Click Test Connection: Routines starts the server without saving it and reports how many tools it found, twenty-four for this one. Then click Add Server. The first start downloads the package, so give it a moment.

  6. 06

    Use it

    The tools work in chat right away. To let a scheduled routine use them, open the routine, find the Tools & connections card, and tick the server under Apps.

Routine ideas

Routines worth scheduling.

Once the server is connected, a scheduled routine can use its tools while you are away. Copy a prompt, paste it into Routines, and pick a time.

A Monday competitor price check

Prompt

Every Monday at 8:00, open each pricing page listed in competitors.md, read the plan names and prices off the page, and write a table of anything that changed since last week to pricing-watch.md.

A morning status sweep

Prompt

Every weekday at 9:15, open the public status page of each service listed in services.md, note anything that is not fully operational, and save a short summary to status-check.md with the time you checked.

A weekly docs-changed digest

Prompt

Every Friday at 17:00, open the changelog page of each tool listed in tools-i-use.md, collect the entries dated this week, and write them up as a one-paragraph digest in changelog-digest.md.

Troubleshooting

The errors we hit, and what fixed them.

Real errors captured during the verification run, printed exactly as the server returned them.

The browser it wants is not on the machine

What you see

### Error
Error: Browser "firefox" is not installed. Run `npx @playwright/mcp install-browser firefox` to install

The fix

This is what a Mac with no Playwright browser cache sees on the first tool call: the server starts fine and lists all 24 tools, then fails the moment it needs a browser. We triggered it on purpose by asking for firefox, which has no build on this Mac; the message names whichever browser is missing. Run the install command it prints, then try the call again. Left to itself the server uses the Google Chrome already installed in your Applications folder, which is why nothing had to be downloaded for our run.

It refuses to open a file on your disk

What you see

### Error
Error: Access to "file:" protocol is blocked. Attempted URL: "file:///etc/hosts"

The fix

Working as designed: file:// navigation is blocked and file access is fenced to the workspace root unless you start the server with --allow-unrestricted-file-access. We triggered this by asking for /etc/hosts. If you want an AI reading local files, use a file server for that job rather than opening the fence on a browser that also visits the open web.

Two apps trying to use the same browser profile

What you see

### Error
Error: Browser is already in use for /private/tmp/mcp-shared-profile, use --isolated to run multiple instances of the same browser

The fix

A profile on disk can only be driven by one browser at a time, so the second MCP client to start loses. We reproduced it by pointing two clients at one profile folder. Add --isolated to every client after the first, as the message says, or give each one its own --user-data-dir. This is the single most common surprise when Cursor, Claude Desktop and Routines are all open at once.

The assistant clicks something that is no longer there

What you see

### Error
Error: Ref e999 not found in the current page snapshot. Try capturing new snapshot.

The fix

Every clickable thing gets a short reference like e12 when the page is snapshotted, and those references go stale the moment the page changes. The server tells the assistant exactly what to do about it: take a fresh snapshot and click the new reference. If it keeps happening on one site, the page is probably re-rendering under the assistant, so ask it to wait for the text it expects before clicking.

Your MCP client cannot start the server at all

The fix

The npx command belongs to Node.js, and this package asks for Node 18 or newer. If Node is not installed on your Mac, every client on this page fails at the spawn step before the server can say anything. Install Node from nodejs.org, restart your MCP client, and try again.

FAQ

Questions people ask.

What is the Playwright MCP server?

It is Microsoft's official MCP server for browser automation, built on the Playwright testing library. Once connected, an AI assistant such as Claude can open web pages, read them as a structured accessibility tree rather than as pixels, and then click, type, fill forms and report back. It runs as a local process on your Mac and talks to your AI app over stdio. The version we verified, 0.0.78, was the latest on both npm and GitHub on the day of the run, and the longer number in the receipt strip above is the Playwright build the running server reports for itself. [6][3][1][4]

What tools does the Playwright MCP server include?

The running server exposes 24 tools: moving around (browser_navigate, browser_navigate_back, browser_tabs), reading a page (browser_snapshot, browser_find, browser_take_screenshot, browser_console_messages, browser_network_requests, browser_network_request), acting on it (browser_click, browser_type, browser_fill_form, browser_select_option, browser_hover, browser_press_key, browser_drag, browser_drop, browser_file_upload, browser_handle_dialog, browser_wait_for), and control of the browser itself (browser_resize, browser_evaluate, browser_run_code_unsafe, browser_close). The table above is the live tools/list output, word for word.

Does it need an API key or an account?

No. There is nothing to sign up for and no credential to paste. The npx command downloads the package from the public npm registry on first run, so the very first start needs an internet connection; after that the package is cached on your Mac. It also needs a browser to drive, and on our Mac it used the Google Chrome already installed in the Applications folder. [1]

Does it open a browser window I can see?

By default yes: the documented flag list says the browser runs headed unless you pass --headless. We ran it headless, so nothing appeared on screen and the capture above is all there was to see. Leave --headless out of the configs above if you would rather watch the assistant work, which is the fastest way to understand what it is actually doing on a page. [6]

Is the Playwright MCP server safe?

Two things deserve care. One tool, browser_run_code_unsafe, describes itself in its own tool listing as executing arbitrary JavaScript and being RCE-equivalent, so treat it as the loaded one. And a browser session is only as private as the profile behind it: run with --isolated and the profile is kept in memory and thrown away, run without it and the browser keeps your logins on disk between sessions. One fence we did verify: it blocks file:// navigation by default, and the refusal it returns is printed in the troubleshooting section above. [6]

Do I need the terminal to set it up?

No. In Routines you fill three fields in Settings and click Test Connection; the walkthrough above shows every click. Claude Desktop and Cursor each need a small JSON file edited once. Only Claude Code is terminal-first by nature. [10][7]

Which apps can use the Playwright MCP server?

Any MCP client that can launch a local stdio server: Claude Desktop, Claude Code, Cursor, and Routines all can, and the exact config for each is above. The server itself is the same in every client; only the place you paste the config differs. [7][8][9][10]

Sources

Every external claim, receipted.

Anything on this page we did not observe in the run is linked here, with the date we read it. The run itself is the receipt for the rest.

  1. [1]

    npm registry: @playwright/mcpaccessed 2026-08-03

    Latest version 0.0.78, published 2026-07-09; license field Apache-2.0; repository microsoft/playwright-mcp; engines node >=18.

  2. [2]

    npm downloads API: last weekaccessed 2026-08-03

    6,116,075 downloads for the week ending 2026-08-01.

  3. [3]

    GitHub: microsoft/playwright-mcpaccessed 2026-08-03

    35,762 stars and a push dated 2026-07-25 at access time, owned by the microsoft organization, per the GitHub API.

  4. [4]

    GitHub: latest playwright-mcp releaseaccessed 2026-08-03

    Tag v0.0.78, published 2026-07-09, matching the npm latest tag.

  5. [5]

    microsoft/playwright-mcp LICENSE fileaccessed 2026-08-03

    The full Apache License 2.0 text, 201 lines, with the notice Copyright (c) Microsoft Corporation.

  6. [6]

    Playwright MCP READMEaccessed 2026-08-03

    Standard config is an npx command over stdio; Node.js 18 or newer required; --headless documented as headed by default; persistent profile is the default and only one browser may use it at a time.

  7. [7]

    modelcontextprotocol.io: Connect to local MCP serversaccessed 2026-08-03

    The official Claude Desktop quickstart and the claude_desktop_config.json shape.

  8. [8]

    Claude Code docs: MCPaccessed 2026-08-03

    The claude mcp add syntax for local stdio servers, including the double dash before the command.

  9. [9]

    Cursor docs: Model Context Protocolaccessed 2026-08-03

    The mcp.json shape and file locations.

  10. [10]

    Routines: Connectorsaccessed 2026-08-03

    How Routines runs one-click OAuth connectors and any MCP server.

This page describes Playwright as it behaved in one dated run on one Mac. Versions move: if something here no longer matches what you see, the capture date at the top says how old the reading is.

Behind this directory

Routines, the app behind this directory, runs MCP servers like this one without a terminal: see how connectors work. Your notes stay markdown files on your Mac, there is no cloud bill, and it works offline. Download Routines