Cloudflare introduced a developer preview that lets any website enable a WebMCP (Internet Mannequin Context Protocol) interface with a single dashboard change. This permits browser-based AI brokers to work together with unmodified internet pages via structured instruments as an alternative of scraping or guessing, maintaining human visitors and management on the unique website.
The core thought behind WebMCP is exposing structured, machine-readable instruments on to AI brokers via a normal protocol. This permits them to name specific capabilities like searchFlights or bookTicket with out resorting to scraping and parsing HTML, which consumes tokens, or clicking UI buttons to set off conduct. WebMCP makes interactions quicker, extra environment friendly, and much much less fragile than conventional browser automation, which regularly breaks when the UI modifications.
To undertake WebMCP, an internet site should expose its performance as instruments utilizing both the document.modelContext API, which permits builders to register instruments, outline their schemas, and write the code that implements them, or a declarative JavaScript API that enables so as to add annotations to a normal HTML varieties to create a WebMCP device.
What CloudFlare’s present preview is aiming at is giving any website on Cloudflare the likelihood to help WebMCP with a single change by deciding on device packs from a pre-defined library. CloudFlare is at present together with two device packs on this preview: Content material Credentials to permit brokers to learn C2PA content-provenance metadata from photographs on the web page, and Website MCP server, which might proxy a website’s MCP server instruments to the in-browser agent. CloudFlare says the device pack library will develop and that when new packs change into out there, a website can allow them with out redeploying.
CloudFlare’s implementation is constructed round a bridge.js module, which is silently injected right into a served webpage utilizing HTMLRewriter:
The module reference lists the tool packs adopted by the page in the data-packs attribute along with any additional parameter required (e.g., data-mcp-url for the Site MCP server tool pack).
From there, the bridge composes the packs named inExisting MCP tools running on the server are discovered through the standard MCPdata-packsinto one tool list and registers each with.registerTool. A pack is just a set of MCP tool descriptors and their handlers. Static packs, such as Content Credentials, declare their tools up front. A dynamic pack, such as the Site MCP Server pack, discovers its tools at boot before registering anything.
Tool type, so for each of them the bridge registers a WebMCP proxy whose execute() method calls the site back on the same origin. Likewise, the bridge pass through a standard CallToolResult to handle the execution result.
CloudFlare WebMCP preview is highly work in progress. The WebMCP standard is itself a preview and only supported in Chrome 145+. You can enable WebMCP by going to Agent Readiness > Labs in the Cloudflare Dashboard, toggle on WebMCP for your domain, and select the desired tool packs.
Source link