home / mcp / cloudflare playwright mcp server

Cloudflare Playwright MCP Server

Provides browser automation via Playwright over MCP to perform navigation, typing, clicking, and screenshot tasks.

Installation
Add the following to your MCP client configuration file.

Configuration

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

This MCP server enables you to control a browser using a Model Control Protocol interface, powered by Playwright on Cloudflare Workers. You can perform web automation tasks such as navigation, typing, clicking, and taking screenshots through a standardized set of tools, enabling seamless interaction with AI assistants across compatible platforms.

How to use

You interact with the Cloudflare Playwright MCP server through an MCP client. Connect to the server URL provided by your deployment, then call the available tools to navigate pages, type into fields, click elements, and capture screenshots. Use simple, single actions to achieve reliable results, for example: navigate to a page, take a screenshot, or create a form entry.

How to install

Prerequisites you need before installation: Node.js and npm, and access to a Cloudflare Workers deployment workflow.

Install dependencies for the project locally:

npm ci

Additional configuration and usage notes

Deploy the MCP server to Cloudflare Workers to expose the MCP endpoint for clients.

Deploy the server using the provided command:

npx wrangler deploy

Security and best practices

Limit access to your MCP endpoint to trusted clients and consider network controls to prevent unauthorized usage. Regularly rotate any credentials or tokens used by your clients.

Available tools

browser_navigate

Navigate the browser to a specified URL and update the page state so subsequent commands run against the new page.

browser_type

Type text into an input field or editable element, optionally clearing existing content first.

browser_clickt

Click a target element such as a button or checkbox identified by its label, text, or selector.

browser_take_screenshot

Capture a screenshot of the current browser viewport or a targeted element and return the image data.