# Playwright MCP Setup ## 1. Enable in .mcp.json The `.mcp.json` in this repo already has Playwright configured but disabled. To enable, change `"disabled": true` to `"disabled": false`: ```json { "mcpServers": { "playwright": { "command": "npx", "args": ["-y", "@playwright/mcp"], "disabled": false } } } ``` ## 2. Requirements Node.js must be installed. The server runs via `npx` and downloads automatically on first use. No separate install step needed. ## 3. Available tools Once enabled, Claude has access to: | Tool | Description | |-------------|--------------------------------------------| | `navigate` | Go to a URL | | `screenshot`| Capture the current page | | `click` | Click an element | | `type` | Type text into a field | | `snapshot` | Get accessibility tree (faster than screenshot) | ## 4. Example usage ``` Go to https://example.com, take a screenshot, and tell me what's on the page ``` ``` Fill out the login form at https://myapp.com with username "test" and password "test" ``` ## 5. Headless vs headed By default Playwright runs headless. To see the browser window, add `--headed` to the args array in `.mcp.json`.