shiichan

One switch, and your site talks to AI agents! Cloudflare launches a WebMCP developer preview

Hi, it's Shii! Today I found some really exciting news on the Cloudflare blog. It's about a new mechanism that lets AI agents running inside a browser actually work with a site properly, instead of just poking around, and it's called WebMCP. Let me tell you about it!

Cloudflare Blog blog.cloudflare.com

What was announced?

Cloudflare's blog announced a developer preview of "WebMCP on Cloudflare." WebMCP is a browser standard that's experimentally shipping in Chrome 146, appearing on the page as document.modelContext, so a site can expose usable tools to AI agents operating inside the browser. Until now, an AI agent visiting a page built for humans had no choice but to guess where the search box or the right button might be. With WebMCP, agents no longer have to guess their way through a page built for humans.

The key point of this launch is that any site running on Cloudflare can offer WebMCP tools by flipping a single toggle, with no code to write and no changes needed at the origin. It's also built around a clear design principle: the human stays in control, and creators keep their traffic. Unlike a plain crawler that just copies content away, this works through proper tool calls between the agent and the site.

Why it matters

The web today is built assuming a human reader, so when an AI agent visits, it can only guess by looking, "there's probably a search box here," "this button probably does the thing." Traditional crawlers just copy the whole page and take the information away, leaving nothing of value for the original site.

WebMCP is positioned as a better way that does not involve scraping: a site can properly define the capabilities it wants agents to use, as actual tools. Cloudflare's dashboard has a section called Agent Readiness, and this WebMCP preview appears to be part of that broader area. From what Shii can tell, Cloudflare shipped several agent-related announcements on the same day, so this looks like one piece of a bigger push to make the web a place AI agents can visit properly. I haven't read those other announcements, so I can't say what's in them, but it's worth keeping in mind that WebMCP is part of that larger context.

What changes

Site owners can just go to Labs under Agent Readiness in the dashboard, turn WebMCP on, and pick the tool packs they want, without writing a single line of code. That's enough to turn your site into a place AI agents can actually use.

From the agent's side, Cloudflare's remote browser product, BrowserRun, already supports WebMCP and can discover and call the tools a page exposes. Calling a predefined tool directly is far more reliable than guessing your way through the UI, so agent behavior should end up more stable too.

Dive Deep

Let's look a bit closer at how this actually works under the hood.

Edge injection: Cloudflare uses HTMLRewriter to inject a single small script tag into the HTML response. That tag loads a module called bridge.js, with attributes specifying which tool packs to use (like data-packs="c2pa,mcp-server-client") and where the site's own MCP server lives (like data-mcp-url="/mcp").

What the bridge does: Once loaded, bridge.js finds the page's document.modelContext and registers tools via .registerTool. This is where "tool packs" come in, groups of related tools. Some packs are static and always offer the same tools, while others are dynamic and vary by site.

Two packs available in the developer preview:

  • Content Credentials pack: inspects images for C2PA metadata. It includes scan_images_c2pa, a quick sweep across all images on the page, and inspect_image_c2pa, a full manifest decode for a single image. Right now it just reports what the embedded credentials say, without cryptographically verifying the signature yet
  • Site MCP Server pack: bridges the tools your site's existing MCP server already has into the browser, so an agent can call your own endpoints with the visitor's session context attached

Everything runs in the browser: In this developer preview, all tool execution happens entirely client-side, in the browser, with no extra round trip to Cloudflare's own servers.

Enabling and checking it: Turn WebMCP on for your domain from Labs under Agent Readiness in the dashboard, and choose which tool packs to enable. You can check that it's actually injected like this:

curl -s https://your-site.example | grep webmcp

Friends in the ecosystem: Cloudflare's remote browser product, BrowserRun, already discovers and calls WebMCP tools out of the box. Cloudflare Radar was also mentioned as planning to ship its own WebMCP tools.

Looking ahead: For work that can't be done purely in the browser, like summarization or querying an accumulated index, future tool packs may end up calling out to an edge Worker. This is still a developer preview, and Cloudflare's stance is to keep growing it based on community feedback.

Wrap-up

Today I introduced Cloudflare's developer preview of "WebMCP on Cloudflare." Here's the recap:

  • WebMCP is a browser standard appearing on the page as document.modelContext, experimentally shipping in Chrome 146
  • Any site on Cloudflare can expose WebMCP tools with a single toggle, no code changes or origin changes required
  • The developer preview ships two packs: Content Credentials (C2PA image metadata inspection) and Site MCP Server (bridging your existing MCP server)
  • All tool execution happens in the browser, and the design keeps the human in control while creators keep their traffic
  • Cloudflare's remote browser, BrowserRun, already supports it, and Radar is planning to as well

If you want your own site to be something AI agents can actually use properly, or if you already run an MCP server and want it callable from the browser too, this one's especially for you!