WebMCP is a proposed web standard. Native support is currently a Chromium preview behind a flag. For all other browsers, use @mcp-b/webmcp-polyfill or @mcp-b/global.
Browser support matrix
| Browser | Native modelContext | Native modelContextTesting | Declarative API | Polyfill Support |
|---|
| Chrome 146+ (with flag) | Yes | Yes | Yes | N/A |
| Chrome/Edge (default) | No | No | No | Yes |
| Firefox | No | No | No | Yes |
| Safari | No | No | No | Yes |
Chromium requirements
- Version: Chrome 146.0.7672.0 or higher
- Flag:
chrome://flags/#enable-webmcp-testing set to Enabled
- Relaunch: Required after enabling the flag
Enabling the flag
Via chrome://flags
- Open Chrome and navigate to
chrome://flags/#enable-webmcp-testing
- Set the flag to Enabled
- Click Relaunch
Via command line
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--enable-experimental-web-platform-features \
http://localhost:5174
google-chrome --enable-experimental-web-platform-features http://localhost:5174
& "C:\Program Files\Google\Chrome\Application\chrome.exe" `
--enable-experimental-web-platform-features `
http://localhost:5174
Common launch flags
| Flag | Purpose | Use Case |
|---|
--enable-experimental-web-platform-features | Enables all experimental web platform features including WebMCP | Development and testing |
--enable-features=WebModelContext | Enables only the Web Model Context feature | Targeted testing |
--user-data-dir=/tmp/chrome-test | Isolated browser profile | Avoiding conflicts with existing profile |
--disable-extensions | Disables all browser extensions | Debugging polyfill-vs-native issues |
--remote-debugging-port=9222 | Enables DevTools Protocol access | Advanced debugging, @mcp-b/chrome-devtools-mcp |
--headless=new | Headless mode | CI and automation |
Verification
JavaScript console
console.log("modelContext:", !!navigator.modelContext);
console.log("modelContextTesting:", !!navigator.modelContextTesting);
chrome://version
- Navigate to
chrome://version
- Find the Command Line section
- Verify that your launch flags are present
For the deeper Chromium-specific notes we maintain locally, including source paths and test-focused launch setups, see CHROMIUM_FLAGS.md. For practical testing workflows, see Test Native and Polyfill.
Feature detection
Use this pattern to detect the native API and fall back to the runtime:
if (!navigator.modelContext) {
await import("@mcp-b/global");
}
navigator.modelContext.registerTool({
name: 'my-tool',
description: 'Example tool',
inputSchema: { type: 'object', properties: {} },
execute: async () => ({ content: [{ type: 'text', text: 'ok' }] }),
});
For production use, @mcp-b/global handles detection automatically. If a native implementation exists, it leaves the core in place and layers MCP-B features on top. For the architectural reason that works, see Runtime Layering.
Security notes
The --no-sandbox flag disables critical security protections. Use it only in trusted CI environments.
- Native WebMCP features are experimental and may change between Chromium versions.
- Use an isolated user data directory for testing so you do not mix preview state with your regular browsing profile.
--enable-experimental-web-platform-features enables more than WebMCP.
For the current specification status, see Spec Status and Limitations. For the native-preview tutorial path, see Try the Native Chrome Preview.