Playwright MCP
Playwright MCP lets AI assistants control a browser through the Model Context Protocol. Instead of processing screenshots, the model reads a structured accessibility tree — which elements exist, their roles, their text. Works with VS Code, Claude, Cursor, and any MCP client. No vision model required.
Installation — add to your MCP client config
The same config works for most MCP clients. Add it to the appropriate config file for your client:
How it works — accessibility tree, not screenshots
When a tool runs, it returns a structured snapshot of the page — elements with their roles, text, and refs. The model uses those refs to interact. No need to parse pixel positions or describe what it 'sees' in an image.
What you can ask the AI to do
After connecting MCP, just describe what you need in natural language. The assistant picks the right tools automatically.
Configuration options
By default: headed browser (you can see it), persistent profile (cookies preserved between sessions). Override with flags in the args array.