Skip to main content

Requirements

Before installing Playwright MCP, ensure you have:
  • Node.js 18 or newer installed on your system
  • An MCP-compatible client (VS Code, Cursor, Claude Desktop, etc.)
On first run, Playwright will automatically download browser binaries. This is a one-time setup that may take a few minutes depending on your connection speed.

Standard Configuration

Most MCP clients use this standard JSON configuration:

Client-Specific Installation

Choose your MCP client below for detailed installation instructions:

VS Code / VS Code Insiders

One-Click Install

Click the button to install directly:Install in VS Code

Manual Installation

  1. Open VS Code Settings
  2. Search for “MCP”
  3. Add the standard configuration above

CLI Installation

After installation, the Playwright MCP server will be available for use with GitHub Copilot in VS Code.

Settings UI

Add via the Amp VS Code extension settings screen or update settings.json:

CLI

Add via Antigravity settings or update your configuration file:
Use the Claude Code CLI:

CLI

Configuration File

Edit ~/.codex/config.toml:
See Codex MCP documentation for more details.

Interactive Setup

Configuration File

Edit ~/.copilot/mcp-config.json:
See Copilot CLI documentation for more information.

CLI

Interactive UI

Type /mcp within Factory droid to open the interactive UI for managing MCP servers.See Factory MCP documentation for more details.
Follow the MCP install guide and use the standard configuration.
Follow the MCP Servers documentation.Example configuration in .kiro/settings/mcp.json:

One-Click Install

Install in LM Studio

Manual Installation

  1. Open LM Studio
  2. Go to Program in the right sidebar
  3. Click InstallEdit mcp.json
  4. Add the standard configuration
Follow the MCP Servers documentation.Example configuration in ~/.config/opencode/opencode.json:
  1. Open the Qodo Gen chat panel in VSCode or IntelliJ
  2. Click “Connect more tools”
  3. Click ”+ Add new MCP”
  4. Paste the standard configuration
  5. Click “Save”

Settings UI

  1. Go to SettingsAIManage MCP Servers+ Add
  2. Follow the add an MCP Server guide
  3. Use the standard configuration

Slash Command

Type /add-mcp in the Warp prompt and paste:

Advanced Installation

Standalone HTTP Server

For systems without a display or when running from IDE worker processes, run Playwright MCP as a standalone HTTP server:
Then configure your MCP client to connect via HTTP:

Docker Installation

The Docker implementation currently only supports headless Chromium.

MCP Client Spawns Container

Long-Lived Service Container

Run the container as a persistent service:
The server will listen on port 8931 and can be reached by any MCP client using the HTTP URL configuration above.

Build Docker Image Locally

Verification

After installation, verify that Playwright MCP is working:
  1. Restart your MCP client to load the new configuration
  2. Check for available tools - You should see browser automation tools like browser_navigate, browser_snapshot, etc.
  3. Test basic navigation - Try asking your LLM to navigate to a simple website
If tools aren’t appearing, check your client’s logs for connection errors or configuration issues.

Troubleshooting

On first run, Playwright downloads browser binaries automatically. If you see errors about missing browsers:
Or use the browser_install tool from within your MCP client.
If you encounter permission errors:
  • Ensure Node.js is properly installed and in your PATH
  • Try running with explicit permissions: npx --yes @playwright/mcp@latest
  • On Linux, you may need to install additional dependencies
If the MCP client can’t connect to Playwright:
  • Verify Node.js version is 18 or newer: node --version
  • Check that npx can execute: npx --version
  • Try increasing timeout in your client config (if supported)
If running on a system without a display:
  • Use --headless flag in your configuration
  • Or run as a standalone HTTP server (see Advanced Installation)

Next Steps

Quick Start

Create your first automation with Playwright MCP

Configuration

Learn about all configuration options and customization