
Note: This project is a minimal patch of the upstream playwright-mcp. It primarily swaps Playwright for Patchright and keeps the MCP API surface the same.
概览
Note: This project is a minimal patch of the upstream playwright-mcp. It primarily swaps Playwright for Patchright and keeps the MCP API surface the same. A Model Context Protocol (MCP) server that provides browser automation capabilities using Patchright. This server enables LLMs to interact with web pages through structured accessibility snapshots, bypassing the need for screenshots or visually-tuned models. This package provides MCP interface into Patchright. If you are using a , you might benefit from using the CLI+SKILLS instead. - : Modern increasingly favor CLI–based workflows exposed as SKILLs over MCP because CLI invocations are more token-efficient: they avoid loading large tool schemas and verbose accessibility trees into the model context, allowing agents to act through concise, purpose-built commands.
README
以下为原文 README 节选,完整内容请查看原文。
Patchright MCP
Note: This project is a minimal patch of the upstream playwright-mcp. It primarily swaps Playwright for Patchright and keeps the MCP API surface the same.
A Model Context Protocol (MCP) server that provides browser automation capabilities using Patchright. This server enables LLMs to interact with web pages through structured accessibility snapshots, bypassing the need for screenshots or visually-tuned models.
Patchright MCP vs Patchright CLI
This package provides MCP interface into Patchright. If you are using a coding agent, you might benefit from using the CLI+SKILLS instead.
-
CLI: Modern coding agents increasingly favor CLI–based workflows exposed as SKILLs over MCP because CLI invocations are more token-efficient: they avoid loading large tool schemas and verbose accessibility trees into the model context, allowing agents to act through concise, purpose-built commands. This makes CLI + SKILLs better suited for high-throughput coding agents that must balance browser automation with large codebases, tests, and reasoning within limited context windows.Learn more about Playwright CLI with SKILLS.
-
MCP: MCP remains relevant for specialized agentic loops that benefit from persistent state, rich introspection, and iterative reasoning over page structure, such as exploratory automation, self-healing tests, or long-running autonomous workflows where maintaining continuous browser context outweighs token cost concerns.
Key Features
- Fast and lightweight. Uses Patchright’s accessibility tree, not pixel-based input.
- LLM-friendly. No vision models needed, operates purely on structured data.
- Deterministic tool application. Avoids ambiguity common with screenshot-based approaches.
Requirements
- Node.js 18 or newer
- VS Code, Cursor, Windsurf, Claude Desktop, Goose or any other MCP client
Getting started
First, install the Patchright MCP server with your client.
Standard config works in most of the tools:
{
"mcpServers": {
"patchright": {
"command": "npx",
"args": [
"patchright-mcp@latest"
]
}
}
}
安装
npx patchright-mcp@latest配置
{
"mcpServers": {
"patchright": {
"command": "npx",
"args": [
"patchright-mcp@latest"
]
}
}
}