← Back to directory
P

Playwright MCP Server

Community
Playwright-based browser automation MCP server
GitHub source repository ↗
★ 5.6k Stars Category · Browser Popular
66FMRS · C

A mature Playwright browser automation MCP server (v1.0.10) supporting multiple clients, stdio and HTTP transports, automatic browser installation, and 143 device emulation presets. Well documented and MIT licensed, suitable for developers needing AI-driven browser automation.

Reliability
9/20
Security and permissions
11/20
Maintenance
15/20
Documentation
17/20
Setup experience
14/20
Read the FMRS scoring method →

A Model Context Protocol server maintained by executeautomation that provides browser automation capabilities using Playwright. It enables LLMs to interact with web pages, take screenshots, generate test code, scrape page content, and execute JavaScript in a real browser environment. Works with Claude Desktop, Cline, Cursor IDE, VS Code and more.

Tools

playwright_resize
Resize the browser viewport with 143 real device presets (e.g., iPhone 13, iPad Pro 11, Desktop Chrome), emulating viewport, user-agent, touch events, and device pixel ratio, with orientation switching.

Setup

Install globally via npm: npm install -g @executeautomation/playwright-mcp-server; alternatively use mcp-get or Smithery (npx @smithery/cli install @executeautomation/playwright-mcp-server --client claude). For Claude Desktop, use stdio mode with {"mcpServers":{"playwright":{"command":"npx","args":["-y","@executeautomation/playwright-mcp-server"]}}}. VS Code: code --add-mcp '{"name":"playwright","command":"npx","args":["@executeautomation/playwright-mcp-server"]}'. Browser binaries are installed automatically on first use, or manually with npx playwright install.

claude_desktop_config.json
{"mcpServers":{"playwright":{"command":"npx","args":["-y","@executeautomation/playwright-mcp-server"]}}}

Fit and risk

Best for

  • Developers who need browser automation from Claude Desktop, VS Code, and similar clients
  • Users doing web testing and scraping

Not for

  • Environments requiring strict sandboxing that disallow AI-controlled browsers
  • Claude Desktop users needing HTTP/SSE mode (Claude Desktop currently requires stdio mode)

Required permissions

  • Runs real browsers (Chromium, Firefox, WebKit) locally
  • Automatically downloads and installs browser binaries on first use
  • Writes log files to ~/playwright-mcp-server.log
  • Binds a local port in HTTP mode (default 8931)

Risks and side effects

  • AI can execute JavaScript in a real browser, potentially accessing and manipulating sensitive web content
  • Automatic browser downloads consume disk space and bandwidth
  • HTTP mode binds to localhost only; exposing it via SSH tunnels still requires caution

Troubleshooting

  1. HTTP mode 'No transport found for sessionId' error: ensure the config includes the "type": "http" field
  2. Server fails to start: check that port 8931 is available
  3. External access blocked: the server binds to localhost only by design; use SSH tunneling for remote access
  4. In stdio mode, logs go to ~/playwright-mcp-server.log and console output is suppressed to keep JSON-RPC communication clean

Use cases

Let AI assistants drive real web pages and take screenshots
Generate Playwright test code
Web scraping
Device emulation testing with 143 real device presets
Executing JavaScript in a real browser environment

Supported clients

Claude DesktopFull support
Claude CodeFull support
ClinePartial support
Cursor IDEPartial support
VS CodeFull support