Server profile

Playwright MCP

Playwright MCP lets AI assistants operate browsers using structured accessibility data. It suits agents that need persistent page context, interactive exploration, and browser inspection without a vision model.

Server facts

Playwright MCP

Tech

Runtime / language
node
Transports
stdio
Remote available
No
Authentication
Not specified

Activity

GitHub stars
38,243
Last commit
Data as of

Tags

  • Accessibility
  • Browser Automation
  • Playwright
  • Web Testing

Overview

Playwright MCP exposes browser automation to AI clients through Playwright. Instead of requiring a model to interpret page pixels, it supplies structured accessibility information that an agent can inspect before choosing an action. The available controls cover navigation, clicks, keyboard input, forms, dropdowns, tabs, uploads, and drag operations. Inspection tools expose console output and network traffic, while screenshots provide a separate visual record. This combination supports exploratory browsing and testing workflows in which an assistant repeatedly examines a page and acts on its current structure. The README positions persistent browser context as a reason to choose the MCP interface for longer agent loops.

Setup uses an npx command in an MCP client's configuration and requires Node.js 18 or later. The README includes configuration examples for numerous editors, terminal agents, and desktop clients. Options select browser engines, headless execution, emulated devices, saved profiles, connection endpoints, and additional capabilities. File access is limited to workspace roots by default, and file URL navigation starts blocked. Origin allowlists and blocklists are explicitly not security boundaries. For coding agents with tight context budgets, the project also points to a separate CLI and skills approach, noting that MCP's larger tool schemas and accessibility trees can consume more tokens.

Install & configure

Requirements

  • Node.js 18 or later
  • An MCP-compatible client
Documented launch / install command
npx @playwright/mcp@latest

Add the command to your client's MCP configuration. Browser selection, headless operation, and connection settings are configurable through documented arguments.

Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Desktop configuration
{
  "mcpServers": {
    "playwright-mcp": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ],
      "env": {}
    }
  }
}

Read the Claude Desktop setup guide

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.

Cursor configuration
{
  "mcpServers": {
    "playwright-mcp": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ],
      "env": {}
    }
  }
}

Read the Cursor setup guide

Config file · Workspace: .vscode/mcp.json

For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.

VS Code configuration
{
  "servers": {
    "playwright-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ],
      "env": {}
    }
  }
}

Read the VS Code setup guide

Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json

Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.

Windsurf configuration
{
  "mcpServers": {
    "playwright-mcp": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ],
      "env": {}
    }
  }
}

Read the Windsurf setup guide

Config file · Project scope: .mcp.json at the repository root

The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Code configuration
{
  "mcpServers": {
    "playwright-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ],
      "env": {}
    }
  }
}

Read the Claude Code setup guide

Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.

Tools

Source: repository tool metadata. Tool descriptions are a documented snapshot, not a live capability check.

ToolWhat it does
browser_closeShut the active page.
browser_resizeChange the browser window dimensions.
browser_console_messagesRead messages emitted to the browser console.
browser_handle_dialogRespond to a browser dialog.
browser_emulate_mediaOverride CSS media settings such as the page color scheme.
browser_evaluateEvaluate JavaScript against a page or element.
browser_file_uploadSupply files to an upload control.
browser_dropDrop local files or MIME data onto a page element.
browser_findFind text or regex matches within the page accessibility snapshot.
browser_fill_formPopulate several form fields together.
browser_press_keySend a keyboard key press.
browser_typeEnter text in an editable page element.
browser_navigateOpen a specified web address.
browser_navigate_backReturn to the preceding page in browser history.
browser_network_requestsList captured network requests with reference numbers.
browser_network_requestInspect headers or body data for a numbered network request.
browser_run_code_unsafeExecute a Playwright snippet in the server process; this permits arbitrary JavaScript execution.
browser_take_screenshotCapture a page image; use an accessibility snapshot to guide actions.
browser_snapshotRead the current page as an accessibility tree.
browser_clickClick a page element.
browser_dragDrag from one page element to another.
browser_hoverPosition the pointer over an element.
browser_select_optionChoose an entry from a dropdown control.
browser_tabsInspect, open, switch, or close tabs.
browser_wait_forPause for matching text, its disappearance, or an elapsed interval.

Names, permissions, and defaults can change. Check the current upstream documentation before granting access.

Use cases

  • Explore a website through accessibility snapshots and iterative actions.
  • Fill forms and exercise interactive browser flows.
  • Inspect console errors and individual network requests.
  • Keep browser state across a long-running agent workflow.

Strengths

  • Structured page access does not require a vision model.
  • Combines browser controls with console and network inspection.
  • Documents configuration for many MCP clients.

Limitations

  • Requires Node.js 18 or later.
  • Tool schemas and accessibility trees can use more context than the separate CLI workflow.
  • Origin filters are not a security boundary.

Frequently asked questions

No. Page interaction uses structured accessibility data rather than requiring screenshot interpretation.

Yes. The README documents a headless option; headed execution is the default.

Yes. Tools list requests and retrieve details for an individual request.

The README describes CLI plus skills as more token-efficient, while MCP favors persistent context and richer introspection.

Independent listing, not an affiliation or security review. Grant the least access needed and verify the upstream instructions before running code.

Related MCP servers

Firecrawl MCP Server

Search & Web Data

Firecrawl MCP connects AI agents to web search, scraping, crawling, and live browser interaction. It offers hosted access or a local server for collecting structured web context and running research tasks.

Browserbase MCP Server

Browser Automation

Browserbase MCP Server lets assistants operate cloud browser sessions through Browserbase and Stagehand. Six tools handle sessions, navigation, page actions, observation, and extraction, with hosted and self-hosted connection options.

BrowserTools MCP

Browser Automation

BrowserTools MCP brings browser logs, screenshots, selected elements, and Lighthouse audits into compatible AI editors. It uses a Chrome extension plus two local servers, and the project is no longer active.

Playwright MCP Server

Browser Automation

ExecuteAutomation’s Playwright MCP Server lets AI clients automate real browsers, capture screenshots, scrape pages, and generate tests. It also provides device-profile emulation and local stdio or standalone HTTP operation.

Browser MCP

Browser Automation

Browser MCP combines an MCP server with a Chrome extension to automate your existing browser. It is aimed at AI applications that need local browsing and access to already signed-in sessions.

Browser Use MCP Server

Browser Automation

Browser Use MCP Server connects AI agents to browser-use for browser control. It supports SSE and proxied stdio connections, asynchronous tasks, and VNC viewing so users can watch browser automation as it happens.

Hyperbrowser MCP Server

Browser Automation

Hyperbrowser MCP Server combines web scraping, crawling, structured extraction, and cloud browser agents. Assistants can choose Browser Use, OpenAI computer use, or Claude computer use and manage persistent profiles.