What problem does it solve?
Explains how to add and debug Playwright MCP tools and CLI commands, unifying setup, registration, testing, and lint workflows.
Core Features & Use Cases
- Guided MCP Tool Creation: Create a new tool file under packages/playwright/src/mcp/browser/tools/your-tool.ts and register it in packages/playwright/src/mcp/browser/tools.ts.
- Registration & Configuration: Add ToolCapability in packages/playwright/src/mcp/config.d.ts and wire the tool into the CLI command set.
- Testing & Lint: Place tests in tests/mcp/mcp-<category>.spec.ts and run npm run ctest-mcp <category>, with lint checks before commit.
- CLI Integration: Extend CLI categories and commands as needed, updating docs and references accordingly.
Quick Start
Create a new tool in packages/playwright/src/mcp/browser/tools/your-tool.ts, register the tool in packages/playwright/src/mcp/browser/tools.ts, and ensure the MCP workflow is wired for testing.