document.modelContext API running in Chrome without any MCP-B runtime involved.
WebMCP is an experimental browser preview. The flag name and API can change between Chrome
releases. For production use, follow the polyfill path in Build Your First
Tool.
Prerequisites
- A current Chrome channel that exposes the WebMCP testing flag
- 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
1
Enable the WebMCP flag
- Open Chrome and navigate to
chrome://flags/#enable-webmcp-testing - Set WebMCP for testing to Enabled
- Click Relaunch
2
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
3
Open the official demo
- Open the pizza-maker demo
- Wait for the page to finish loading
- Open DevTools and switch to the console
4
Verify the native APIs are available
Run:You should see:
5
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.6
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.7
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.
8
Confirm that no MCP-B runtime is involved
Run:On this Chrome-team demo, there is no
@mcp-b/global or @mcp-b/webmcp-polyfill involved. You are looking at the browser preview itself.What you learned
- Chrome preview builds can expose
document.modelContextbehind 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
- Test Native and Polyfill Runtimes for repeatable browser test setup
- What Is WebMCP? for the standard-level picture
