39,400
stars
+37
3,413
forks
150
watchers
865
prs
943
issues
74
releases
0
discussions
README
Playwright MCP
A Model Context Protocol (MCP) server that provides browser automation capabilities using Playwright. This server enables LLMs to interact with web pages through structured accessibility snapshots, bypassing the need for screenshots or visually-tuned models.
Playwright MCP vs Playwright CLI
This package provides MCP interface into Playwright. If you are using a coding agent, you might benefit from using the CLI+SKILLS instead.
- CLI: Modern coding agents increasingly favor CLI–based workflows exposed as SKILLs over MCP because CLI invocations are more token-efficient: they avoid loading large tool schemas and verbose accessibility trees into the model context, allowing agents to act through concise, purpose-built commands. This makes CLI + SKILLs better suited for high-throughput coding agents that must balance browser automation with large codebases, tests, and reasoning within limited context windows.Learn more about Playwright CLI with SKILLS.
- MCP: MCP remains relevant for specialized agentic loops that benefit from persistent state, rich introspection, and iterative reasoning over page structure, such as exploratory automation, self-healing tests, or long-running autonomous workflows where maintaining continuous browser context outweighs token cost concerns.
Key Features
- Fast and lightweight. Uses Playwright's accessibility tree, not pixel-based input.
- LLM-friendly. No vision models needed, operates purely on structured data.
- Deterministic tool application. Avoids ambiguity common with screenshot-based approaches.
Requirements
- Node.js 18 or newer
- VS Code, Cursor, Windsurf, Claude Desktop, Goose, Grok, Junie or any other MCP client
Getting started
First, install the Playwright MCP server with your client.
Standard config works in most of the tools:
js
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest"
]
}
}
}
Amp
Add via the Amp VS Code extension settings screen or by updating your settings.json file:
json
"amp.mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest"
]
}
}
Amp CLI Setup:
Add via the amp mcp add command below
bash
amp mcp add playwright -- npx @playwright/mcp@latest
Antigravity
Add via the Antigravity settings or by updating your configuration file:
json
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest"
]
}
}
}
Claude Code
Use the Claude Code CLI to add the Playwright MCP server:
bash
claude mcp add playwright npx @playwright/mcp@latest
Claude Desktop
Follow the MCP install guide, use the standard config above.
Cline
Follow the instruction in the section Configuring MCP Servers
Example: Local Setup
Add the following to your cline_mcp_settings.json file:
json
{
"mcpServers": {
"playwright": {
"type": "stdio",
"command": "npx",
"Top issues
#1822No docker image available for 0.0.841 comments · 2026-11-04#1808Docker image: publish a build with Node's October root certificate update0 comments · 2026-10-30
Latest release
v0.0.84 v0.0.84 2026-10-31✨ Highlights - 👥 Separate sessions in one browser — work with multiple accounts without sharing their cookies or storage. browser_tabs with action: "new" now accepts isolatedContext: "": tabs with the same name share a context, while different names stay isolated. Omit it or use "default" for the default context. Cookie and storage tools operate on the current tab's context. (microsoft/playwright43087) - 🙈 Redact runtime values in URLs (1791) — session and grant values minted at runtime cannot be listed in a secrets file ahead of time. --redact-url-params=access_token,code (config redactUr