Playwright MCP: Browser automation via Model Context Protocol
Accessibility tree-based browser automation for LLMs.
Learn more about playwright-mcp
Playwright MCP is a Model Context Protocol server that exposes browser automation functionality to LLMs and AI agents. It uses Playwright's accessibility tree to represent page state as structured data, eliminating the need for screenshot analysis or vision models. The server operates deterministically by parsing the accessibility tree into actionable elements, reducing ambiguity in tool application. It runs on Node.js 18+ and integrates with various MCP clients including VS Code, Cursor, Claude Desktop, and other compatible environments.
Accessibility Tree Protocol
Exposes browser state as structured accessibility data instead of screenshots. LLMs parse semantic elements directly without vision models, enabling deterministic automation through well-defined DOM properties.
Deterministic Element Targeting
Operates on explicit accessibility semantics with defined roles and states. Eliminates ambiguity inherent in pixel-based approaches where visual interpretation can vary across models.
Multi-Client MCP Integration
Standard Model Context Protocol implementation works across VS Code, Cursor, Claude Desktop, and Goose. Single configuration enables browser automation in any compatible MCP client.
import { MCPClient } from '@modelcontextprotocol/sdk/client/index.js';
const client = new MCPClient();
await client.connect();
// Navigate to a website and click a button
await client.callTool('playwright_navigate', { url: 'https://example.com' });
await client.callTool('playwright_click', { selector: 'button[aria-label="Sign In"]' });v0.0.61
- –Internal: release the "mcp" binary and scope it to playwright in NPX world
v0.0.60
- –Fixing the Windows CLI
We are adding a new token-efficient CLI mode of operation to Playwright with the skills located at [playwright-cli](https://github.com/microsoft/playw
- –Support config file in `playwright-cli.json`
- –Support environment configuration
- –Support non-Chrome browsers
- –See https://github.com/microsoft/playwright-cli for more info
See how people are using playwright-mcp
Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
UniTask
Zero-allocation async/await using structs and custom method builders.
qr-scanner
Webcam and image QR detection with native API fallback.
Spring Initializr
Extensible API for generating JVM projects with multi-language and build system support.
Create T3 App
Interactive CLI for scaffolding typesafe Next.js applications with the T3 Stack technology combination.
pino
Low-overhead streaming JSON logger for Node.js.