Status: Active (ongoing tracking) Chrome API: WebMCP available behind flag in Chrome 146+ Last reviewed: 2026-02-14
This matrix separates:
- Public WebMCP surface:
navigator.modelContextbehavior that should match the WebMCP draft/Chrome behavior. - MCPB bridge/extensions: non-standard helpers used to translate WebMCP to MCP. These may differ, but must not break parity between native and polyfill runtimes.
| ID | Area | Current (Polyfill path) | Current (Native path) | Gap Type | Priority | Target |
|---|---|---|---|---|---|---|
| WMC-01 | provideContext() semantics |
Clears only Bucket A and keeps dynamic tools (packages/global/src/global.ts:620, packages/global/src/global.ts:849) |
Delegates to native, but bridge assumes dynamic lifecycle via adapter wrappers (packages/global/src/native-adapter.ts:610) |
Spec mismatch + parity risk | P0 | provideContext() must clear existing context consistently for tool set exposed to WebMCP consumers. |
| WMC-02 | registerTool() return value |
Returns { unregister } (packages/global/src/global.ts:876) |
Adapter returns native result (packages/global/src/native-adapter.ts:630) and consumers rely on handle |
Spec mismatch + future native risk | P0 | Public registerTool() should behave like spec (no handle); internal unregister convenience must move to MCPB-only helper. |
| WMC-03 | Duplicate registration behavior | Rapid duplicate registration may be ignored (packages/global/src/global.ts:804) |
Native passthrough may throw or differ | Spec mismatch + polyfill/native divergence | P0 | Duplicate tool names should deterministically throw in both modes. |
| WMC-04 | inputSchema requiredness |
ToolDescriptor.inputSchema required (packages/global/src/types.ts:465) |
Same type contract through adapter | Type/API mismatch | P1 | inputSchema optional for WebMCP-facing API, default { type: 'object', properties: {} }. |
| WMC-05 | Invalid schema handling | JSON schema conversion falls back permissively instead of hard-failing (packages/global/src/validation.ts:52, packages/global/src/validation.ts:62) |
Depends on native validation | Spec mismatch + parity risk | P0 | Invalid inputSchema must throw during registration in both modes. |
| WMC-06 | Tool execute context shape | Uses ToolExecutionContext.elicitInput(...) (packages/global/src/types.ts:498, packages/global/src/global.ts:1572) |
Same bridge contract | Spec mismatch | P0 | Expose ModelContextClient.requestUserInteraction(callback) contract; keep MCPB helpers internal. |
| WMC-07 | Native detection dependency | Initialization throws if native has modelContext but no modelContextTesting (packages/global/src/global.ts:1910) |
Hard dependency in detection (packages/global/src/native-adapter.ts:60) |
Forward-compat risk | P0 | Support native modelContext without requiring modelContextTesting; use testing API only when present. |
| WMC-08 | React hook cleanup contract | useWebMCP relies on registration.unregister() (packages/react-webmcp/src/useWebMCP.ts:495) |
Same expectation when native path returns handle | Internal coupling to non-spec behavior | P0 | Hook cleanup should use spec-safe unregister strategy (e.g., unregisterTool(name) ownership-safe logic). |
| WMC-09 | Error typing/shape consistency | Mix of Error and custom UnknownError paths |
Native path wraps execution failures into text isError response (packages/global/src/native-adapter.ts:647) |
Parity inconsistency | P1 | Normalize throw/return behavior for invalid name, invalid schema, missing tool, and execution failures across both modes. |
| WMC-10 | Non-spec methods on modelContext |
Includes callTool, resources/prompts, events beyond draft (packages/global/src/types.ts:936) |
Installs shims/stubs on native context (packages/global/src/native-adapter.ts:229) |
Extension boundary blur | P1 | Keep extensions available but isolate from strict WebMCP core behavior and test independently. |
| WMC-11 | Tool annotations shape | Accepts broader MCP annotations (readOnlyHint, idempotentHint, destructiveHint, etc.) |
Same through bridge | Extension (low risk) | P2 | Treat extra annotations as MCPB extension; do not block WebMCP core conformance. |
| WMC-12 | Native/polyfill conformance harness | Tests exist but not unified as one normative matrix suite | Same | Test coverage gap | P0 | Add shared conformance suite executed against both polyfill and native-mock adapters. |
- Define a strict core contract for public
navigator.modelContextmethods:provideContext(optional options = {})clearContext()registerTool(tool)unregisterTool(name)
- Remove/disable rapid duplicate suppression for public registration path.
- Make
inputSchemaoptional at WebMCP boundary and default it. - Enforce schema validation at registration time; throw on invalid schema.
- Implement
ModelContextClient.requestUserInteraction(callback)in tool execution context and migrate tool callback signatures.
- Refactor initialization so native
modelContextcan be used even whenmodelContextTestingis absent. - Make shared tool-registry behavior deterministic across both modes (duplicate handling, unregister semantics, clear behavior).
- Update
useWebMCPregistration lifecycle to not rely on non-spec return handles.
- Keep MCPB conveniences (
callTool, resource/prompt helpers, extra annotations) but treat them as extension surface. - Gate extension behavior behind explicit internal typing/docs so strict core tests stay spec-focused.
- Normalize error taxonomy across modes for developer-facing consistency.
- Add a shared conformance matrix test suite with two runners:
- Runner A: pure polyfill runtime.
- Runner B: native-adapter runtime using native mock.
- Convert current expectation tests that codify non-spec behavior (e.g., dynamic tool persistence across
provideContext) into extension tests. - Add migration notes for consumers impacted by
registerTool/cleanup behavior.
- Same input sequence yields same outcome in native and polyfill modes for WebMCP core methods.
- Public behavior matches the draft API semantics for method signatures and tool registration lifecycle.
- MCPB-specific functionality remains available without contaminating strict core conformance tests.