home / mcp / cloudflare playwright mcp server
Provides a Playwright-based MCP server to automate browser actions via HTTP and STDIO interfaces.
Configuration
View docs{
"mcpServers": {
"dependify-playwright-mcp2": {
"url": "https://[my-mcp-url].workers.dev/sse"
}
}
}You can run a Cloudflare-based Playwright MCP server to control a browser for web automation tasks from an AI agent. It lets you navigate pages, type, click, and take screenshots through a structured set of tools, enabling your AI workflows to perform browser actions safely and reproducibly.
Connect your MCP client to the Cloudflare Playwright MCP server to start issuing browser commands. You will access the server via a public URL or locally, then invoke tools to navigate, type, click, or capture screenshots. Start with simple tasks and progressively combine actions to achieve more complex flows.
Prerequisites you need before installing: Node.js (recommended LTS) and npm. You may also need an environment capable of deploying to Cloudflare Workers if you plan to host the MCP server there. Install dependencies and deploy the server as shown.
Install dependencies for the project and prepare the deployment environment:
npm ciDeploy to Cloudflare Workers when you are ready to run the MCP server in the cloud:
npx wrangler deployConfiguration highlights and practical usage notes follow. You can run the MCP server in HTTP mode (remote URL) or in local STDIO mode (via a command such as npx). Use the remote URL in your MCP client configuration whenever you have a public endpoint that serves the SSE stream.
If you need to proxy the server locally for clients that only support local endpoints, you can run a local proxy setup that exposes the remote SSE URL to your environment. In this guide, examples show both HTTP and STDIO configurations to cover typical deployment scenarios.
Tool usage tips: give simple, single-action prompts to the model for predictable results. For example, ask it to navigate to a page, take a screenshot, or fill a form, one step at a time.
Navigate the active browser to a specified URL, enabling subsequent actions to be performed on the loaded page.
Type text into the focused input element or contenteditable region, including support for typing with normal speed or simulated keystrokes.
Click a target element identified by its text, selector, or bounding box, enabling form submissions and UI interactions.
Capture an image of the current browser viewport, returning a PNG snapshot for verification or sharing.