playwright-mcp
Playwright MCP server
- 38.5k stars
- 3.3k forks
- 0 open issues
- Language: TypeScript
- License: Apache-2.0
- updated
Install
local · npxclaude mcp add playwright-mcp -- npx -y @playwright/mcp{
"mcpServers": {
"playwright-mcp": {
"command": "npx",
"args": ["-y", "@playwright/mcp"]
}
}
}{
"mcpServers": {
"playwright-mcp": {
"command": "npx",
"args": ["-y", "@playwright/mcp"]
}
}
}- Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
- Replace any <placeholder> values with your API keys or paths.
- Restart Claude. The MCP server and its tools appear automatically.
Editor's note
Playwright MCP is a Microsoft-built MCP server that gives Claude and other LLM clients the ability to control a web browser through Playwright's accessibility tree rather than pixel-level screenshots, eliminating any dependency on vision models. It exposes browser automation as structured MCP tools, allowing agents to navigate pages, click elements, fill forms, and extract content based on deterministic accessibility snapshots. It integrates with Claude Desktop via standard MCP configuration and with Claude Code via the CLI command `claude mcp add playwright npx @playwright/mcp@latest`, and also supports VS Code, Cursor, Windsurf, and other MCP clients. The accessibility-tree approach means interactions are unambiguous and token-efficient compared to screenshot-based alternatives, though Microsoft notes that coding agents handling large codebases may prefer their separate Playwright CLI with SKILLS for even lower token overhead. The server suits QA engineers, developers building autonomous web agents, and anyone running exploratory automation or self-healing test workflows that benefit from persistent browser state across iterative reasoning steps.
MCP Servers overview
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:
{
"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:
"amp.mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest"
]
}
}Amp CLI Setup:
Add via the amp mcp add command below
amp mcp add playwright -- npx @playwright/mcp@latestAntigravity
Add via the Antigravity settings or by updating your configuration file:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest"
]
}
}
}Claude Code
Use the Claude Code CLI to add the Playwright MCP server:
claude mcp add playwright npx @playwright/mcp@latestClaude 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:
{
"mcpServers": {
"playwright": {
"type": "stdio",
"command": "npx",
"timeout": 30,
"args": [
"-y",
"@playwright/mcp@latest"
],
"disabled": false
}
}
}Codex
Use the Codex CLI to add the Playwright MCP server:
codex mcp add playwright npx "@playwright/mcp@latest"Alternatively, create or edit the configuration file ~/.codex/config.toml and add:
[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]For more information, see the Codex MCP documentation.
Copilot
Use the Copilot CLI to interactively add the Playwright MCP server:
/mcp addAlternatively, create or edit the configuration file ~/.copilot/mcp-config.json and add:
{
"mcpServers": {
"playwright": {
"type": "local",
"command": "npx",
"tools": [
"*"
],
"args": [
"@playwright/mcp@latest"
]
}
}
}For more information, see the Copilot CLI documentation.
Cursor
Click the button to install:
Or install manually:
Go to Cursor Settings -> MCP -> Add new MCP Server. Name to your liking, use command type with the command npx @playwright/mcp@latest. You can also verify config or add command like arguments via clicking Edit.
Factory
Use the Factory CLI to add the Playwright MCP server:
droid mcp add playwright "npx @playwright/mcp@latest"Alternatively, type /mcp within Factory droid to open an interactive UI for managing MCP servers.
For more information, see the Factory MCP documentation.
Gemini CLI
Follow the MCP install guide, use the standard config above.
Goose
Click the button to install:
Or install manually:
Go to Advanced settings -> Extensions -> Add custom extension. Name to your liking, use type STDIO, and set the command to npx @playwright/mcp. Click "Add Extension".
Grok
Use the Grok CLI to add the Playwright MCP server:
grok mcp add playwright -- npx @playwright/mcp@latestAlternatively, create or edit the configuration file ~/.grok/config.toml and add:
[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]For more information, see the Grok MCP documentation.
Junie
To add the Playwright MCP server in Junie CLI:
Type
/mcpPress
Ctrl+Ato add a new MCP serverSelect Playwright from the list
Alternatively, add to .junie/mcp/mcp.json:
{
"mcpServers": {
"Playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}For more information, see the Junie MCP configuration documentation.
Kiro
Follow the MCP Servers documentation. For example in .kiro/settings/mcp.json:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest"
]
}
}
}LM Studio
Click the button to install:
Or install manually:
Go to Program in the right sidebar -> Install -> Edit mcp.json. Use the standard config above.
opencode
Follow the MCP Servers documentation. For example in ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"playwright": {
"type": "local",
"command": [
"npx",
"@playwright/mcp@latest"
],
"enabled": true
}
}
}
Qodo Gen
Open Qodo Gen chat panel in VSCode or IntelliJ → Connect more tools → + Add new MCP → Paste the standard config above.
Click Save.
VS Code
What people ask about playwright-mcp
What is microsoft/playwright-mcp?
microsoft/playwright-mcp is mcp servers for the Claude AI ecosystem. Playwright MCP server It has 38.5k GitHub stars and its last recorded update is dated 2026-10-22.
How do I install playwright-mcp?
You can install playwright-mcp by cloning the repository (https://github.com/microsoft/playwright-mcp) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is microsoft/playwright-mcp safe to use?
Our security agent has analyzed microsoft/playwright-mcp and assigned a Trust Score of 100/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains microsoft/playwright-mcp?
microsoft/playwright-mcp is maintained by microsoft. The last recorded GitHub activity is dated 2026-10-22, with 0 open issues.
Are there alternatives to playwright-mcp?
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Maintain this repo? Show its Trust Score in your README
The badge shows this repository's current Trust Score and verdict, and links back to this page. It follows the catalogue data: nobody can buy or edit the score it displays.
[](https://claudewave.com/en/repo/microsoft-playwright-mcp)<a href="https://claudewave.com/en/repo/microsoft-playwright-mcp"><img src="https://claudewave.com/api/badge/microsoft-playwright-mcp" alt="ClaudeWave Trust Score for microsoft/playwright-mcp" width="320" height="64"></a>