Data as of
Playwright MCP for Claude Code: Setup & Config
Playwright MCP lets Claude Code operate browsers using structured accessibility data.
Playwright MCP Claude Code configuration
Choose Claude Code configuration scope
For Playwright MCP, open Project scope: .mcp.json at the repository root. Project JSON: merge into mcpServers; user scope: use the CLI.
Add Playwright MCP to Claude Code
Use the playwright-mcp entry below in mcpServers. Keep Playwright MCP's documented stdio connection fields and your other Claude Code entries.
Check Playwright MCP in Claude Code
Playwright MCP: Inspect claude mcp list and /mcp status.
Config file · Project scope: .mcp.json at the repository root
{
"mcpServers": {
"playwright-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"@playwright/mcp@latest"
],
"env": {}
}
}
}claude mcp add-json --scope project 'playwright-mcp' '{"type":"stdio","command":"npx","args":["@playwright/mcp@latest"],"env":{}}'Playwright in Claude Code: stdio checks
- If Playwright MCP fails to start, check npx @playwright/mcp@latest (Node.js/npm), the working directory, and Claude Code's selected scope; inspect claude mcp list and /mcp.
- Playwright MCP uses stdio here: Claude Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
- Tools
- browser_close, browser_resize, browser_console_messages
Playwright MCP — details. Claude Code guide
Frequently asked questions
Register Playwright MCP with the displayed claude mcp add-json --scope project command, or merge the JSON into .mcp.json at the repository root.
Claude Code's playwright-mcp example uses stdio.
Playwright MCP's Claude Code configuration invokes npx @playwright/mcp@latest (Node.js/npm).
Playwright MCP's stored list contains 25 tools, including browser_close, browser_resize, browser_console_messages. Compare those names with Claude Code's connected tool list; the stored list is not a live check.