home / mcp / playwriter mcp server
Provides browser automation through a Chrome extension, enabling Playwright control of connected tabs via a local relay.
Configuration
View docs{
"mcpServers": {
"remorses-playwriter": {
"command": "npx",
"args": [
"playwriter@latest"
]
}
}
}Playwriter MCP Server lets your AI agent control your existing Chrome browser session via a lightweight extension. By connecting through a local relay, you can run Playwright commands against tabs you explicitly enable, keeping your workflow fast and secure while reusing extensions you already rely on.
To use the server, you first install and enable the extension on at least one tab, then connect your MCP client to the local relay. Once connected, your AI agent can execute Playwright code against controlled tabs, switch contexts, create new tabs, and run Playwright workflows directly in your browser.
Prerequisites you need before starting:
- Node.js installed on your machine
- An MCP client that can load and use an MCP server configuration
{
"mcpServers": {
"playwriter": {
"command": "npx",
"args": [
"playwriter@latest"
]
}
}
}1) Pin the Playwriter extension to your Chrome toolbar so you can control which tabs are linked to the MCP server. 2) In a tab you want to automate, click the extension icon to connect. The icon will turn green when connected.
Security and architecture features ensure that only explicitly connected tabs are controllable and that the local WebSocket relay operates strictly on localhost. The extension requires your explicit consent to automate a tab, and you retain control over when automation is active.
Sends Playwright code snippets to the MCP to perform actions in the controlled browser context.
Starts the local CDP relay server that exposes the Playwright API over a WebSocket for the MCP client to connect to.
Retrieves the CDP URL for the connected browser context so you can attach your Playwright client.