How microsoft/playwright-mcp works
Playwright MCP exposes browser automation to MCP clients through a server/CLI interface, returning structured accessibility snapshots and tool results. The README identifies major capability areas, while the sampled implementation mainly shows the CLI and library entry point delegating to Playwright’s bundled tools. The src tree is present but its contents were not supplied, so capability internals are represented at the directory level and their internal wiring is omitted.
Main entry points: cli.js MCP CLI · index.js Connection API · src Navigation and tabs · config.d.ts Server configuration
Components 15
Client entry points
- MCP CLI
cli.js - Connection API
index.js
Browser automation
- Playwright tools
- Web browser
Tool capabilities
- Navigation and tabs
src - Page interaction
src - Accessibility snapshots
src - Network controls
src - Storage tools
src - DevTools
src - Coordinate interaction
src - PDF tools
src - Test assertions
src - Server configuration
config.d.ts
Other components
- MCP client
Connections 15
- MCP client → MCP CLI: connects through
README.md - MCP CLI → Playwright tools: registers MCP command
cli.js - MCP client → Connection API: uses connection API
- Connection API → Playwright tools: exports connection factory
index.js - Playwright tools → Web browser: automates
README.md - Playwright tools → Navigation and tabs: provides
README.md - Playwright tools → Page interaction: provides
README.md - Playwright tools → Accessibility snapshots: returns snapshots
README.md - Playwright tools → Network controls: provides
- Playwright tools → Storage tools: provides
- Playwright tools → DevTools: provides
- Playwright tools → Coordinate interaction: provides
- Playwright tools → PDF tools: provides
- Playwright tools → Test assertions: provides
- Playwright tools → Server configuration: accepts options