Playwriter

v1.0.0Browser Automationstable

Chrome extension & CLI to let agents control your browser. Runs Playwright snippets in a stateful sandbox. Available as CLI or MCP

mcpplaywright
Share:
3,539
Stars
0
Downloads
0
Weekly
0/5

What is Playwriter?

Playwriter is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to chrome extension & cli to let agents control your browser. runs playwright snippets in a stateful sandbox. available as cli or mcp

Chrome extension & CLI to let agents control your browser. Runs Playwright snippets in a stateful sandbox. Available as CLI or MCP

This server falls under the Browser Automation category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Chrome extension & CLI to let agents control your browser. R

Use Cases

Control your browser with Playwright snippets in a sandbox.
Available as CLI or MCP for stateful automation.
remorses

Maintainer

LicenseMIT
Languagehtml
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx playwriter

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Playwriter

Playwriter is a Chrome extension and CLI tool that lets AI agents control a real browser by executing Playwright JavaScript snippets in a stateful sandbox. Unlike headless Playwright, it runs inside your actual Chrome browser so agents can interact with authenticated sessions, extensions, and pages that require real browser state. It is available both as a standalone CLI and as an MCP server, and supports remote browser control over network tunnels for use in cloud agent workflows.

Prerequisites

  • Node.js 18 or later installed
  • Google Chrome browser installed
  • Playwriter Chrome extension installed from the Chrome Web Store
  • An MCP client such as Claude Desktop, or use the CLI directly
  • Optional: a tunnel service (e.g. traforo) for remote browser access
1

Install the Playwriter CLI globally

Install the playwriter package globally via npm so the CLI is available on your PATH.

npm i -g playwriter
2

Install the Chrome extension

Install the Playwriter extension from the Chrome Web Store. The extension is what allows the CLI and MCP server to communicate with your real Chrome browser. Search for 'Playwriter MCP' in the Chrome Web Store or use the direct link from the repository.

3

Start Chrome with the bundled extension

Use the CLI to launch Chrome with the Playwriter extension loaded and ready for agent control.

playwriter browser start
4

Create an isolated browser session

Create a new isolated session to keep agent interactions separate from your regular browsing. Sessions maintain state (cookies, localStorage) across multiple agent commands.

playwriter session new
5

Add to Claude Desktop as an MCP server

Register Playwriter as an MCP server in Claude Desktop so Claude can call the execute tool to run Playwright snippets in your browser.

{
  "mcpServers": {
    "playwriter": {
      "command": "npx",
      "args": ["-y", "playwriter"],
      "env": {}
    }
  }
}
6

Configure remote access (optional)

To control a browser on a remote machine over a network tunnel, set the PLAYWRITER_HOST and PLAYWRITER_TOKEN environment variables.

export PLAYWRITER_HOST=https://my-machine-tunnel.traforo.dev
export PLAYWRITER_TOKEN=your-secret-token

Playwriter Examples

Claude Desktop configuration

Register Playwriter as an MCP server. The execute tool becomes available for Claude to run Playwright JavaScript snippets in your browser.

{
  "mcpServers": {
    "playwriter": {
      "command": "npx",
      "args": ["-y", "playwriter"],
      "env": {
        "PLAYWRITER_HOST": "",
        "PLAYWRITER_TOKEN": ""
      }
    }
  }
}

Prompts to try

After connecting Playwriter to Claude Desktop, use these prompts to control your browser with AI assistance.

- "Navigate to github.com and take a screenshot with accessibility labels so I can see what's clickable."
- "Go to my app's login page and fill in the form using the stored credentials, then submit."
- "Monitor all network requests made when I click the checkout button on this page."
- "Run this Playwright snippet to extract all product prices from the current page."
- "Set a breakpoint on this function and step through its execution while I interact with the page."

Troubleshooting Playwriter

CLI cannot connect to the Chrome browser

Ensure the Playwriter Chrome extension is installed and enabled, and that Chrome was started using playwriter browser start rather than launched manually. The extension must be active for the CLI to establish a connection.

Playwright snippets fail with 'page is not defined'

The execute tool provides page, context, state, and require in scope automatically. Do not import or require Playwright — just use page directly in your snippet. Example: await page.goto('https://example.com')

Remote access setup fails authentication

Verify that both PLAYWRITER_HOST and PLAYWRITER_TOKEN are set and match the values configured on the remote machine. The host must be the full tunnel URL including https://, and the token must be identical on both ends.

Frequently Asked Questions about Playwriter

What is Playwriter?

Playwriter is a Model Context Protocol (MCP) server that chrome extension & cli to let agents control your browser. runs playwright snippets in a stateful sandbox. available as cli or mcp It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Playwriter?

Follow the installation instructions on the Playwriter GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Playwriter?

Playwriter works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Playwriter free to use?

Yes, Playwriter is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Browser Automation MCP Servers

Explore all browser automation servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "playwriter": { "command": "npx", "args": ["-y", "playwriter"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Playwriter?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides