MCP serverPartly tested (needs an account)

Control a browser

Playwright MCP

Microsoft's MCP server that lets an agent open web pages, click, type and read the page. Good for testing your own site and for web tasks.

Works with
Claude Code, Codex CLI, Gemini CLI
Good for
Web developers, Build an app, Daily work and research

What it does

Playwright MCP is a browser helper from Microsoft. An MCP server is a small program that gives your assistant extra tools. This one lets the assistant open a web page, click, type, fill in forms and read what is on the page.

The server does not depend on screenshots. It reads the page as a structured list of buttons, links and text. The README calls this an accessibility snapshot. This is fast, and the assistant does not need a vision model. The tool browser_take_screenshot also exists. The README says the assistant cannot act on a screenshot. It must use browser_snapshot for actions.

A typical use is a check of your own site after a change. Another use is a repeated task in a browser. The README also points to a related project, Playwright CLI with skills. It says that option uses fewer tokens for coding agents. A token is a small unit of text that the model reads and you pay for. The MCP version suits long, exploratory browser work.

You need Node.js 18 or newer. A browser window opens when the assistant starts to browse. By default the server keeps a persistent profile. This works like a normal browser. Logins and cookies stay on disk between sessions. The README says the server is not a security boundary.

Version 0.0.84 (31 October 2026) can keep separate sessions in one browser: tabs opened with different isolatedContext names do not share cookies or logins. A new option, --redact-url-params, hides named values in web addresses, such as access_token, in the tool output. The release notes call it "a convenience, not a security feature", so do not rely on it to keep secrets from the assistant.

Version 0.0.85 (9 November 2026) adds two options for --extension. Both need Playwright Extension 0.5.0 or newer. --background keeps the controlled tab and window in the background, so the browser does not take your screen. --no-tab-group leaves the tabs in their own tab groups. The release also undoes a 0.0.84 change: page snapshots again show content that is inert or outside an open dialog. Paths in a config file now count from the folder of that file, not from the folder where you start the server.

Who it is for

You want an assistant to test your own website or do a browser chore for you. You can describe the task in plain words. You do not need to write code. Be careful with sites where you are signed in.

Example prompts

  • "Open http://localhost:3000 and check that the contact form submits."
  • "Go to example.com and list every link in the top menu."
  • "Resize the browser to a phone width and tell me if the menu still works."
  • "Fill in the test sign-up form with fake data and tell me which error appears."
  • "Open https://example.com and list the links and headings on the page."
  • "Open my pricing page and take a screenshot."

How to install

claude mcp add playwright npx @playwright/mcp@latest
codex mcp add playwright npx "@playwright/mcp@latest"

How to use it

After install, ask the agent to do something in a browser, for example "open my site, click the sign-up button and tell me if the form works". It reads the page as text, not as a picture, so it is fast.

Other assistants

Codex CLI has a one-line command in the README. Gemini CLI has no one-line command. The README gives a standard config and links to the Gemini CLI guide.

codex mcp add playwright npx "@playwright/mcp@latest"

For Gemini CLI, add this block to your MCP settings, as in the Gemini CLI guide:

json
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest"]
    }
  }
}

Check it works

Run this command in a terminal:

claude mcp list

playwright must appear in the list. Inside Claude Code, the /mcp menu shows the same. Then ask the assistant to open a page. A browser window must open.

Common problems

  • Node.js is too old or missing: Install Node.js 18 or newer. The README states this need.
  • Two assistants use the browser at once: The README says one persistent profile serves one browser at a time. Start the other client with --isolated, or give it its own --user-data-dir.
  • A click that starts a file download closes the server: A public issue reports this. The issue title says "browser_click that triggers a native file download crashes the MCP server (Connection closed -32000)". Restart the server. Avoid download links in a test.
  • Files appear in your project folder: A public issue reports that logs and page snapshots can land in a .playwright-mcp folder in your project. Add the folder to .gitignore. Or set --output-dir to another place.

What to watch out for

  • It controls a real browser and can open any web address, fill forms and click buttons. Do not point it at pages where a click can cost money or send messages.
  • If you let it use a browser profile that is signed in, it can act as you. Use a clean profile.
  • A web page can contain hidden text that tries to steer the agent.
  • The @latest tag means you get a new version each time. Pin a version if you want a stable setup.

Licence and author

Licence
Apache-2.0
Author
Microsoft
Source code
github.com/microsoft/playwright-mcp

How we tested it

We installed it on an empty test computer on 12 Oct 2026. Partly tested: installed in a clean test system, but its main features need an account or key we did not use.

Test level

No web page was opened, so the browser download and real page actions were not tested. Tools such as file upload and script evaluation increase the risk; read the tool list.

Technical details of the test
Date
12 Oct 2026
Method
In a clean container with no account we started npx -y @playwright/mcp@latest, sent the MCP initialize and tools/list requests, and it answered with 25 tools. We also registered it with claude mcp add, and claude mcp list reported it as connected. We did not open a browser page.

Checked again on 10 Nov 2026

Alternatives

  • Chrome DevTools MCP: Google's tool. It is stronger for performance traces and debugging in Chrome.
  • MarkItDown MCP: It only reads and converts pages and files. It cannot click.
  • Exa MCP: It searches the web and fetches pages. It does not control a browser.

FAQ

Will it see my passwords? It sees what is on the pages it opens. Use the --isolated option, or a clean profile, for sensitive accounts.

Do I need to code? No. You describe the task in plain words.

Can it use my own signed-in browser? Yes, with --extension and the Playwright Extension for Edge or Chrome. Then it can act as you. Use this with great care.

Is it free? Yes. It is open source from Microsoft.

Sources