home / mcp / cloudflare playwright mcp server

Cloudflare Playwright MCP Server

Runs Playwright controls in Cloudflare Workers to automate browser tasks via MCP clients.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "berniecpa-playwright-mcp-example": {
      "url": "https://[my-mcp-url].workers.dev/sse"
    }
  }
}

You can control a browser via an MCP server that runs Playwright in Cloudflare Workers. This setup lets AI assistants perform web automation tasks such as navigating pages, typing, clicking elements, and taking screenshots, using familiar MCP clients and tooling.

How to use

To use this MCP server, connect an MCP client to the remote URL and start issuing browser actions through the provided tools. Typical workflows include navigating to a page, filling forms, clicking buttons, and capturing screenshots for verification. For best results, give concise instructions that perform one action at a time (for example, navigate to a page, then take a screenshot after a page loads). When you issue multiple steps, the system will execute the corresponding browser actions in sequence.

How to install

Prerequisites you need on your machine:

  • Node.js and npm should be installed on your system
  • Wrangler should be available to deploy to Cloudflare Workers (via npm)

Install dependencies for the MCP project and prepare it for deployment:

npm ci

Deploy the MCP server to Cloudflare Workers after dependencies are installed:

npx wrangler deploy

Available tools

browser_navigate

Navigate the browser to a specified URL or path.

browser_type

Type text into the currently focused element on the page.

browser_clickt

Click a target element identified by locator or text to interact with the page.

browser_take_screenshot

Capture a screenshot of the current browser page and return it as an image file.