| name | create-playwright-mcp |
| description | Sets up Playwright MCP server integration for Claude Code. Use when setting up Playwright, browser automation, web testing, scraping, or adding browser control capabilities. |
| allowed-tools | Bash, Read, Write, AskUserQuestion, Glob |
Create Playwright MCP Integration
Purpose
Guide users through setting up a Playwright MCP server to enable Claude Code to interact with browsers for web automation, testing, and scraping.
Instructions
1. Check Prerequisites
Verify Node.js is installed (v18+ required):
node --version
2. Install Playwright Browsers
Playwright requires browser binaries to be installed:
npx playwright install
This installs Chromium, Firefox, and WebKit browsers. For a smaller installation, you can install only specific browsers:
npx playwright install chromium
npx playwright install firefox
npx playwright install webkit
3. Register the MCP Server
Add the official Microsoft Playwright MCP server to Claude Code using npx (no local installation needed):
claude mcp add playwright -s project -- npx @playwright/mcp@latest
4. Display Restart Notice
IMPORTANT: After completing all setup steps, you MUST display this notice to the user:
================================================
RESTART REQUIRED
================================================
The Playwright MCP server has been configured.
Please restart Claude Code for the MCP
server to be registered and available.
After restarting:
1. Run /mcp to verify the server is connected
2. Test with: "Navigate to google.com and take a screenshot"
================================================