The Playwright MCP server is Microsoft's official bridge between LLMs and browser automation. It uses accessibility tree snapshots instead of screenshots, making it deterministic, fast, and vision-model-free. With 33K+ GitHub stars, it is the de facto standard for AI-driven browser automation.
Capabilities
- Navigate URLs, click elements, fill forms, and submit
- Take screenshots and PDF snapshots
- Read page content via accessibility tree
- Handle authentication flows and cookies
- Execute JavaScript in browser context
- Emulate devices with 143+ real device presets
Usage
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"]
}
}
}
Options
| Flag | Description |
|------|-------------|
| --headless | Run browser in headless mode |
| --browser <type> | Browser engine: chrome, firefox, webkit, msedge |
| --caps vision,pdf,devtools | Enable additional capabilities |
| --cdp-endpoint <url> | Connect to existing browser via CDP |