Cloudflare Playwright Worker
FreeNot checkedEnables AI assistants to control a browser for web automation tasks like navigation, typing, clicking, and taking screenshots, with optional API key authenticat
About
Enables AI assistants to control a browser for web automation tasks like navigation, typing, clicking, and taking screenshots, with optional API key authentication.
README
Cloudflare Playwright MCP Worker
Forked from cloudflare/playwright-mcp with added API Key authentication support via
X-API-Keyheader.
Overview
This project demonstrates how to use Playwright with Cloudflare Workers as a Model Control Protocol (MCP) server using Cloudflare Playwright MCP.
It enables AI assistants to control a browser through a set of tools, allowing them to perform web automation tasks like navigation, typing, clicking, and taking screenshots.
The server can be used with various AI platforms including Claude Desktop, Claude Code, and GitHub Copilot in VS Code.
Deploy
Follow these steps to set up and deploy the project:
- Install dependencies:
npm ci
- Deploy to Cloudflare Workers:
npx wrangler deploy
Authentication (Optional)
You can protect your MCP server with an API key. Set the API_KEY secret using Wrangler:
npx wrangler secret put API_KEY
When API_KEY is set, all requests must include the X-API-Key header with the matching key. If API_KEY is not set, the server is open to all requests.
Endpoints
This server exposes two transport types:
| Endpoint | Transport | Description |
|---|---|---|
/sse |
Server-Sent Events (SSE) | Legacy streaming transport |
/mcp |
HTTP Streamable | Recommended modern transport |
Use with Claude Desktop
As of now, Claude Desktop only supports local MCP servers. To use playground-mcp with Claude Desktop we make use of mcp-remote, a tool that proxies remote MCP servers and exposes them locally. Use the following configuration:
- Open the configuration file for Claude Desktop.
- Add the following JSON snippet under the
mcpServerssection:
Using SSE transport:
{
"mcpServers": {
"cloudflare-playwright-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://[my-mcp-url].workers.dev/sse"
]
}
}
}
Using HTTP Streamable transport:
{
"mcpServers": {
"cloudflare-playwright-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://[my-mcp-url].workers.dev/mcp"
]
}
}
}
With API Key authentication, add the --header flag:
{
"mcpServers": {
"cloudflare-playwright-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://[my-mcp-url].workers.dev/mcp",
"--header",
"X-API-Key:${API_KEY}"
],
"env": {
"API_KEY": "<your-api-key>"
}
}
}
}
- Save the configuration file and restart Claude Desktop to apply the changes.
This setup ensures that Claude Desktop can communicate with the Cloudflare Playwright MCP server.
Here's an example of a session opening the TODO demo app, adding "buy lemons" and doing a screenshot, taking advantage of playwright-mcp tools and Browser Rendering:

Use with Claude Code
Add the MCP server using the claude CLI:
claude mcp add --scope user --transport http cloudflare-playwright https://[my-mcp-url].workers.dev/mcp
With API Key authentication:
claude mcp add --scope user --header "X-API-Key: ${API_KEY}" --transport http cloudflare-playwright https://[my-mcp-url].workers.dev/mcp
Configure in VSCode
You can install the Playwright MCP server using the VS Code CLI:
Using SSE transport:
# For VS Code
code --add-mcp '{"name":"cloudflare-playwright","type":"sse","url":"https://[my-mcp-url].workers.dev/sse"}'
# For VS Code Insiders
code-insiders --add-mcp '{"name":"cloudflare-playwright","type":"sse","url":"https://[my-mcp-url].workers.dev/sse"}'
Using HTTP Streamable transport:
# For VS Code
code --add-mcp '{"name":"cloudflare-playwright","type":"http","url":"https://[my-mcp-url].workers.dev/mcp"}'
# For VS Code Insiders
code-insiders --add-mcp '{"name":"cloudflare-playwright","type":"http","url":"https://[my-mcp-url].workers.dev/mcp"}'
With API Key authentication, add the header to your .vscode/mcp.json or user settings:
{
"servers": {
"cloudflare-playwright": {
"type": "http",
"url": "https://[my-mcp-url].workers.dev/mcp",
"headers": {
"X-API-Key": "<your-api-key>"
}
}
}
}
After installation, the Playwright MCP server will be available for use with your GitHub Copilot agent in VS Code.
Installing Cloudflare Playwright Worker
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/chenwei791129/playwright-mcp-workerFAQ
Is Cloudflare Playwright Worker MCP free?
Yes, Cloudflare Playwright Worker MCP is free — one-click install via Unyly at no cost.
Does Cloudflare Playwright Worker need an API key?
No, Cloudflare Playwright Worker runs without API keys or environment variables.
Is Cloudflare Playwright Worker hosted or self-hosted?
A hosted option is available: Unyly runs the server in the cloud, no local setup required.
How do I install Cloudflare Playwright Worker in Claude Desktop, Claude Code or Cursor?
Open Cloudflare Playwright Worker on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Playwright
Browser automation, scraping, screenshots
by MicrosoftPuppeteer
Browser automation and web scraping.
by modelcontextprotocolopentabs-dev/opentabs
Plugin-based MCP server + Chrome extension that gives AI agents access to web applications through the user's authenticated browser session. 100+ plugins with a
by opentabs-devrobhunter/agentdeals
1,500+ developer infrastructure deals, free tiers, and startup programs across 54 categories. Search deals, compare vendors, plan stacks, and track pricing chan
by robhunterCompare Cloudflare Playwright Worker with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All browse MCPs
