Skip to content

Integrating WebMCP into WebExtensions #84

Open

Description

@dotproto

Session description

The current draft of the WebMCP specification allows websites to register tools that an agent can discover and invoke.

Extensions are currently one of the main ways that third party developers bring agentic features into web browsers. Such extensions work by scraping the DOM, generating an accessibility tree based on the DOM, capturing screenshots of page content, or driving the page through debugging and automation interfaces. WebMCP is an attractive alternative for these extensions, as it could provide a structured, site-sanctioned alternative.

This session aims to collect requirements from extension developers and browser vendors, and to check those requirements against WebMCP's current design. Questions we plan to work through:

  1. Consuming site tools
    • Should extensions be able to enumerate and invoke a page's tools without injecting a content script?
    • Are any social considerations needed to expose navigator.modelContext to ISOLATED world content scripts?
    • Would a dedicated extension API add sufficient value beyond calling the web API from the page?
  2. Providing tools
    • Should extensions be able to expose their own tools to the browser's agent?
    • Should extensions be able to expose their own tools to websites?
    • How does this relate to the iframe and embedding discussions in WebMCP? Are any design changes necessary to cover both use cases?
  3. Permissions and trust
    • What (if any) permissions should gate an extension’s access to WebMCP tools?
    • Is a new permission warranted?
    • How (if at all) are users informed when an extension invokes a site's tools?
  4. Lifecycle
    • How do event-driven background contexts (service workers, event pages) interact with tool registration, discovery, and long-running invocations?
    • Which events do extensions need when a page's tools change?
  5. Gaps
    • What other use cases should be considered before stabilizing the API design?

This is a community discussion, not a group meeting. We especially want to hear from extension developers building agentic or automation features, WebMCP spec contributors, and browser engineers working on both Web and WebExtensions platforms.

Session goal

A shared list of extension use cases and requirements for WebMCP. For each item, identify whether it should be integrated into the WebMCP specification, WebExtensions specification, or both. Identify owners for any follow-up issues

Additional session chairs (Optional)

@dotproto, @xeenon, @anssiko

Who can attend

Anyone may attend (Default)

Preferred slots

No preference (Default)

Instructions for meeting planners (Optional)

Please avoid conflicts with the WebML CG and WebExtensions CG/WG meetings and the following breakouts:

If a conflict is unavoidable, please prefer overlapping with sessions lower in this list.

The session will not be recorded.

IRC channel (Optional)

#webmcp-webextensions

Agenda for the meeting.

  • 5 min: Introductions, scribe, ground rules
  • 10 min: WebMCP primer (WebMCP spec contributor)
  • 10 min: How extensions integrate with agents today
  • 30 min: Requirements discussion (questions 1–5)
  • 5 min: Summary, owners, follow-up issues

Links to calendar

Meeting materials

Do not edit below this line (For meeting planners only)

Activity

  1. tpac-breakout-bot commented on Oct 11, 2026

    @tpac-breakout-bot
    Collaborator

    Thank you for proposing a session!

    You may update the session description as needed and at any time before the meeting, but please keep in mind that tooling relies on issue formatting: follow the instructions and leave all headings and other formatting intact in particular.

    Bots and W3C TPAC breakouts organizers may update the description at any time, to fix formatting issues or add links and other relevant information. Please do not revert these changes. Feel free to use comments to raise questions.

    Do not expect formal approval; W3C TPAC breakouts organizers endeavor to schedule all proposed sessions that are in scope for a breakout. Actual scheduling should take place shortly before the meeting.

  2. kenchris commented on Oct 20, 2026

    @kenchris

    Thanks for proposing this, we'd like to be part of the session. I work on an extension that already consumes WebMCP tools from pages (Manifest V3, a chat UI, and an agent that doesn't necessarily run inside the browser), so this comes from what we've had to hack around. We would happily drop our own plumbing for a platform API.

    The biggest one is that an extension should be able to list, observe and call a tab's tools without injecting a script into the page. Today document.modelContext isn't visible from the isolated world, so we inject into the page's own world and talk to it over postMessage. That needs a web_accessible_resources entry any page can probe for, and page scripts can interfere with the bridge. I lean towards a dedicated extension API that reads the same registry the browser's own agent uses, so the extension permission decides who gets access and the page-facing object stays as it is. I'd like to hear the arguments for exposing it to isolated-world content scripts instead.

    Around that, the extension needs a few things that aren't there yet. A change notification that reaches it with tab, frame and document identity, because toolchange only fires inside the page and we re-list before every model turn, which can miss a tool that appears as a result of a call. MCP has notifications/tools/list_changed for this. A document identity that can't be forged, so tools from a document that has navigated away can never be used; we drop a tab's tools when its registrable domain changes, but same-site navigations, reloads and history restores are a gray area. A way to know we're talking to the browser's real registry, since a page can define document.modelContext first and all we can do is guess from the object's shape. And an unambiguous origin on each tool, which we currently derive from the tab URL so the model can tell a.com:send from b.com:send.

    Long-running calls are mostly a lifetime problem for us. A call goes from the extension page through the service worker and a content script to the page and back, with a timeout at each step. Clients that follow MCP give up on a quiet call unless progress arrives: we measured Claude Code closing a call at 60 seconds without progress and letting a 200 second one finish when it reported progress every 20 seconds, while another client closed at three minutes even with progress. So we'd want the execution id and the progress events available from the start (webmachinelearning/webmcp#196 in the spec repo), and ideally a call that can be resumed if the service worker was stopped.

    There is also a second use case: extensions that supply tools for a site that has none, because it hasn't adopted WebMCP or it's an internal app. We do this today by injecting into the main world, which means page scripts can see, replace and call those tools. It would be better if an extension could register tools without running code in the page's world, if those tools were marked as coming from the extension and not the site, and if by default only the browser's agent and the extension could see them.

    On permissions, what we actually rely on is "the user attached this tab to the conversation". We hold broad host access only because the injected script has to be everywhere, so a per-tab grant in the spirit of activeTab would be much better. I think the group needs to decide whether the site's own controls (exposedTo, the tools permissions policy) apply to extension callers too. The answer isn't obvious because some extensions are assistive. Same for what a page sees when an extension is the caller (webmachinelearning/webmcp#191 proposes a callerOrigin). I don't have a strong view on the answer, only that it should be a decision and not an accident.

    Two smaller things. "Agent" in the spec shouldn't assume the model runs inside the browser; for consent what matters is the host of the agent, the party that can actually ask the user. And a conversation across several tabs needs more than the single-tab limit in webmachinelearning/webmcp#227 allows. We haven't tested frozen, discarded or bfcached tabs, so that's an open question for us.

    The points that aren't specific to extensions I've put in the spec repo instead: progress and call ids (webmachinelearning/webmcp#196), asking the user from inside a tool (webmachinelearning/webmcp#165), result shape and errors (webmachinelearning/webmcp#41, webmachinelearning/webmcp#282), hints and openWorldHint (webmachinelearning/webmcp#53, webmachinelearning/webmcp#355), how to weigh annotations the page wrote about itself (webmachinelearning/webmcp#353), what toolchange tells an agent (webmachinelearning/webmcp#262), page state as per-turn context (webmachinelearning/webmcp#312), pages sending messages to the assistant (webmachinelearning/webmcp#329) and an extension point on descriptors (webmachinelearning/webmcp#354).

    We're not asking for anything that lets an extension call tools a site didn't register or reach ones it restricted with exposedTo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions