---
title: "Playwright MCP Server: Browser Automation for Claude"
url: "https://mcpshelf.co/servers/playwright"
description: "Microsoft's Playwright MCP lets an assistant open pages, click, type and read them via the accessibility tree. Config, headless mode and our install test."
updated: "2026-10-27"
site: "MCP Shelf"
---

# Playwright MCP

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

Source: https://mcpshelf.co/servers/playwright  
Markdown: https://mcpshelf.co/servers/playwright.md  
Generated: 2026-11-23T06:12:24.874Z

## Facts

- **Name:** Playwright MCP
- **Tagline:** Microsoft's browser automation server: navigate, click, type, read.
- **Description:** Playwright MCP is Microsoft's official MCP server that lets AI assistants drive a real browser, navigating, clicking and filling forms through the page's accessibility tree instead of screenshots.
- **Repository:** https://github.com/microsoft/playwright-mcp
- **Package:** @playwright/mcp 0.0.83 (npm)
- **Install:** `claude mcp add playwright -- npx -y @playwright/mcp@latest`
- **Transport:** stdio (local)
- **Auth:** No required keys or settings listed
- **Tools exposed:** 25: `browser_close`, `browser_resize`, `browser_console_messages`, `browser_handle_dialog`, `browser_emulate_media`, `browser_evaluate`, `browser_file_upload`, `browser_drop`, `browser_find`, `browser_fill_form`, `browser_press_key`, `browser_type`, `browser_navigate`, `browser_navigate_back`, `browser_network_requests`, `browser_network_request`, `browser_run_code_unsafe`, `browser_take_screenshot`, `browser_snapshot`, `browser_click`, `browser_drag`, `browser_hover`, `browser_select_option`, `browser_tabs`, `browser_wait_for`
- **Category:** Browser and web data (https://mcpshelf.co/categories/browser-and-web)
- **Stats:** 38.8K GitHub stars, 3.8M downloads a week, last commit 22 Oct 2026, 0 upvotes on MCP Shelf
- **Install check:** Started in our test
- **Listed:** 2026-10-26
- **Page updated:** 2026-10-27

## Full description

### What is Playwright MCP?

**Playwright MCP is Microsoft's official MCP server that lets AI assistants drive a real browser, navigating, clicking and filling forms through the page's accessibility tree instead of screenshots.**

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) |
| GitHub | https://github.com/microsoft/playwright-mcp |
| Licence | Apache-2.0 |
| npm package | [@playwright/mcp](https://www.npmjs.com/package/@playwright/mcp) 0.0.83 (28 Sept 2026) |
| GitHub stars | 38.8K |
| Downloads | 3.8M a week |
| Last commit | 22 Oct 2026 |
| Tools | 25 |
| Runs on | Your computer |
| Install check | Started in our test |
| Category | [Browser and web data](https://mcpshelf.co/categories/browser-and-web) |
| Works with | Claude Code, Cursor, Claude Desktop, VS Code, Codex, Windsurf |
| Setup checked | 27 Oct 2026 |
| Page updated | 27 Oct 2026 |

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

#### Try asking Playwright MCP

- "Open example.com, fill in the sign-up form with test data and tell me what happens on submit."
- "Go to our pricing page and check that every plan has a working "Start" button."
- "Open the dashboard and show me any errors in the browser console."

#### MCP Shelf take

> We started Playwright on our own test machine on 26 Oct 2026 and it answered with 25 tools. 7 of the 25 only read; the other 18 can change things. Every tool comes with a useful description, all of them say whether they change things, and the tool list costs about 1,100 tokens of context before you ask a thing. It is the most-starred of the 13 servers in its category on our shelf (38.8K stars, with 3.8M downloads a week).

— MCP Shelf tests (numbers from our own runs), tested on 26 Oct 2026

### What tools does Playwright MCP have?

We listed 25 tools on 26 Oct 2026. 7 only read; the rest can change things or run commands.

| Tool | Kind | What it is for |
| --- | --- | --- |
| `browser_close` | changes | Shuts the current page. |
| `browser_resize` | changes | Changes the window size, for checking layouts at other widths. |
| `browser_console_messages` | reads | Returns what the page logged to the browser console, filtered by level. |
| `browser_handle_dialog` | changes | Accepts or dismisses an alert, confirm or prompt box. |
| `browser_emulate_media` | changes | Switches the page to dark mode, reduced motion, print styles and similar media settings. |
| `browser_evaluate` | changes | Runs a JavaScript function on the page or on one element and returns the result. |
| `browser_file_upload` | changes | Picks local files for an open file chooser. |
| `browser_drop` | changes | Drops files or raw data onto an element, as if dragged in from your desktop. |
| `browser_find` | reads | Searches the page's accessibility tree for text or a pattern. |
| `browser_fill_form` | changes | Fills several form fields in one go. |
| `browser_press_key` | changes | Presses a single key, such as Enter or an arrow. |
| `browser_type` | changes | Types text into a field, optionally pressing Enter afterwards. |
| `browser_navigate` | changes | Opens a URL. |
| `browser_navigate_back` | changes | Goes back one page in history. |
| `browser_network_requests` | reads | Lists the requests the page has made since it loaded. |
| `browser_network_request` | reads | Shows the headers and body of one recorded request. |
| `browser_run_code_unsafe` | runs | Runs a snippet of Playwright code inside the server process. Treat it like a shell. |
| `browser_take_screenshot` | reads | Saves an image of the page or of one element. |
| `browser_snapshot` | reads | Reads the page as a structured outline of its elements, which the assistant uses to decide what to click. |
| `browser_click` | changes | Clicks a button, link or other element, with an optional double click, mouse button or modifier keys. |
| `browser_drag` | changes | Drags one element and drops it on another. |
| `browser_hover` | changes | Moves the mouse over an element to reveal menus or tooltips. |
| `browser_select_option` | changes | Chooses one or more values in a drop-down list. |
| `browser_tabs` | changes | Lists, opens, switches or closes tabs. |
| `browser_wait_for` | reads | Waits for some text to appear or vanish, or for a set time. |

#### How clearly it describes its tools

25 of 25 tools have a description and 25 of 25 say whether they change things. The tool list takes at least ~1,100 tokens of context. Every tool says whether it only reads or can change things, so a client can ask before the risky ones.

### How do I install Playwright MCP?

#### Install steps from the Playwright MCP README

Copied from the project's [README on GitHub](https://github.com/microsoft/playwright-mcp#readme) on 13 Nov 2026 under its Apache-2.0 licence.

##### Getting started

First, install the Playwright MCP server with your client.

**Standard config** works in most of the tools:

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

**Amp**

Add via the Amp VS Code extension settings screen or by updating your settings.json file:

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

**Amp CLI Setup:**

Add via the `amp mcp add` command below

```
amp mcp add playwright -- npx @playwright/mcp@latest
```

**Antigravity**

Add via the Antigravity settings or by updating your configuration file:

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

**Claude Code**

Use the Claude Code CLI to add the Playwright MCP server:

```
claude mcp add playwright npx @playwright/mcp@latest
```

**Claude Desktop**

Follow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user), use the standard config above.

**Cline**

Follow the instruction in the section [Configuring MCP Servers](https://docs.cline.bot/mcp/configuring-mcp-servers)

**Example: Local Setup**

Add the following to your [`cline_mcp_settings.json`](https://docs.cline.bot/mcp/configuring-mcp-servers#editing-mcp-settings-files) file:

```
{
  "mcpServers": {
    "playwright": {
      "type": "stdio",
      "command": "npx",
      "timeout": 30,
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ],
      "disabled": false
    }
  }
}
```

**Codex**

Use the Codex CLI to add the Playwright MCP server:

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

Alternatively, create or edit the configuration file `~/.codex/config.toml` and add:

```
[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]
```

For more information, see the [Codex MCP documentation](https://github.com/openai/codex/blob/main/codex-rs/config.md#mcp_servers).

**Copilot**

Use the Copilot CLI to interactively add the Playwright MCP server:

```
/mcp add
```

Alternatively, create or edit the configuration file `~/.copilot/mcp-config.json` and add:

```
{
  "mcpServers": {
    "playwright": {
      "type": "local",
      "command": "npx",
      "tools": [
        "*"
      ],
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}
```

For more information, see the [Copilot CLI documentation](https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli).

**Cursor**

###### Click the button to install:

###### Or install manually:

Go to `Cursor Settings` -> `MCP` -> `Add new MCP Server`. Name to your liking, use `command` type with the command `npx @playwright/mcp@latest`. You can also verify config or add command like arguments via clicking `Edit`.

**Factory**

Use the Factory CLI to add the Playwright MCP server:

```
droid mcp add playwright "npx @playwright/mcp@latest"
```

Alternatively, type `/mcp` within Factory droid to open an interactive UI for managing MCP servers.

For more information, see the [Factory MCP documentation](https://docs.factory.ai/cli/configuration/mcp).

**Gemini CLI**

Follow the MCP install [guide](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md#configure-the-mcp-server-in-settingsjson), use the standard config above.

**Goose**

###### Click the button to install:

###### Or install manually:

Go to `Advanced settings` -> `Extensions` -> `Add custom extension`. Name to your liking, use type `STDIO`, and set the `command` to `npx @playwright/mcp`. Click "Add Extension".

**Grok**

Use the Grok CLI to add the Playwright MCP server:

```
grok mcp add playwright -- npx @playwright/mcp@latest
```

Alternatively, create or edit the configuration file `~/.grok/config.toml` and add:

```
[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]
```

For more information, see the [Grok MCP documentation](https://docs.x.ai/build/features/mcp-servers).

**Junie**

To add the Playwright MCP server in Junie CLI:

1. Type `/mcp`
2. Press `Ctrl+A` to add a new MCP server
3. Select **Playwright** from the list

Alternatively, add to `.junie/mcp/mcp.json`:

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

For more information, see the [Junie MCP configuration documentation](https://junie.jetbrains.com/docs/junie-cli-mcp-configuration.html).

**Kiro**

Follow the MCP Servers [documentation](https://kiro.dev/docs/mcp/). For example in `.kiro/settings/mcp.json`:

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

**LM Studio**

###### Click the button to install:

###### Or install manually:

Go to `Program` in the right sidebar -> `Install` -> `Edit mcp.json`. Use the standard config above.

**opencode**

Follow the MCP Servers [documentation](https://opencode.ai/docs/mcp-servers/). For example in `~/.config/opencode/opencode.json`:

```
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "playwright": {
      "type": "local",
      "command": [
        "npx",
        "@playwright/mcp@latest"
      ],
      "enabled": true
    }
  }
}
```

**Qodo Gen**

Open [Qodo Gen](https://docs.qodo.ai/qodo-documentation/qodo-gen) chat panel in VSCode or IntelliJ → Connect more tools → + Add new MCP → Paste the standard config above.

Click `Save`.

**VS Code**

###### Click the button to install:

###### Or install manually:

Follow the MCP install [guide](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server), use the standard config above. You can also install the Playwright MCP server using the VS Code CLI:

```
# For VS Code
code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}'
```

After installation, the Playwright MCP server will be available for use with your GitHub Copilot agent in VS Code.

**Warp**

Go to `Settings` -> `AI` -> `Manage MCP Servers` -> `+ Add` to [add an MCP Server](https://docs.warp.dev/knowledge-and-collaboration/mcp#adding-an-mcp-server). Use the standard config above.

Alternatively, use the slash command `/add-mcp` in the Warp prompt and paste the standard config from above:

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

**Windsurf**

Follow Windsurf MCP [documentation](https://docs.windsurf.com/windsurf/cascade/mcp). Use the standard config above.

#### What you need first

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

#### Claude Code

Where: Your terminal, in the project folder

```bash
claude mcp add playwright -- npx -y @playwright/mcp@latest
```

#### Cursor

Where: ~/.cursor/mcp.json, or .cursor/mcp.json in a project

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

Or use Cursor Settings → MCP → Add new MCP Server, choose the command type and enter npx @playwright/mcp@latest.

#### Claude Desktop

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

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

#### VS Code

Where: .vscode/mcp.json in your project

```json
{
  "servers": {
    "playwright": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ]
    }
  }
}
```

Or run code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}' in a terminal, which adds it to VS Code for you.

#### Codex

Where: ~/.codex/config.toml, shared by the Codex CLI, IDE extension and ChatGPT desktop app

```
[mcp_servers.playwright]
command = "npx"
args = ["-y", "@playwright/mcp@latest"]
```

Or run: `codex mcp add playwright -- npx -y @playwright/mcp@latest`

#### Windsurf

Where: ~/.codeium/windsurf/mcp_config.json

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

#### ChatGPT

Where: Not supported as is

ChatGPT needs a remote URL. Playwright MCP can serve HTTP with --port on a machine with a display, but you would have to expose it publicly, which hands strangers a browser. Use a desktop client instead.

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

Checked against the project's own install docs on 27 Oct 2026: https://github.com/microsoft/playwright-mcp#readme

### How do I configure Playwright MCP?

| Setting | Kind | Required | What it does |
| --- | --- | --- | --- |
| `--headless` | flag | no | Runs the browser without a visible window. Without it you watch every step. Example: `--headless` |
| `--browser` | flag | no | Chooses the browser: chrome, firefox, webkit or msedge. Example: `--browser=firefox` |
| `--isolated` | flag | no | Keeps the browser profile in memory, so nothing (cookies, logins) is saved between sessions. Example: `--isolated` |
| `--user-data-dir` | flag | no | Points at a profile folder you choose, so logins persist where you want them. Example: `--user-data-dir=./pw-profile` |
| `--storage-state` | flag | no | Loads saved cookies and local storage into an isolated session, so it starts logged in. Example: `--storage-state=auth.json` |
| `--extension` | flag | no | Drives your already-open Chrome or Edge through the Playwright browser extension instead of a new browser. Example: `--extension` |
| `--caps` | flag | no | Turns on extra tool sets: vision (click by coordinates), pdf and devtools. Example: `--caps=vision,pdf` |
| `--allowed-origins` | flag | no | Limits which sites the browser may request. Useful, but the project says it is not a security boundary. Example: `--allowed-origins=https://example.com` |
| `--device` | flag | no | Emulates a phone or tablet by name. Example: `--device="iPhone 15"` |
| `--viewport-size` | flag | no | Sets the window size in pixels. Example: `--viewport-size=1280x720` |

### What can Playwright MCP read and change?

**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.

### Good for

- Testing your web app the way a user would
- Filling in forms and following multi-step flows
- Reading pages that need JavaScript to render

### Playwright MCP not working? Common fixes

**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.

### What are the alternatives to Playwright MCP?

| Server | What it does | Tools | Runs on | Licence | Stars |
| --- | --- | --- | --- | --- | --- |
| [Playwright MCP](https://mcpshelf.co/servers/playwright) | Microsoft's browser automation server: navigate, click, type, read. | 25 | Your computer | Apache-2.0 | 38.8K |
| [Firecrawl](https://mcpshelf.co/servers/firecrawl) | Scrape pages, crawl sites and search, returned as clean Markdown. | 28 | Your computer or hosted | MIT | 7.7K |
| [Exa](https://mcpshelf.co/servers/exa) | Search built for AI: web results, page contents and code examples. | 2 | Hosted or your computer | MIT | 5.2K |
| [Bright Data](https://mcpshelf.co/servers/bright-data) | Search and scraping through Bright Data, for sites that block ordinary requests. | 32 | Hosted or your computer | MIT | 2.7K |
| [SearXNG](https://mcpshelf.co/servers/searxng) | Web search through your own SearXNG instance: no vendor, no API key. | 4 | Your computer | MIT | 1.3K |
| [Apify](https://mcpshelf.co/servers/apify) | Find and run ready-made Apify scrapers for maps, social media, shops and search. | 10 | Hosted or your computer | MIT | 13.6K |

### Playwright MCP FAQ

#### How do I add Playwright MCP to Claude Code?

Run claude mcp add playwright -- npx -y @playwright/mcp@latest. The first run downloads a browser if you do not have one. Add --headless to the end if you do not want a browser window to open.

#### How do I install Playwright MCP in Cursor or VS Code?

Use the standard config, npx with @playwright/mcp@latest, in ~/.cursor/mcp.json or .vscode/mcp.json, or the one-click install buttons in the project's README. In Cursor you can also add it under Settings → MCP as a command server.

#### Does Playwright MCP use screenshots?

Not by default. It reads the page's accessibility tree, a structured outline of headings, links, buttons and fields, which is faster and cheaper than sending images to a vision model. A screenshot tool is still there when the assistant needs to see the layout.

#### Can Playwright MCP use my logged-in browser?

Yes, two ways. By default it keeps a persistent profile, so logins you make in its window are remembered. With the Playwright extension for Chrome or Edge and the --extension flag, it can attach to tabs in the browser you already use.

#### Is Playwright MCP free?

Yes. It is open source under the Apache 2.0 licence, made by Microsoft's Playwright team, and needs no account or key.

#### Is Playwright MCP safe?

It can do anything you could do in that browser, including on sites where you are signed in. Use --isolated for a session that is not saved to disk, watch it in a visible window and keep your client asking before each action. --allowed-origins narrows where it goes, though the project says it is not a security boundary.

#### Why does Playwright MCP fail in Docker or on a server?

There is no display there. Run it with --headless, or use the project's Docker image, which only supports headless Chromium. If a second app gets Browser is already in use, give each app its own --user-data-dir or use --isolated.

#### Playwright MCP or the ExecuteAutomation Playwright server?

Microsoft's server is the official one and works from the accessibility tree. The ExecuteAutomation server is a separate community project built around screenshots, test code generation and API requests. Most people should start with Microsoft's and add the other only for those extras.

#### Does Playwright MCP work with Codex?

Yes. Run codex mcp add playwright -- npx -y @playwright/mcp@latest in a terminal, or add an [mcp_servers.playwright] table to ~/.codex/config.toml, which the Codex CLI and IDE extension share.

Full docs on GitHub: https://github.com/microsoft/playwright-mcp

## Notes for agents

Fetch these instead of parsing the HTML page:

- llms.txt: https://mcpshelf.co/llms.txt
- llms-full.txt: https://mcpshelf.co/llms-full.txt
- ai.txt: https://mcpshelf.co/ai.txt
- Full catalog (.md): https://mcpshelf.co/catalog.md
- API spec: https://mcpshelf.co/openapi.json
- MCP server: https://mcpshelf.co/mcp
- MCP manifest: https://mcpshelf.co/.well-known/mcp.json
- Developer docs: https://mcpshelf.co/developers

MCP endpoint (Streamable HTTP, no key): https://mcpshelf.co/mcp. REST API: https://mcpshelf.co/api/v1.

