Playwright MCP

Coding Agents 💻 TypeScript ⚖️ Apache-2.0 🟢 Actively maintained
36.8k stars

Playwright MCP is a Model Context Protocol server that gives LLMs browser automation via Playwright, using structured accessibility snapshots instead of screenshots. It solves the problem of enabling AI agents to interact with web pages without vision models, and is intended for developers building agentic workflows in MCP-compatible clients.

✨ Key features

  • Fast and lightweight, uses accessibility tree not pixels
  • LLM-friendly, no vision models needed
  • Deterministic tool application avoids screenshot ambiguity
  • Works with many MCP clients like VS Code, Claude, Cursor
  • Configurable via CLI arguments and environment variables

🎯 Use cases

  • Exploratory automation of web pages
  • Self-healing tests that adapt to page changes
  • Long-running autonomous workflows needing browser context
  • Integrating browser control into coding agents via MCP

📦 Installation

🧰 Requirements: Node.js 18 or newer and an MCP client such as VS Code, Cursor, or Claude Desktop.

Install the Playwright MCP server with your client. Standard config works in most tools:

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

For specific clients, see the README for tailored instructions (e.g., Claude Code: claude mcp add playwright npx @playwright/mcp@latest).

🚀 Usage

The README does not provide a standalone usage example beyond configuration. The server is started via the MCP client configuration, e.g., in VS Code add the MCP server with the standard config, then use the browser tools through the client.

❓ FAQ

What is the difference between Playwright MCP and Playwright CLI?

Playwright MCP provides an MCP interface for agentic loops needing persistent state and rich introspection, while Playwright CLI with SKILLS is more token-efficient for coding agents.

Does Playwright MCP require vision models?

No, it operates purely on structured accessibility snapshots, so no vision models are needed.

What Node.js version is required?

Node.js 18 or newer.

Can I use Playwright MCP with VS Code?

Yes, you can install it via the VS Code CLI or through the MCP settings, and it works with GitHub Copilot agent.

📊 Repository

Stars★ 36,827
Forks🍴 3,095
Open issues🐛 2
Last commit🕒 Sep 3, 2026
Created📅 Mar 2025
Language💻 TypeScript
License⚖️ Apache-2.0
Topics mcpplaywright

🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.