Get the FREE Ultimate OpenClaw Setup Guide →

playwright

Playwright MCP server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio microsoft-playwright-mcp npx @playwright/mcp@latest

How to use

The Playwright MCP server provides browser automation capabilities that allow LLMs to interact with web pages using structured accessibility snapshots. This eliminates the need for screenshots or visually-tuned models, making it a lightweight and efficient solution for browser automation tasks. Users can leverage this server for various applications, including exploratory automation, self-healing tests, and long-running autonomous workflows that require a persistent browser context. The server operates purely on structured data, making it LLM-friendly and deterministic in tool application.

How to install

To install the Playwright MCP server, ensure you have Node.js version 18 or newer installed on your system. Then, you can use the following command to add the server to your MCP client:

npx @playwright/mcp@latest

Alternatively, you can configure it directly in your MCP client settings as shown below:

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

Additional notes

When using the Playwright MCP server, ensure that your MCP client is compatible and properly configured. Common issues may arise from incorrect Node.js versions or misconfigured settings. Additionally, consider the environment variables that may be required by your specific MCP client. For optimal performance, familiarize yourself with the capabilities of the Playwright library and how it integrates with your automation tasks.

Related MCP Servers

Sponsor this space

Reach thousands of developers