Skip to content
MCP server

Playwright MCP

MCP server giving AI assistants browser automation through Playwright accessibility

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, API, vscode
Runs
Locally
Version
0.0.85
Listing updated
today

Similar MCP servers

About Playwright MCP

Playwright MCP is an open-source MCP server for browser automation. It runs locally on your machine and is started by your AI client.

The README describes Playwright MCP as a Model Context Protocol server that lets language models drive web pages through Playwright. Instead of relying on screenshots, it reads the browser's accessibility tree, so the model works with structured page data.

It runs as a local stdio process started with npx, or as an HTTP server via a --port flag or a Docker image. Browser state can be a persistent profile, an isolated in-memory session, or an existing browser attached through the Playwright extension. Options cover viewport, headless mode, proxies, storage state, output directories and more.

The README positions it for exploratory automation, self-healing tests and long-running agent loops that need persistent browser context. It also notes that the project is not a security boundary and points to the separate Playwright CLI for coding agents that are constrained by token budget.

Install

Run in a terminal

claude mcp add playwright-mcp -- npx -y @playwright/mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "playwright-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "playwright-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

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

Add to ~/.codeium/windsurf/mcp_config.json

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

Add to your client's MCP settings (most use this shape)

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

Using several servers? Build one config file with the MCP config generator.

Tools this server provides (24)

Taken from the project documentation; the running server may differ.

browser_click
Perform click on a web page
browser_close
Close the browser and all open tabs.
browser_console_messages
Returns all console messages
browser_drag
Perform drag and drop between two elements
browser_drop
Drop files or MIME-typed data onto an element
browser_emulate_media
Emulate CSS media features for the page
browser_evaluate
Evaluate JavaScript expression on page or element
browser_file_upload
Upload one or multiple files
browser_fill_form
Fill multiple form fields
browser_find
Search the accessibility snapshot of the current page for text or a regular expression
browser_handle_dialog
Handle a dialog
browser_hover
Hover over element on page
browser_navigate
Navigate to a URL
browser_navigate_back
Go back to the previous page in the history
browser_network_request
Returns full details of a single network request
browser_network_requests
Returns a numbered list of network requests since loading the page
browser_press_key
Press a key on the keyboard
browser_resize
Resize the browser window
browser_run_code_unsafe
Run a Playwright code snippet
browser_select_option
Select an option in a dropdown
browser_snapshot
Capture accessibility snapshot of the current page
browser_take_screenshot
Take a screenshot of the current page
browser_type
Type text into editable element
browser_wait_for
Wait for text to appear or disappear or a specified time to pass

What it does

Accessibility snapshot control
Pages are read as an accessibility tree, so models can act on elements by reference without a vision model.
Broad tool set
Tools cover navigation, clicking, typing, form filling, dialogs, network inspection, screenshots and waiting.
Flexible browser sessions
Choose a persistent profile, an isolated session, or attach to an existing Chrome or Edge browser via the extension.
Multiple transports
Runs over stdio for desktop clients or over HTTP with a port flag or a Docker container.
Configurable safety limits
Options restrict allowed hosts and origins, file system access, and redact URL parameters in responses.
Code generation option
Can generate TypeScript, Python, Java or C# code for the actions it performs, according to the codegen setting.

Good for

  • Letting an AI assistant navigate and test a web application during development
  • Running exploratory checks or self-healing test workflows driven by an agent
  • Filling forms and extracting page information in a logged-in browser session
  • Inspecting console messages and network requests while debugging a page
  • Capturing screenshots or PDFs of pages as part of an automated task

Pricing

Open source

Free and open source; no paid plan mentioned.

Playwright MCP FAQ

Which clients can use it?

The README lists VS Code, Cursor, Windsurf, Claude Desktop, Claude Code, Codex, Gemini CLI, Goose, Grok, Junie, Kiro, LM Studio and others, and says it works with any MCP client.

What does it require to run?

Node.js 20 or newer. The Docker image is also available.

Is it a security boundary?

No. The README states Playwright MCP is not a security boundary and points to MCP security best practices.

When should the CLI be used instead?

The README suggests the Playwright CLI with SKILLs for coding agents that need token-efficient browser commands.

Is Playwright MCP free?

Yes. Playwright MCP is open source, so you can use and self-host it for free.

How do I add Playwright MCP to Claude Code?

Run this command in your terminal: claude mcp add playwright-mcp -- npx -y @playwright/mcp

What are the best alternatives to Playwright MCP?

The closest alternatives to Playwright MCP are Browser Use, Scrapling MCP Server, Chrome DevTools MCP, Oya Browser and playwright_mcp.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers