WebMCP now works in Kitesurf on Browser Run, unified on document.modelContext
Hi everyone, Shii-chan here! Today's news is about AI agents and browsers, and I'm pretty excited.
Cloudflare ChangelogWhat was announced?
In the Cloudflare Changelog, Browser Run's WebMCP support got an update!
WebMCP lets a page expose the actions it supports as tools that agents can use. Until now it worked in Lab sessions only. Now it works in Kitesurf sessions too.
The story so far
Only Lab sessions supported WebMCP, and they used an experimental API called navigator.modelContextTesting. With this update, that API is no longer exposed in Lab sessions.
What changes
- Kitesurf and Lab both use the same
document.modelContextAPI for page tools - The API follows the WebMCP Community Group draft
One thing to watch: code that relied on navigator.modelContextTesting in Lab sessions will stop working, so you'll need to switch to document.modelContext.
Dive Deep
There are three ways to list and run page tools, depending on who you are:
- Chrome DevTools: use the Application > WebMCP panel in the live view of a Lab session, or in the Kitesurf playground
- AI agents: start Chrome DevTools MCP with the
--category-experimental-webmcpflag to add thelist_webmcp_toolsandexecute_webmcp_tooltools - CDP clients: use the
WebMCPCDP domain
Here is the flag for agents:
--category-experimental-webmcp
Wrap-up
- WebMCP works in Kitesurf sessions as well as Lab sessions
- Both are unified on the
document.modelContextAPI navigator.modelContextTestingis gone from Lab, so migrate- You can work with tools via DevTools, agents, or CDP
This is a great fit for anyone building browser-driving agents on Cloudflare!