playwright-mcp-dev

Installation
Summary

Developer guide for extending Playwright MCP tools and CLI commands.

  • Add new MCP tools in packages/playwright/src/mcp/browser/tools/, register in tools.ts, and define capabilities in config.d.ts
  • CLI commands map to MCP tools; register new commands in packages/playwright/src/mcp/terminal/commands.ts and update help generator if adding a category
  • Config options require updates across program.ts (CLI option), config.d.ts (definition), and config.ts (implementation and environment mapping)
  • Run npm run ctest-mcp <category> for testing and npm run flint before commit; always keep watch mode running and use lint to catch type errors
SKILL.md

MCP

Adding MCP Tools

  • 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
  • Add ToolCapability in packages/playwright/src/mcp/config.d.ts
  • Place new tests in tests/mcp/mcp-<category>.spec.ts

Building

  • Assume watch is running at all times, run lint to see type errors

Testing

  • Run tests as npm run ctest-mcp <category>
  • Do not run test --debug

CLI

Adding commands

  • CLI commands are based on MCP tools. Implement the corresponding MCP tool as per Adding MCP Tools section above, if needed.
Related skills
Installs
319
GitHub Stars
88.5K
First Seen
Feb 2, 2026