Agents

Cloudflare Adds One-Click WebMCP Support for AI Agents

Cloudflare has introduced a developer preview that lets websites instantly enable WebMCP support, allowing AI agents to interact with pages through structured tools rather than fragile scraping.

InfoQ AI19 hrs agoAgents
Image: InfoQ AI

Cloudflare has introduced a new developer preview that allows website administrators to activate a Web Model Context Protocol (WebMCP) interface with a single toggle in their dashboard. Located under the Agent Readiness and Labs section of the Cloudflare Dashboard, this feature enables browser-based AI agents to interact directly with web pages using structured, machine-readable tools. Instead of relying on fragile HTML scraping or simulated button clicks, AI agents can execute precise functions, keeping user traffic and control on the host website.

The integration relies on Cloudflare's HTMLRewriter to inject a bridge.js module into served web pages. This script runs on the same origin and reads the selected tool packs from a data-packs attribute. The bridge then registers these tools using the document.modelContext API. In this preview, Cloudflare offers two initial tool packs: Content Credentials, which lets AI agents read C2PA content-provenance metadata from images, and Site MCP server, which proxies existing server-side Model Context Protocol tools directly to the browser-based agent.

When using the Site MCP server pack, the bridge discovers existing server-side tools through the standard MCP Tool type. It registers a WebMCP proxy that uses an execute method to call back to the origin server, returning a standard CallToolResult. This setup bypasses the need for manual API registration or HTML form annotation. However, because both WebMCP and this integration are in early development, client-side compatibility is currently limited to Chrome 145 and newer versions.

For web developers and system architects, this development simplifies the process of making websites agent-friendly. Instead of rewriting frontend code or constantly updating selectors to prevent scraping bots from breaking, developers can deploy pre-defined tool packs that do not require redeploying the core website. As Cloudflare expands its library of tool packs, websites can seamlessly adopt new agent capabilities at the edge, making automated interactions faster, cheaper, and more reliable.

This is our own summary of reporting by InfoQ AI

More in Agents