by microsoft
Enhance software testing with Playwright MCP: Fast, reliable browser automation, an innovative alternative to Selenium s
Controls web browsers programmatically to navigate pages, interact with elements, and extract content. Provides LLMs with comprehensive browser automation capabilities through Playwright.
Playwright Browser Automation is an official MCP server published by microsoft that provides AI assistants with tools and capabilities via the Model Context Protocol. Enhance software testing with Playwright MCP: Fast, reliable browser automation, an innovative alternative to Selenium s It is categorized under browser automation. This server exposes 22 tools that AI clients can invoke during conversations and coding sessions.
You can install Playwright Browser Automation in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
Apache-2.0
Playwright Browser Automation is released under the Apache-2.0 license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Fetch and extract information from websites automatically
Example
Research competitor pricing, scrape product reviews, monitor news mentions
Automate 5-10 hours/week of manual web research
Track website changes, new content, price updates
Example
Monitor competitor blog for new posts, track stock availability, watch for pricing changes
Stay informed without manual checking, never miss important updates
Extract structured data from multiple websites
Example
Compile product listings from 10 e-commerce sites, aggregate job postings, collect real estate data
Build datasets 100x faster than manual copying
Share your MCP server with the developer community
Playwright Browser Automation is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
Playwright Browser Automation is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
We evaluated Playwright Browser Automation against two servers with overlapping tools; this profile had the clearer scope statement.
Playwright Browser Automation has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
According to our notes, Playwright Browser Automation benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
Playwright Browser Automation has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
According to our notes, Playwright Browser Automation benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
Playwright Browser Automation reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
Playwright Browser Automation is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
We wired Playwright Browser Automation into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
showing 1-10 of 27
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.
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.<br>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.
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"
]
}
}
}
<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code"> <img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">
<details> <summary>Amp</summary>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 addcommand below
amp mcp add playwright -- npx @playwright/mcp@latest
</details>
<details>
<summary>Antigravity</summary>
Add via the Antigravity settings or by updating your configuration file:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest"
]
}
}
}
</details>
<details>
<summary>Claude Code</summary>
Use the Claude Code CLI to add the Playwright MCP server:
claude mcp add playwright npx @playwright/mcp@latest
</details>
<details>
<summary>Claude Desktop</summary>
Follow the MCP install guide, use the standard config above.
</details> <details> <summary>Cline</summary>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
}
}
}
</details>
<details>
<summary>Codex</summary>
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.
</details> <details> <summary>Copilot</summary>Use the Copilot CLI to interactively add the Playwright MCP server:
/mcp add
Alternatively, 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.
</details> <details> <summary>Cursor</summary><img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">
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.
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.
</details> <details> <summary>Gemini CLI</summary>Follow the MCP install guide, use the standard config above.
</details> <details> <summary>Goose</summary>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".
Follow the MCP Servers documentation. For example in .kiro/settings/mcp.json:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest"
]
}
}
}
</details>
<details>
<summary>LM Studio</summary>
Go to Program in the right sidebar -> Install -> Edit mcp.json. Use the standard config above.
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
}
}
}
</details>
<details>
<summary>Qodo Gen</summary>
Open Qodo Gen chat panel in VSCode or IntelliJ → Connect more tools → + Add new MCP → Paste the standard config above.
Click <code>Save</code>.
</details> <details> <summary>VS Code</summary><img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code"> <img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">
Follow the MCP install guide, use the standard config above. You can also install the Playwright MCP server using the VS Code CLI:
# For VS Code
code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}'
After installation, the Playwrigh
Interact with services that don't offer APIs
Example
Check form submissions, validate website functionality, test user flows
Automate interactions with any website, even without API
Prerequisites
Time Estimate
20-40 minutes including configuration and testing
Steps
Troubleshooting
✓ Do
✗ Don't
💡 Pro Tips
Architecture
MCP server handles HTTP requests, HTML parsing, JavaScript rendering (if headless browser), and returns structured data to Claude.
Protocols
Compatibility
✓ Use when
Use for research automation, content monitoring, data aggregation from multiple sources, and when official APIs don't exist. Best for read-only information gathering.
✗ Avoid when
Avoid for sites with APIs (use API instead), sites that explicitly forbid scraping, when data is copyrighted, or for login-required content without proper authorization.