Playwright MCP Server

by @executeautomation

Playwright MCP Server

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 Automation5,668nodeMIT

Server facts

Playwright MCP Server

GitHub stars

5,668

Last commit

Dec 13, 2025

Runtime

node

License

MIT

Tech

Runtime
node
Transports
stdio
Remote access
No

Activity

GitHub stars
5,668
Last commit
Data as of

Tags

  • Browser Testing
  • Device Emulation
  • Playwright
  • Screenshots

Overview

Playwright MCP Server from ExecuteAutomation connects AI clients to browser automation powered by Playwright. The documented scope includes interacting with pages, taking screenshots, scraping content, executing JavaScript, and generating test code. Device emulation is a highlighted feature: the README describes 143 presets spanning phones, tablets, and desktop browsers. These presets adjust more than viewport dimensions, including user agent, touch behavior, and pixel ratio. The named resize operation can also switch orientation, making the server relevant to responsive testing as well as general browser interaction.

Setup options include npm, mcp-get, Smithery, and client-specific registration examples. Missing Chromium, Firefox, or WebKit binaries are downloaded automatically on first use, with manual installation commands provided for troubleshooting or advance setup. Stdio is the recommended configuration for Claude Desktop, and its logging is directed to files to keep protocol traffic clean. A standalone HTTP mode is documented for other clients and service-style operation, including a health endpoint. That mode requires the client's HTTP type setting and binds to localhost for security; the README recommends SSH tunneling when remote access is needed. These connection requirements matter when moving from a simple desktop setup to a background service. The supplied README names the resize tool but refers readers elsewhere for the complete tool reference.

Install & configure

Requirements

  • An MCP-compatible client
  • npm/npx tooling
  • Playwright browser binaries, installed automatically if missing
Documented launch / install command
npx -y @executeautomation/playwright-mcp-server

This is the documented stdio configuration. HTTP mode uses --port 8931 and requires type: http in the client. The server binds to localhost; the README describes SSH tunneling for remote access.

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": {
    "mcp-playwright": {
      "command": "npx",
      "args": [
        "-y",
        "@executeautomation/playwright-mcp-server"
      ],
      "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": {
    "mcp-playwright": {
      "command": "npx",
      "args": [
        "-y",
        "@executeautomation/playwright-mcp-server"
      ],
      "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": {
    "mcp-playwright": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@executeautomation/playwright-mcp-server"
      ],
      "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": {
    "mcp-playwright": {
      "command": "npx",
      "args": [
        "-y",
        "@executeautomation/playwright-mcp-server"
      ],
      "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": {
    "mcp-playwright": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@executeautomation/playwright-mcp-server"
      ],
      "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 README. Tool descriptions are a documented snapshot, not a live capability check.

ToolWhat it does
playwright_resizeChange browser dimensions or select a device preset and orientation.

Use cases

  • Test responsive pages using phone and tablet emulation profiles.
  • Capture screenshots while investigating a web application.
  • Generate browser test code from an AI workflow.
  • Scrape page content or run JavaScript in a real browser.

Strengths

  • Includes device presets with touch, user-agent, and pixel-ratio emulation.
  • Automatically installs missing browser binaries.
  • Documents both stdio and standalone HTTP operation.

Limitations

  • HTTP clients must explicitly set their transport type correctly.
  • The HTTP service binds locally; remote access needs an additional approach such as SSH tunneling.

Playwright MCP Server setup notes

  • Playwright MCP Server's stdio example needs a client that launches local processes.

Frequently asked questions

This entry refers to ExecuteAutomation’s mcp-playwright repository and its @executeautomation/playwright-mcp-server package.

Related MCP servers