Skip to content
MCP server

Playwright MCP

Browser automation server that lets AI clients drive Playwright pages via accessibility

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted, vscode
Runs
Locally
Version
1.0.0
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 an MCP server that gives language models control of a web browser through Playwright. Instead of sending screenshots, it exposes the page's accessibility tree so a model can pick elements by reference and act on them.

The server runs over stdio or HTTP and is set up by adding a command entry to an MCP client such as VS Code, Cursor, Claude Desktop or Claude Code. It can run with a persistent browser profile, in isolated sessions with optional storage state, or attach to an existing browser through an extension. Optional capabilities add coordinate-based mouse actions, PDF export, tracing and test assertions.

It suits developers who want an AI assistant to navigate sites, fill forms, or generate and check end-to-end test steps. The registry entry for the npm and Docker packages lists a required YOUR_API_KEY variable without explaining what it is used for, so check that before deploying.

Install

Run in a terminal

claude mcp add playwright-mcp --env YOUR_API_KEY='<YOUR_API_KEY>' -- npx -y @dinesh-nalla-se/playwright-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "playwright-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dinesh-nalla-se/playwright-mcp"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "playwright-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dinesh-nalla-se/playwright-mcp"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "playwright-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@dinesh-nalla-se/playwright-mcp"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

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

{
  "mcpServers": {
    "playwright-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dinesh-nalla-se/playwright-mcp"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

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

{
  "mcpServers": {
    "playwright-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dinesh-nalla-se/playwright-mcp"
      ],
      "env": {
        "YOUR_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

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

Configuration

  • YOUR_API_KEYYour API key for the serviceRequired
  • YOUR_API_KEYYour API key for the serviceRequired

Tools this server provides (14)

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

browser_click
Perform click on a web page
browser_close
Close the page
browser_console_messages
Returns all console messages
browser_evaluate
Evaluate JavaScript expression on page or element
browser_fill_form
Fill multiple form fields
browser_navigate
Navigate to a URL
browser_network_requests
Returns all network requests since loading the page
browser_press_key
Press a key on the keyboard
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
browser_tabs
List, create, close, or select a browser tab

What it does

Accessibility snapshot control
Reads the page through Playwright's accessibility tree so models can act on elements without vision models.
Persistent or isolated profiles
Runs with a saved browser profile that keeps logins, or with throwaway sessions that discard state on close.
Existing browser connection
An optional extension lets the server work with tabs and sessions already open in Chrome or Edge.
Configurable startup state
Accepts storage state files, init scripts and init pages to prepare cookies, permissions and page setup.
Optional capabilities
Enable coordinate mouse actions, PDF saving, tracing or test assertion tools with flags.
Docker and HTTP transport
Can run headless in a container or as a long-lived service on a chosen port for remote clients.

Good for

  • Letting an AI assistant navigate a web app and report what it finds
  • Filling and submitting forms during automated browser workflows
  • Generating locators and verifying visible elements for end-to-end tests
  • Capturing page snapshots, console messages or network requests while debugging
  • Running headless browser sessions inside a container for an MCP client

Pricing

Open source

Playwright MCP FAQ

Does it need a vision model?

No. The README says it operates on structured accessibility snapshots rather than screenshots, so no vision model is needed by default.

Which Node.js version is required?

The README lists Node.js 18 or newer as a requirement.

Can it run in Docker?

Yes. The README gives Docker run examples, but notes the Docker build only supports headless Chromium.

Which browsers does it support?

The README lists chrome, firefox, webkit and msedge as browser options for the browser flag.

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 --env YOUR_API_KEY='<YOUR_API_KEY>' -- npx -y @dinesh-nalla-se/playwright-mcp

What are the best alternatives to Playwright MCP?

The closest alternatives to Playwright MCP are MCP Server Browser, MCP Server, Cdpilot, Chrome DevTools MCP and Turbo-Browser-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