|
| 1 | +--- |
| 2 | +title: Browser Rendering adds direct Chrome DevTools Protocol (CDP) access and MCP client support |
| 3 | +description: Connect to Browser Rendering from any environment using the Chrome DevTools Protocol, or use MCP clients like Claude Desktop for AI-powered browser automation. |
| 4 | +products: |
| 5 | + - browser-rendering |
| 6 | +date: 2026-04-09 |
| 7 | +--- |
| 8 | + |
| 9 | +[Browser Rendering](/browser-rendering/) now exposes the [Chrome DevTools Protocol (CDP)](/browser-rendering/cdp/), the low-level protocol that powers browser automation. Exposing CDP directly means the growing ecosystem of agent tools and existing CDP automation scripts can use Browser Rendering. |
| 10 | + |
| 11 | +Any CDP-compatible client, including [Puppeteer](/browser-rendering/cdp/puppeteer/) and [Playwright](/browser-rendering/cdp/playwright/), can connect from any language and any environment. If you are already using Browser Rendering with [Cloudflare Workers](/workers/), nothing changes. If you are not, you no longer need to start. |
| 12 | + |
| 13 | +For any existing scripts running on self-hosted Chrome, you can switch to running on Browser Rendering with a one-line change: |
| 14 | + |
| 15 | +```js |
| 16 | +const puppeteer = require("puppeteer-core"); |
| 17 | + |
| 18 | +const browser = await puppeteer.connect({ |
| 19 | + browserWSEndpoint: |
| 20 | + `wss://api.cloudflare.com/client/v4/accounts/${ACCOUNT_ID}/browser-rendering/devtools/browser?keep_alive=600000`, |
| 21 | + headers: { Authorization: `Bearer ${API_TOKEN}` }, |
| 22 | +}); |
| 23 | + |
| 24 | +const page = await browser.newPage(); |
| 25 | +await page.goto("https://example.com"); |
| 26 | +console.log(await page.title()); |
| 27 | +await browser.close(); |
| 28 | +``` |
| 29 | + |
| 30 | +Additionally, MCP clients like Claude Desktop, Cursor, and OpenCode can now use Browser Rendering as their remote browser via the [chrome-devtools-mcp](https://github.com/ChromeDevTools/chrome-devtools-mcp) package. |
| 31 | + |
| 32 | +Here is an example of how to configure Browser Rendering for Claude Desktop: |
| 33 | + |
| 34 | +```json |
| 35 | +{ |
| 36 | + "mcpServers": { |
| 37 | + "browser-rendering": { |
| 38 | + "command": "npx", |
| 39 | + "args": [ |
| 40 | + "-y", |
| 41 | + "chrome-devtools-mcp@latest", |
| 42 | + "--wsEndpoint=wss://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/browser-rendering/devtools/browser?keep_alive=600000", |
| 43 | + "--wsHeaders={\"Authorization\":\"Bearer <API_TOKEN>\"}" |
| 44 | + ] |
| 45 | + } |
| 46 | + } |
| 47 | +} |
| 48 | +``` |
| 49 | + |
| 50 | +To get started, refer to the [CDP documentation](/browser-rendering/cdp/). |
0 commit comments