✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

Cloudflare Playwright MCP

Overview

This project leverages Playwright for automated browser testing and integrates with Cloudflare Workers, Browser Rendering and @cloudflare/playwright for deployment.

Build and Deploy

Follow these steps to set up and deploy the project:

  1. Install dependencies:
npm ci
  1. Deploy to Cloudflare Workers:
npx wrangler deploy

Use with Cloudflare AI Playground

alt text

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:

RoleMessage
UserGo to demo.playwright.dev/todomvc
Assistantruns 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.
UserCreate some todo entry
Assistantruns 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.
UserNice. Now create a todo in parrot style
Assistantruns 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.
UserAnd create another todo in yoda style
Assistantruns 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.
UserTake a screenshot
Assistantruns browser_take_screenshot tool
alt text A screenshot of the current page has been taken. The screenshot is in PNG format and is 56KB in size.
UserNow click the checkbox of the parrot todo entry
Assistantruns 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.
UserTake a screenshot
Assistantruns browser_take_screenshot tool
alt text A screenshot of the current page has been taken. The screenshot is in PNG format and is 58KB in size.
UserRemove completed todo entries
Assistantruns 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.
UserTake a final screenshot
Assistantruns browser_take_screenshot tool
alt text 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:

  1. Open the configuration file for Claude Desktop.
  2. Add the following JSON snippet under the mcpServers section:
{
  "mcpServers": {
    "cloudflare-playwright-mcp": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://[my-mcp-url].workers.dev/sse"
      ]
    }
  }
}
  1. 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:

alt text

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.

Cloudflare Playwright

Project Details

Recomended MCP Servers

DuckDuckGo Search Server
DuckDuckGo Search Server

A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content...

🧩
Chat MCP

A Desktop Chat App that leverages MCP(Model Context Protocol) to interface with other LLMs.

🧩
Modes MCP Server

MCP server for managing Roo's custom operational modes

WordPress Server
WordPress Server

This MCP server let you automate interactions with Wordpress

🧩
SeaTunnel MCP Server

A Model Context Protocol (MCP) server for Apache Seatunnel. This provides access to your Apache Seatunnel RESTful API...

Terraform Cloud Integration
Terraform Cloud Integration

A Model Context Protocol (MCP) server that integrates AI assistants with the Terraform Cloud API, allowing you to...

🧩
MySQL Database Access
🧩
OSP Marketing Tools MCP Server

A Model Context Protocol (MCP) server that empowers LLMs to use some of Open Srategy Partners' core writing...

Cryptocurrency News Server
Cryptocurrency News Server

Provide latest cryptocurrency news to AI agents.

Web Browser
Web Browser

A Minimum Control Program (MCP) server implementation for web browsing capabilities using BeautifulSoup4

🧩
Things3 Integration Server

A Model Context Protocol for reading todos and writing todos and projects in the macOS app Things3 using...

🧩
AutoCAD Integration Server

这个项目是一个基于Model Context Protocol (MCP)的AutoCAD集成服务器,它允许通过自然语言与AutoCAD进行交互。通过这个服务器,用户可以使用Claude等大型语言模型来创建、修改和分析AutoCAD图纸,同时还可以存储和查询CAD元素的相关数据。目前制作参考学习,仅实现端到端之间的通信,具体工具函数尚未晚上

Featured Templates

View More
Verified Icon
AI Agents
AI Chatbot Starter Kit
1297 5924 5.0
AI Characters
Sarcastic AI Chat Bot
128 1377
AI Characters
Your Speaking Avatar
168 654
Customer service
AI-Powered Product List Manager
141 582
AI Assistants
Image to text with Claude 3
150 1070

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.