Cloudflare Playwright MCP Worker
Enables GitHub Copilot to perform web automation tasks such as navigation, typing, clicking, and taking screenshots through a browser.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cloudflare Playwright MCP WorkerOpen https://example.com and take a screenshot"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 ciDeploy to Cloudflare Workers:
npx wrangler deployAuthentication (Optional)
You can protect your MCP server with an API key. Set the API_KEY secret using Wrangler:
npx wrangler secret put API_KEYWhen 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 |
| Server-Sent Events (SSE) | Legacy streaming transport |
| 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/mcpWith API Key authentication:
claude mcp add --scope user --header "X-API-Key: ${API_KEY}" --transport http cloudflare-playwright https://[my-mcp-url].workers.dev/mcpConfigure 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.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/chenwei791129/playwright-mcp-worker'
If you have feedback or need assistance with the MCP directory API, please join our Discord server