WebMCP is a browser-based implementation of the Model Context Protocol (MCP) that lets web applications expose structured tools directly to AI agents, replacing fragile DOM scraping and vision-based automation. Starting in Chrome 149 as an origin trial, it introduces the `navigator.modelContext` API, which allows developers to register named tools with input schemas and execute handlers. AI agents can then discover and invoke these tools reliably. The post covers enabling WebMCP via Chrome flags, registering individual tools with `registerTool`, batching multiple tools with `provideContext`, and unregistering tools when they are no longer needed. Chrome DevTools gains a dedicated WebMCP tab for inspecting registered tools and testing invocations.

7m read timeFrom amitmerchant.com
Post cover image
Table of contents
What is WebMCP?How to Use WebMCP in ChromeRegistering Tools via navigator.modelContextRegistering Multiple Tools or Batching ( provideContext )Unregistering ToolsIn closingFurther Reading
7 Impressions