Cloudflare Playwright
Control a browser for web automation tasks like navigation, typing, clicking, and taking screenshots using Playwright on Cloudflare Workers.
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 ci
- Deploy to Cloudflare Workers:
npx wrangler deploy
Use 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-fast - In MCP Servers, set URL to
https://[my-mcp-url].workers.dev/sse - Click 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.
[!TIP] 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 A screenshot of the current page has been taken. The screenshot is in PNG format and is 56KB in size. |
| 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 A screenshot of the current page has been taken. The screenshot is in PNG format and is 58KB in size. |
| 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 A final screenshot of the current page has been taken. The screenshot is in PNG format and is 50KB in size. |
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.
เซิร์ฟเวอร์ที่เกี่ยวข้อง
Bright Data
ผู้สนับสนุนDiscover, extract, and interact with the web - one interface powering automated access across the public internet.
ScreenshotOne
Render website screenshots with ScreenshotOne
Web Scraper Service
A Python-based MCP server for headless web scraping. It extracts the main text content from web pages and outputs it as Markdown, text, or HTML.
YouTube Transcript
Fetches transcripts for YouTube videos.
Website to Markdown MCP Server
Fetches and converts website content to Markdown with AI-powered cleanup, OpenAPI support, and stealth browsing.
Web Fetch
Fetches and converts web content, ideal for data extraction and web scraping.
Oxylabs AI Studio
AI tools for web scraping, crawling, browser control, and web search via the Oxylabs AI Studio API.
GitPrism
GitPrism is a fast, token-efficient, stateless pipeline that converts public GitHub repositories into LLM-ready Markdown.
ScrapeGraph AI
AI-powered web scraping using the ScrapeGraph AI API. Requires an API key.
Web Fetch
Fetches and transforms web content, including JavaScript-rendered pages and media files, into various formats.
MCP Chrome Integration
Control the Chrome browser for web automation using an AI model. Requires the MCP Chrome extension.
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.