Skip to content

v1.1.0

Latest

Choose a tag to compare

@kashishhora kashishhora released this 03 Sep 22:03
· 5 commits to main since this release
82e6fef

Tracks Chrome 152–154 WebMCP changes: execution AbortSignals, the
document.modelContext consumer API, and the removal of
navigator.modelContextTesting from native Chrome.

Added

  • Handlers receive an execution AbortSignal. Handlers are now called as
    handler(args, { signal }); on Chrome 153.0.8007.0+ the signal aborts when the agent or
    user cancels the call — pass it to fetch() and other cancellable work. On Chrome ≤152
    (and for bare execute(args) calls) the library substitutes a never-aborting signal, so
    the second argument is always safe to use. The hook's execute(input?, { signal }?)
    accepts a caller signal too. Existing one-argument handlers keep working unchanged.
  • Polyfill consumer API. document.modelContext.getTools() and
    executeTool(tool, inputArguments, { signal }?), matching native Chrome:
    RegisteredTool.inputSchema is a deep-copied object (Chrome 154.0.8014.0+ shape),
    inputArguments may be a JSON string or an object, execution failures reject with
    UnknownError, aborts reject with the signal's reason, and unregistering a tool no
    longer cancels in-flight executions (Chrome 153.0.8008.0+ behavior). The polyfill
    additionally validates input against inputSchema (OperationError) — native Chrome
    does not validate yet.
  • New exported types: ToolExecuteCallbackOptions, ExecuteToolOptions,
    RegisteredTool, ModelContextGetToolOptions.

Changed

  • Abort is cancellation, not error. When an execution's signal aborts and the handler
    rejects, the hook clears isExecuting but leaves state.error untouched and does not
    fire onError.
  • The testing shim's abort rejections now use the signal's abort reason and its tool
    failures reject with UnknownError (Chrome 152+ parity); its OperationError input
    errors and NotFoundError are unchanged.

Deprecated

  • navigator.modelContextTesting. Native Chrome removed it in 152.0.7940.0. The
    polyfill's shim now delegates to the same engine as document.modelContext.executeTool()
    and warns once in dev. It will be removed in webmcp-react 2.0.0.

Extension

  • The bridge extension now discovers and executes tools via
    document.modelContext.getTools() / executeTool() (native Chrome 150.0.7861.0+ and the
    webmcp-react 1.1.0 polyfill), falling back to the deprecated
    navigator.modelContextTesting for pages on webmcp-react ≤1.0.0. Native Chrome removed
    modelContextTesting in 152.0.7940.0, which had left the extension unable to see tools
    on native Chrome.
  • MCP client cancellations (notifications/cancelled) are forwarded end-to-end: MCP SDK →
    WebSocket CANCEL_TOOL → background → content scripts → executeTool's AbortSignal,
    aborting the tool handler's execution signal.
  • Ships as webmcp-server 0.2.0 (the bin is regenerated) and bridge extension 0.2.0.