Home / MCP / Playwright MCP Server

Playwright MCP Server

Provides browser automation via Playwright for page navigation, screenshots, and JavaScript in a real browser context.

javascript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "playwright": {
            "command": "npx",
            "args": [
                "-y",
                "@automatalabs/mcp-server-playwright"
            ]
        }
    }
}

MCP Server Playwright enables automated browser interactions through Playwright, letting you control a real browser from your MCP client. You can navigate pages, capture screenshots, fill forms, click elements, and run JavaScript in the browser context, all driven by your AI workflows or automation scripts.

How to use

You connect to the Playwright MCP server from your MCP client and call the available browser actions as tools. Use these capabilities to automate web tasks in a real browser environment, capture results like screenshots, and inspect console output to debug scripts.

How to install

Prerequisites you need installed before starting are Node.js and npm (or npx). Ensure npx is available in your system PATH.

Option 1: Install via Smithery for Claude Desktop. Run the following command to install the MCP Server Playwright package for Claude:

npx -y @smithery/cli install @automatalabs/mcp-server-playwright --client claude

Option 2: Install directly with npx. This will set up the server and create or update the Claude configuration file automatically.

npx @automatalabs/mcp-server-playwright install
```

This command also configures the server integration and creates the configuration at the following path:
- Windows: %APPDATA%\Claude\claude_desktop_config.json
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Option 3: Install via MCP Get (mcp-get). Use this to install the MCP Server Playwright package:

npx @michaellatman/mcp-get@latest install @automatalabs/mcp-server-playwright

Configuration file update happens automatically when using these installation methods. The following MCP server entry is created to enable the Playwright server.

Additional configuration and startup

After installation, the MCP configuration includes a server entry named playground (or playwright) with the following runtime configuration.

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["-y", "@automatalabs/mcp-server-playwright"]
    }
  }
}

Available tools

browser_navigate

Navigate to a URL in the browser and load the target page.

browser_screenshot

Capture a screenshot of the full page or a specific element by selector.

browser_click

Click an element on the page using a CSS selector.

browser_click_text

Click an element by its visible text content.

browser_hover

Hover the cursor over an element identified by a CSS selector.

browser_hover_text

Hover over an element by its visible text content.

browser_fill

Fill an input field identified by a selector with a value.

browser_select

Select an option in a SELECT element by CSS selector.

browser_select_text

Select an option in a SELECT element by its visible text.

browser_evaluate

Execute JavaScript in the browser context and return the result.