navigator.modelContext API running in Chrome without any MCP-B runtime involved.
WebMCP is available behind a flag in Chrome 146 and later. This is an experimental preview and the API may change between Chrome versions. For production use, follow the polyfill path in Build Your First Tool.
Prerequisites
- Chrome version 146.0.7672.0 or later
- The ability to install a Chrome extension
What we will use
- the Chrome flag that enables the preview
- the Model Context Tool Inspector
- the pizza-maker demo
Enable the WebMCP flag
- Open Chrome and navigate to
chrome://flags/#enable-webmcp-testing - Set WebMCP for testing to Enabled
- Click Relaunch
Install the Model Context Tool Inspector
- Open the Model Context Tool Inspector in the Chrome Web Store
- Click Add to Chrome
- Pin the extension so you can open it quickly
Open the official demo
- Open the pizza-maker demo
- Wait for the page to finish loading
- Open DevTools and switch to the console
List the demo tools
Run:You should see tool metadata from the demo. On the pizza demo, the list includes tools such as
set_pizza_size, set_pizza_style, toggle_layer, and add_topping.Inspect the same tools in the extension
- Click the Model Context Tool Inspector while the demo tab is active
- Open its panel
- Confirm that the same tool list appears there
navigator.modelContextTesting are now showing the same native tool surface.Execute a tool
Run this in the console:You should see the pizza update in the page, and the console should show the tool result. Now execute the same tool from the extension panel and compare the output.
What you learned
- Chrome 146+ provides a native
navigator.modelContextAPI behind thechrome://flags/#enable-webmcp-testingflag - Chrome also exposes
navigator.modelContextTestingfor inspection and execution during the preview - The Model Context Tool Inspector is the official Chrome-side inspection tool
- The Chrome demos are the best place to see current native behavior without local setup drift
Next steps
- Build Your First Tool to take the polyfill path for browsers people actually use today
- Browser Support and Flags for the current flag and launch details
- What Is WebMCP? for the standard-level picture
