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.
| Tool | What it is for |
|---|---|
browser_run_code_unsafe | Runs a snippet of Playwright code inside the server process. Treat it like a shell. |
Changes things17 tools · Can create, edit, send or delete.
| Tool | What it is for |
|---|---|
browser_click | Clicks a button, link or other element, with an optional double click, mouse button or modifier keys. |
browser_close | Shuts the current page. |
browser_drag | Drags one element and drops it on another. |
browser_drop | Drops files or raw data onto an element, as if dragged in from your desktop. |
browser_emulate_media | Switches the page to dark mode, reduced motion, print styles and similar media settings. |
browser_evaluate | Runs a JavaScript function on the page or on one element and returns the result. |
browser_file_upload | Picks local files for an open file chooser. |
browser_fill_form | Fills several form fields in one go. |
browser_handle_dialog | Accepts or dismisses an alert, confirm or prompt box. |
browser_hover | Moves the mouse over an element to reveal menus or tooltips. |
browser_navigate | Opens a URL. |
browser_navigate_back | Goes back one page in history. |
browser_press_key | Presses a single key, such as Enter or an arrow. |
browser_resize | Changes the window size, for checking layouts at other widths. |
browser_select_option | Chooses one or more values in a drop-down list. |
browser_tabs | Lists, opens, switches or closes tabs. |
browser_type | Types text into a field, optionally pressing Enter afterwards. |
Only reads7 tools · Looks things up and changes nothing.
| Tool | What it is for |
|---|---|
browser_console_messages | Returns what the page logged to the browser console, filtered by level. |
browser_find | Searches the page's accessibility tree for text or a pattern. |
browser_network_request | Shows the headers and body of one recorded request. |
browser_network_requests | Lists the requests the page has made since it loaded. |
browser_snapshot | Reads the page as a structured outline of its elements, which the assistant uses to decide what to click. |
browser_take_screenshot | Saves an image of the page or of one element. |
browser_wait_for | Waits 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)
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}Where it goes: Your terminal, in the project folder
claude mcp add-json playwright '{"command":"npx","args":["-y","@playwright/mcp@latest"]}'Where it goes: ~/.cursor/mcp.json, or .cursor/mcp.json in a project
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}Where it goes: .vscode/mcp.json in your project
{
"servers": {
"playwright": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}Where it goes: ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}Where it goes: Not supported
ChatGPT only connects to remote servers by URL. This one runs on your computer, so use Claude, Cursor or VS Code.
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.
| Setting | What it does |
|---|---|
--headlessCommand line flag | Runs the browser without a visible window. Without it you watch every step.--headless |
--browserCommand line flag | Chooses the browser: chrome, firefox, webkit or msedge.--browser=firefox |
--isolatedCommand line flag | Keeps the browser profile in memory, so nothing (cookies, logins) is saved between sessions.--isolated |
--user-data-dirCommand line flag | Points at a profile folder you choose, so logins persist where you want them.--user-data-dir=./pw-profile |
--storage-stateCommand line flag | Loads saved cookies and local storage into an isolated session, so it starts logged in.--storage-state=auth.json |
--extensionCommand line flag | Drives your already-open Chrome or Edge through the Playwright browser extension instead of a new browser.--extension |
--capsCommand line flag | Turns on extra tool sets: vision (click by coordinates), pdf and devtools.--caps=vision,pdf |
--allowed-originsCommand line flag | Limits which sites the browser may request. Useful, but the project says it is not a security boundary.--allowed-origins=https://example.com |
--deviceCommand line flag | Emulates a phone or tablet by name.--device="iPhone 15" |
--viewport-sizeCommand line flag | Sets 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.
| Server | Tools | Runs on | Licence | Stars |
|---|---|---|---|---|
| Playwright MCP | 25 | Your computer | Apache-2.0 | 38.7K |
| Firecrawl | 28 | Your computer | MIT | 7.7K |
| Exa | 2 | Your computer or hosted | – | 5.2K |
| Bright Data | 32 | Your computer | MIT | 2.7K |
| SearXNG | 4 | Your computer | MIT | 1.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.
Something wrong on this page? Tell us.