playwriter
Chrome extension to let agents control your browser. Runs Playwright snippets in a stateful sandbox. Available as CLI or MCP
claude mcp add --transport stdio remorses-playwriter npx -y playwriter \ --env PLAYWRITER_CONFIG="Optional path to MCP configuration file or environment-based config"
How to use
Playwriter is a browser automation MCP server that connects your agents to your already-running Chrome instance via a Playwright-based API. Instead of spawning a fresh browser with separate login state and extensions, Playwriter attaches to the Chrome instance you already have, allowing agents to operate within your real session and existing extensions. This enables more realistic automation scenarios, with preserved logins, cookies, and extensions, while still exposing the full Playwright API for scripting, debugging, and complex interactions. Tools include full page navigation, element interaction, network interception, CDP access, and advanced debugging capabilities via the Playwright framework.
To use it in MCP, install the Playwriter CLI (via npm) and configure the MCP server to point clients to the Playwriter executable. Agents can execute Playwright commands through the provided tool interface, run scripts, inspect page state, capture screenshots, intercept network requests, and debug with breakpoints. The MCP setup docs and examples illustrate common workflows such as navigating to pages, extracting data, simulating user behavior, and live-editing scripts against the running browser session.
How to install
Prerequisites:
- Node.js and npm installed on the host machine
- A running Chrome session you want Playwriter to attach to (with the Playwriter extension installed and connected)
Installation steps:
-
Install the Playwriter CLI globally: npm i -g playwriter
-
Verify installation: playwriter --help
-
(Optional) Install the MCP server configuration and set the mcp_config to point to the Playwriter tool as described in MCP.md for direct configuration.
-
Start using Playwriter via MCP by launching the configured server entry (e.g., via the npx-based command in this configuration) and connect MCP clients to perform browser automation tasks.
Additional notes
Tips and notes:
- Use the Playwriter CLI for session management and executing automation scripts. Sessions can be isolated per task while sharing the same Chrome instance across agents.
- Remember to install the Playwriter extension in Chrome and ensure it is connected before running scripts.
- For MCP integration, the recommended command is to invoke npx -y playwriter, which downloads and runs the package on demand.
- When writing -e scripts, prefer single quotes to prevent shell interpretation of characters like $, `, and .
- You can leverage Playwright’s full API via Playwriter, including raw CDP access and advanced debugging features like breakpoints and live code editing.
- If you encounter connectivity issues, reset the Playwriter session or reconnect the extension to re-establish the browser context.
Related MCP Servers
web-eval-agent
An MCP server that autonomously evaluates web applications.
douyin
提取抖音无水印视频链接,视频文案,douyin-mcp-server,mcp,claude skill
mcp-memory
🔥🖥️ MCP Memory is a MCP Server that gives MCP Clients (Cursor, Claude, Windsurf and more) the ability to remember information about users (preferences, behaviors) across conversations.
VibeShift
[MCP Server] The Security Agent for AI assisted coding
mcp -echart
基于 mcp-go 框架构建的 mcp 服务,它提供了一个能动态生成 ECharts 图表页面的工具。
mcp-aoai-web-browsing
A minimal Model Context Protocol 🖥️ server/client🧑💻with Azure OpenAI and 🌐 web browser control via Playwright.