Browser Run adds WebMCP support
Key Points
- WebMCP support in Browser Run
- Enable with lab=true on devtools/browser
- Use navigator.modelContextTesting.executeTool()
Summary
Cloudflare Browser Run (formerly Browser Rendering) now supports WebMCP (Web Model Context Protocol), a Chrome browser API that lets AI agents discover and call typed website tools (e.g., searchFlights(), bookTicket()) instead of relying on fragile screenshot-and-click automation. This uses Chrome beta features; Cloudflare provides an experimental pool of Chrome beta instances for testing.
Key Points
- Discover site tools with
navigator.modelContextTesting.listTools(). - Execute tools directly with
navigator.modelContextTesting.executeTool()(typed parameters). - Some tools support human-in-the-loop confirmation for sensitive actions.
- Enable WebMCP in Browser Run by adding
lab=trueto the devtools browser request; you can also setkeep_aliveto control session lifetime. Example request:curl -X POST "https://api.cloudflare.com/client/v4/accounts/{account_id}/browser-rendering/devtools/browser?lab=true&keep_alive=300000" -H "Authorization: Bearer {api_token}" - You can attach an MCP client via the Cloudflare CDP endpoint so AI agents can discover and call tools directly.
Practical notes
- WebMCP requires Chrome beta features; use the experimental pool only for testing until the API stabilizes.
- Tune
keep_aliveto manage session duration and resource usage. - See the WebMCP docs and Cloudflare CDP documentation for step-by-step guidance and examples.