Playwriter
An MCP and CLI that let an agent control your real Chrome, with its own logins and extensions, through Playwright
High risk
We rate an entry high when the tool writes to external systems, handles money, production databases or secrets, or runs arbitrary commands. The CLI installs it only with your consent.
Why this level
- Gives the agent access to your browser with real logins and sessions on every site
- Can perform arbitrary actions on websites on your behalf
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/playwriterDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
This entry is high risk, so there is no one-click install. Review the code and add the config by hand.
Run in a terminal
claude mcp add --transport stdio playwriter -- npx -y playwriter@latestOr add to the file .mcp.json, in the project
{
"mcpServers": {
"playwriter": {
"command": "npx",
"args": [
"-y",
"playwriter@latest"
]
}
}
}If the file already exists, add the server inside the mcpServers key.
Add to the file ~/.cursor/mcp.json, for all projects
{
"mcpServers": {
"playwriter": {
"command": "npx",
"args": [
"-y",
"playwriter@latest"
]
}
}
}If the file already exists, add the server inside the mcpServers key. For a single project, put the same block into .cursor/mcp.json.
Run in a terminal
code --add-mcp '{"name":"playwriter","type":"stdio","command":"npx","args":["-y","playwriter@latest"]}'Or add to the file .vscode/mcp.json, in the project
{
"servers": {
"playwriter": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"playwriter@latest"
]
}
}
}If the file already exists, add the server inside the servers key.
Run in a terminal
codex mcp add playwriter -- npx -y playwriter@latestOr add to the file ~/.codex/config.toml, for all projects
[mcp_servers.playwriter]
command = "npx"
args = ["-y", "playwriter@latest"]If the file already exists, append the block to the end.
Add to the file ~/.gemini/settings.json, for all projects
{
"mcpServers": {
"playwriter": {
"command": "npx",
"args": [
"-y",
"playwriter@latest"
]
}
}
}If the file already exists, add the server inside the mcpServers key.
Add to the file ~/.config/devin/mcp_config.json, for all projects
{
"mcpServers": {
"playwriter": {
"command": "npx",
"args": [
"-y",
"playwriter@latest"
]
}
}
}If the file already exists, add the server inside the mcpServers key. Legacy Cascade keeps the MCP config in ~/.codeium/windsurf/mcp_config.json.
Formerly Windsurf.
Add to the file cline_mcp_settings.json, for all projects
{
"mcpServers": {
"playwriter": {
"command": "npx",
"args": [
"-y",
"playwriter@latest"
]
}
}
}If the file already exists, add the server inside the mcpServers key. Open the settings file in Cline: MCP Servers tab, Configure MCP Servers.
Add to the file .roo/mcp.json, in the project
{
"mcpServers": {
"playwriter": {
"command": "npx",
"args": [
"-y",
"playwriter@latest"
]
}
}
}If the file already exists, add the server inside the mcpServers key.
A fork of Roo Code, same .roo folders.
Add to the file opencode.json, in the project
{
"mcp": {
"playwriter": {
"type": "local",
"command": [
"npx",
"-y",
"playwriter@latest"
]
}
}
}If the file already exists, add the server inside the mcp key.
Add to the file ~/.config/zed/settings.json, for all projects
{
"context_servers": {
"playwriter": {
"command": "npx",
"args": [
"-y",
"playwriter@latest"
]
}
}
}If the file already exists, add the server inside the context_servers key.
Add to the file .codeassistant/mcp.json, in the project
{
"mcpServers": {
"playwriter": {
"command": "npx",
"args": [
"-y",
"playwriter@latest"
]
}
}
}If the file already exists, add the server inside the mcpServers key.
Install the Playwriter extension from the Chrome Web Store, then the CLI: npm i -g playwriter. For MCP, add to your config: {"mcpServers": {"playwriter": {"command": "npx", "args": ["-y", "playwriter@latest"]}}}, or run npx -y @playwriter/install-mcp playwriter@latest. Install the skill with npx -y skills add https://playwriter.dev.
Other ways from the author
npm i -g playwriterRequires the Playwriter extension installed in Chrome and enabled on the target tab.
This is third-party code. Review the repository files before installing.
What it does
Playwriter connects to your already-running Chrome via an extension instead of spawning a fresh headless browser, so an agent gets your cookies, logins and extensions right away instead of a clean profile that bot detectors flag instantly. The extension is enabled on a specific tab, then the agent runs Playwright snippets through the playwriter -s <id> -e '...' CLI command or the execute MCP tool. Each session is isolated, and tabs can be grouped per agent with named tab groups to keep track of who is working where. There is also a direct Chrome DevTools Protocol mode that skips the extension.
Who it is for. For anyone who needs an agent to work in the browser under your current logins, instead of signing in again in a clean headless profile.
Good fit when
- You need an agent to work on a site where you are already logged in, without re-authenticating
- Automation in a clean headless browser keeps getting blocked by bot detection
- You need several isolated agent browser sessions running in parallel in one Chrome
Not a fit when
- You need a fully isolated clean browser with none of your personal data
- You do not want to install a browser extension or open Chrome's debug port
Example request
Open the supplier's account page in my browser and pull the list of recent ordersLimitations
Needs the extension enabled on the relevant tab, or explicitly enabling direct CDP mode with Chrome's debug port. Screen recording is unavailable in direct mode without the extension.
How to disable. Remove the Playwriter extension from Chrome, remove playwriter from your MCP client config, and run npm uninstall -g playwriter.
MCP
- Transport
- stdio
- Authentication
- not required
| Environment variables | |
|---|---|
| PLAYWRITER_AUTO_ENABLE | Auto-creates a tab on connect, enabled by default |
| PLAYWRITER_DIRECT | Direct connection to Chrome DevTools Protocol without the extension |
Security check
- Gives the agent access to your browser with real logins and sessions on every site
- Can perform arbitrary actions on websites on your behalf
README in short
The README highlights the main difference from other browser MCPs: Playwriter does not spawn a fresh, logged-out Chrome, it connects to your current browser through one extension with the full Playwright API. Install: the extension from the Chrome Web Store, the CLI via npm i -g playwriter, the skill via npx skills add. It documents sessions with isolated state, named tab groups for several parallel agents, and a direct CDP mode with no extension. MIT licensed.
FAQ
How is this better than a regular headless-browser MCP?
Playwriter connects to your already-open Chrome with real logins and extensions, so it needs no re-authentication and is flagged less by bot detection.
Can I skip the extension?
Yes, there is a direct Chrome DevTools Protocol mode via the PLAYWRITER_DIRECT variable, but screen recording is unavailable then.
Related
CLI, skill and Python library for browser control: the agent clicks, fills forms and reads pages over CDP
A skill that gathers the last 30 days of discussion on a topic from Reddit, X, YouTube, HN, Polymarket and GitHub into one brief
The Chrome DevTools team's official MCP server: the agent drives a live Chrome, reads network and console, and records performance traces
A fast Rust CLI for agent browser automation: accessibility snapshots with element refs, an MCP server and skills