Cloudflare Playwright MCP
Provides web automation capabilities through Playwright running on Cloudflare's infrastructure, enabling browser control for navigation, interaction, and screenshot capture
Deploys and runs as a Cloudflare Workers application, providing serverless browser automation through Playwright for web scraping and testing tasks
Click on "Deploy 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 go to github.com and take a screenshot of the trending page"
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 Example
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 Cloudflare AI Playground, Claude Desktop, 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 deployUse with Cloudflare AI Playground

Cloudflare playground AI is a great way to test MCP servers using LLM models available in Workers AI.
Navigate to https://playground.ai.cloudflare.com/
Ensure model is set to
llama-3.3-70b-instruct-fp8-fastIn MCP Servers, set URL to
https://[my-mcp-url].workers.dev/sseClick Connect
Status should update to Connected and it should list 14 available tools
You can now start to interact with the model, and it will run necessary tools to accomplish what was requested.
For best results, give simple instructions consisting of one single action, e. g., "Create a new todo entry", "Go to cloudflare site", "Take a screenshot"
Example of a conversation:
Role | Message |
User | Go to demo.playwright.dev/todomvc |
Assistant | runs browser_navigate tool The page has been navigated to https://demo.playwright.dev/todomvc/. The page title is "React • TodoMVC". The page snapshot shows the content of the page, including a heading, a textbox, and several links. |
User | Create some todo entry |
Assistant | runs browser_type tool A new todo entry "Buy groceries" has been created. The page snapshot shows the updated content of the page, including the new todo entry. |
User | Nice. Now create a todo in parrot style |
Assistant | runs browser_type tool A new todo entry "Polly wants a cracker" has been created in parrot style. The page snapshot shows the updated content of the page, including the new todo entry. |
User | And create another todo in yoda style |
Assistant | runs browser_type tool A new todo entry "A walk, I must take" has been created in Yoda style. The page snapshot shows the updated content of the page, including the new todo entry. |
User | Take a screenshot |
Assistant | runs browser_take_screenshot tool |
User | Now click the checkbox of the parrot todo entry |
Assistant | runs browser_clickt tool The checkbox of the parrot todo entry "Polly wants a cracker" has been clicked. The page snapshot shows the updated content of the page, with the checkbox now checked. |
User | Take a screenshot |
Assistant | runs browser_take_screenshot tool |
User | Remove completed todo entries |
Assistant | runs browser_clickt tool The "Clear completed" button has been clicked. The page snapshot shows the updated content of the page, with the completed todo entry "Polly wants a cracker" removed. |
User | Take a final screenshot |
Assistant | runs browser_take_screenshot tool |
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:
{
"mcpServers": {
"cloudflare-playwright-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"https://[my-mcp-url].workers.dev/sse"
]
}
}
}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:

Configure in VSCode
You can install the Playwright MCP server using the VS Code CLI:
# 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"}'After installation, the Playwright MCP server will be available for use with your GitHub Copilot agent in VS Code.
Available Tools
7 toolsexecute-codeA
Execute custom Playwright JS code against the current page
Inputs: code (required).
get-full-domA
Get the full DOM of the current page. (Deprecated, use get-context instead)
Inputs: no named parameters.
get-full-snapshotB
Get a complete snapshot of the page including all visible content (text, images, forms, etc.) for understanding the full context
Inputs: no named parameters.
get-interactive-snapshotB
Get a snapshot focused on interactive elements (buttons, links, inputs) with annotated screenshot for UI automation
Inputs: no named parameters.
get-screenshotB
Get a screenshot of the current page
Inputs: no named parameters.
get-text-snapshotB
Get all text content from the page (headings, paragraphs, lists) for reading and content extraction
Inputs: no named parameters.
init-browserC
Initialize a browser with a URL
Inputs: url (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools have distinct purposes, with clear separation between code execution, DOM/snapshot retrieval, and browser initialization. However, get-full-dom and get-context (implied by deprecation note) could cause confusion, and the various snapshot tools (full, interactive, text) might overlap slightly in content extraction scenarios.
All tool names follow a consistent verb-object pattern with hyphen separation (e.g., execute-code, get-screenshot, init-browser). The naming is predictable and readable throughout the set, with no mixing of conventions.
With 7 tools, this server is well-scoped for Playwright automation, covering core operations like browser setup, code execution, and various snapshot types. Each tool serves a clear purpose without bloat, making it manageable and functional.
The toolset covers essential Playwright workflows: initialization, code execution, and multiple snapshot types for different contexts. A minor gap exists in navigation or page interaction tools (e.g., click, type), but agents can work around this using execute-code for custom actions.
Related MCP Connectors
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
Cloud browser, web extraction, screenshots, and remote CDP tools for AI agents.
Cloud browsers for AI agents: saved logins, residential IPs, live human takeover, 57 browser tools.
Browser agents and stealth cloud browsers for AI: run web tasks, fill forms, extract data.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to control a browser through Playwright automation tools, allowing them to perform web tasks like navigation, typing, clicking, and taking screenshots. Deployed on Cloudflare Workers and compatible with various AI platforms including Claude Desktop and VS Code.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to control a browser through Playwright automation tools deployed on Cloudflare Workers. Supports web automation tasks like navigation, typing, clicking, and taking screenshots through natural language commands.Apache 2.0
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to control a browser through Playwright running on Cloudflare Workers, allowing web automation tasks like navigation, typing, clicking, and taking screenshots through natural language.Apache 2.0
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to control a web browser through tools for navigation, clicking, typing, and capturing screenshots using Cloudflare Workers. It allows models to perform complex web automation tasks and interact with live websites through a set of 14 specialized tools.Apache 2.0
A screenshot of the current page has been taken. The screenshot is in PNG format and is 56KB in size.
A screenshot of the current page has been taken. The screenshot is in PNG format and is 58KB in size.
A final screenshot of the current page has been taken. The screenshot is in PNG format and is 50KB in size.