Browser Rendering adds Chrome DevTools Protocol (CDP) and MCP client support
Key Points
- CDP WebSocket endpoint available
- One-line switch for Puppeteer/Playwright
- MCP clients supported via chrome-devtools-mcp
Summary
Browser Rendering now exposes the Chrome DevTools Protocol (CDP), enabling any CDP-compatible client (Puppeteer, Playwright, etc.) and supported MCP tools to connect to Cloudflare's remote browser. Connections use a WebSocket endpoint and your Cloudflare API token, and work from Workers, local machines, or cloud environments.
Key Points
- CDP WebSocket endpoint:
wss://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/browser-rendering/devtools/browser?keep_alive=600000. - Puppeteer/Playwright compatibility: switch with a one-line change, e.g.
puppeteer.connect({ browserWSEndpoint, headers: { Authorization: 'Bearer <API_TOKEN>' } }). - MCP clients (Claude Desktop, Claude Code, Cursor, OpenCode) can use Browser Rendering via the
chrome-devtools-mcppackage and supply the same WebSocket endpoint and headers. - Authentication: include your Cloudflare API token in the
Authorization: Bearer <API_TOKEN>header. - Environments: supported from Cloudflare Workers, local development, and other cloud environments.
How to get started
- Create a Cloudflare API token with appropriate permissions.
- Replace
<ACCOUNT_ID>and<API_TOKEN>in the WebSocket URL and headers. - Connect using your existing CDP client (Puppeteer/Playwright) or configure an MCP client with
chrome-devtools-mcp.
Links
- Refer to Cloudflare's CDP documentation for full connection details and permission requirements.