MCP server
Playwright MCP Server
- Maintainer
- Official · Microsoft
- Runs
- Local (stdio)
- GitHub
- ★ 38,590, last push 2026-10-22 (checked 2026-10-24)
- License
- Apache-2.0
- Registry
- io.github.microsoft/playwright-mcp
- Connects to
- Playwright
- DevHunt
- Microsoft on DevHunt
Install the Playwright MCP Server
Pick your client. Each tab starts the same local command. Config shapes checked against each client's docs on 2026-10-25.
Run in a terminal. Everything after -- is the command that starts the server. docs
claude mcp add --transport stdio playwright -- npx -y @playwright/mcp@latest
Claude Desktop only: Settings > Developer > Edit Config opens claude_desktop_config.json. Add this, save and restart the app. docs
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project), or use the install button. docs
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}Add to .vscode/mcp.json (note the "servers" key and the type), or use the install button. Command Palette > "MCP: Open User Configuration" for all workspaces. docs
{
"servers": {
"playwright": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}Run codex mcp add playwright -- npx -y @playwright/mcp@latest, or add this to ~/.codex/config.toml. docs
[mcp_servers.playwright] command = "npx" args = ["-y", "@playwright/mcp@latest"]
Run in a terminal (-s user adds it for all projects; the default is this project). docs
gemini mcp add -s user playwright npx -- -y @playwright/mcp@latest
Run in a terminal; it writes ~/.copilot/mcp-config.json. docs
copilot mcp add playwright -- npx -y @playwright/mcp@latest
Add to mcp_config.json: ~/.config/devin/mcp_config.json on macOS and Linux (older installs: ~/.codeium/windsurf/mcp_config.json), %APPDATA%\devin\ on Windows. docs
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}Add to Zed's settings.json (or Settings > AI > MCP Servers > Add Server). Remote servers without an Authorization header sign in with OAuth. docs
{
"context_servers": {
"playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}Add to opencode.json in the project (or ~/.config/opencode/opencode.json). docs
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"playwright": {
"type": "local",
"command": [
"npx",
"-y",
"@playwright/mcp@latest"
],
"enabled": true
}
}
}Add to ~/.kiro/settings/mcp.json (all projects) or .kiro/settings/mcp.json (this project). docs
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}MCP Servers > Configure > Configure MCP Servers opens cline_mcp_settings.json; add this entry. docs
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}Tools it exposes
The core tools work on the page's accessibility snapshot, not pixels. More groups (network, storage, DevTools, vision, PDF, test assertions) are opt-in with --caps.
browser_navigate: Navigate to a URLbrowser_snapshot: Accessibility snapshot of the pagebrowser_click: Click an elementbrowser_type: Type textbrowser_fill_form: Fill several form fields at oncebrowser_select_option: Select an optionbrowser_press_key: Press a keybrowser_wait_for: Wait for text or timebrowser_take_screenshot: Take a screenshotbrowser_console_messages: Read console messagesbrowser_network_requests: List network requestsbrowser_evaluate: Evaluate JavaScript on the pagebrowser_tabs: Manage tabs
From the project's own tool list, checked 2026-11-07. Tools change between releases; your client lists the current ones after you connect.
Security notes
- browser_run_code_unsafe runs arbitrary Playwright code; the README marks it unsafe, so keep approval prompts on for it.
- The local server runs with your user's permissions (npx downloads it from npm on first run). The package is pinned to @latest, so each start can pull a new version; pin a version if you want to review updates.
- It reads web pages, and a page can carry prompt-injection instructions. Keep approval prompts on and use a browser profile without your personal sign-ins.
Alternatives
- Playwright (ExecuteAutomation)community · ★ 5.7k
Playwright browser and API testing with screenshots and code generation.
- Browser Useofficial · ★ 119k
An agent that drives a real Chrome to finish tasks: fill forms, click through flows, extract data.
- Chrome DevToolsofficial · ★ 54k
Control a live Chrome: performance traces, network requests, console and screenshots for debugging.
- Skyvernofficial · ★ 23k
AI browser automation in Skyvern's cloud: navigate, fill forms and pull data from any site.
- Apifyofficial · ★ 13k
Run any of thousands of Apify scrapers (Actors) for social media, maps, e-commerce and more.
- Firecrawlofficial · ★ 7.7k
Scrape, crawl, map and search websites into clean Markdown or JSON.
- Bright Dataofficial · ★ 2.7k
Web search and scraping that gets past blocks and CAPTCHAs, with a free monthly quota.
- Hyperbrowserofficial · ★ 791
Scrape, crawl and extract with cloud browsers, plus browser-use and Claude computer-use agents.
FAQ
What does the Playwright MCP Server do?+
Browser automation through the accessibility tree: click, type, navigate and snapshot pages, no screenshots needed. Its tools include browser_navigate, browser_snapshot, browser_click, browser_type and browser_fill_form.
Is the Playwright MCP server official?+
Official: built and maintained by Microsoft.
How do I add Playwright to Claude Code?+
Run: claude mcp add playwright -- npx -y @playwright/mcp@latest. Add --scope project to share it with your team through .mcp.json.
How do I use the Playwright MCP server in Cursor or VS Code?+
Open the Cursor or VS Code tab above: it has the mcp.json entry and a one-click install link. Cursor uses the "mcpServers" key; VS Code uses "servers" and needs a type ("stdio").
Does Playwright work in ChatGPT and claude.ai?+
No: it runs locally over stdio, and ChatGPT and claude.ai only connect to remote servers. Use it in Claude Desktop, Claude Code, Cursor, VS Code or another client that can start a local process.
What are the alternatives to the Playwright MCP server?+
Other browser & web scraping MCP servers: Playwright (ExecuteAutomation), Browser Use, Chrome DevTools, Skyvern and Apify.