Add it to Claude Code
claude mcp add playwright-electron -- npx @robertn702/playwright-mcp-electron@latestMake your agent remember this setup
playwright-electron's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.
npx conare@latestFree · one command · indexes the sessions already on disk. Set up in the browser instead →
What it does
- Full support for testing and automating Electron desktop applications
- Uses Playwright's accessibility tree for fast and lightweight automation
- Operates on structured data without requiring vision models
- Allows execution of JavaScript in Electron's main process
- Provides tools for managing and interacting with multiple Electron windows
Try it
Original README from robertn702/playwright-mcp-electron
Playwright MCP with Electron Support
A Model Context Protocol (MCP) server that provides browser and Electron application automation capabilities using Playwright. This enhanced fork of the official Playwright MCP includes full support for testing and automating Electron desktop applications alongside traditional web browser automation.
Key Features
- Electron support. Test and automate Electron desktop applications with dedicated tools.
- Fast and lightweight. Uses Playwright'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.
- Main process access. Execute JavaScript in Electron's main process.
- Window management. Control and interact with multiple Electron windows.
Requirements
- Node.js 18 or newer
- VS Code, Cursor, Windsurf, Claude Desktop, Goose or any other MCP client
Getting started
First, install the Playwright Electron MCP server with your client. A typical configuration looks like this:
{
"mcpServers": {
"playwright-electron": {
"command": "npx",
"args": [
"@robertn702/playwright-mcp-electron@latest"
]
}
}
}
By default, this runs in Electron mode. To use regular browser automation, add --browser chrome or --browser firefox.
You can also install the Playwright MCP server using the VS Code CLI:
# For VS Code
code --add-mcp '{"name":"playwright-electron","command":"npx","args":["@robertn702/playwright-mcp-electron@latest"]}'
After installation, the Playwright Electron MCP server will be available for use with your GitHub Copilot agent in VS Code.
</details> <details> <summary><b>Install in Cursor</b></summary>Click the button to install:
Or install manually:
Go to Cursor Settings -> MCP -> Add new MCP Server. Name to your liking, use command type with the command npx @robertn702/playwright-mcp-electron. You can also verify config or add command like arguments via clicking Edit.
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@robertn702/playwright-mcp-electron@latest"
]
}
}
}
</details>
<details>
<summary><b>Install in Windsurf</b></summary>
Follow Windsurf MCP documentation. Use following configuration:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@robertn702/playwright-mcp-electron@latest"
]
}
}
}
</details>
<details>
<summary><b>Install in Claude Desktop</b></summary>
Follow the MCP install guide, use following configuration:
{
"mcpServers": {
"playwright-electron": {
"command": "npx",
"args": [
"@robertn702/playwright-mcp-electron@latest"
]
}
}
}
</details>
<details>
<summary><b>Install in Claude Code</b></summary>
Use the Claude Code CLI to add the Playwright Electron MCP server:
claude mcp add playwright-electron npx @robertn702/playwright-mcp-electron@latest
</details>
<details>
<summary><b>Install in Goose</b></summary>