Exposing webmcp tools outside of webMcp chrome extension

106 views
Skip to first unread message

Yasir Affan

unread,
May 8, 2026, 1:50:28 PMMay 8
to Chrome Built-in AI Early Preview Program Discussions
Hello,

I have been experimenting converting couple of UI components to mcp tools and was able to control the state of the components using webMCP chrome extension.

I was wondering if there is a way to expose these tools outside of webMCP chrome extension? Our application has a chatbot, I want to basically pass the webmcp tools available on a page to chatbot backend, so that chatbot backend can execute the tool if llm decides the tool is relevant to the user's question.

Pleas let me know if it is possible and wanted to know if there is a timeline for the webmcp feature to go GA as it is currently behind chrome flag.

Thanks,
Yasir

埃隆.羅斯柴爾德馬克思

unread,
May 9, 2026, 12:16:41 AMMay 9
to Yasir Affan, Chrome Built-in AI Early Preview Program Discussions
Okay, no problem! I will carefully consider Ms. Arthur's question and deal with it seriously. I believe I can give you an answer soon. If you have any questions, feel free to ask me, and I will definitely answer them for you!

--
You received this message because you are subscribed to the Google Groups "Chrome Built-in AI Early Preview Program Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chrome-ai-dev-previe...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chrome-ai-dev-preview-discuss/e7943cbf-24e1-43f9-a9ec-f0f1d6055446n%40chromium.org.

Tony Jones

unread,
May 9, 2026, 1:23:31 AMMay 9
to 埃隆.羅斯柴爾德馬克思, Yasir Affan, Chrome Built-in AI Early Preview Program Discussions
It is definitely possible to expose your UI-driven WebMCP tools to your application’s chatbot backend. Since WebMCP is designed as a browser-native standard, the tools you register on the page are essentially "waiting" for an MCP-aware client to discover them.  
Here is how you can bridge the gap between your frontend tools and your backend LLM.
1. The Bridge: Relay Tools to the Backend
To make the tools available to your chatbot backend, you need a transport layer that can bridge the browser’s navigator.modelContext to your server.
The Relay Pattern: You can use a library like @mcp-b/webmcp-local-relay. By embedding a small script snippet on your page, you can relay the registered tools to an external MCP server.  
The Workflow: 1. Your UI components register themselves via navigator.modelContext.registerTool().
2. A relay script (or a custom postMessage bridge) sends the tool schemas (name, description, JSON input schema) to your chatbot's backend.
3. When the LLM decides to use a tool, the backend sends a "call" command back through the websocket/relay to the browser.
4. The browser executes the local JS function and returns the result (e.g., "State updated" or "Form submitted") back to the chatbot.
2. Implementation Options
Depending on how your chatbot is architected, you have two primary paths:Method How it Works Best For
Local Relay Uses a pre-packaged snippet to expose tools to a local or remote MCP client. Testing with tools like Claude Desktop or custom agents.
postMessage Bridge If your chatbot is an iframe or a widget on the same page, you can listen for tool calls via standard browser messaging. Seamlessly integrating a "built-in" chat widget with the parent page's tools.
Custom Backend Proxy Your backend acts as the "orchestrator," keeping a registry of "Live Tools" for every active user session. Enterprise-grade apps where the backend needs full control over the session state.


From: chrome-ai-dev-...@chromium.org <chrome-ai-dev-...@chromium.org> on behalf of 埃隆.羅斯柴爾德馬克思 <marx.c...@gmail.com>
Sent: Friday, May 8, 2026 11:16:21 PM
To: Yasir Affan <yasir...@gmail.com>
Cc: Chrome Built-in AI Early Preview Program Discussions <chrome-ai-dev-...@chromium.org>
Subject: Re: [chrome-ai-dev-preview-discuss] Exposing webmcp tools outside of webMcp chrome extension
 

Yasir Affan

unread,
May 13, 2026, 8:01:34 PM (13 days ago) May 13
to Chrome Built-in AI Early Preview Program Discussions, Tony Jones, Chrome Built-in AI Early Preview Program Discussions, 埃隆.羅斯柴爾德馬克思, Yasir Affan
Thanks Tony,

I was able to control the state of my UI components via cursor using mcp-b local relay.
But, seems like mcp-b is not developed by google and is developed by other organization and I dont see many weekly downloads for the package

I was wondering if there is a solution provided by official google docs to expose the tools outside of the browser?
If No, any timeline when can this feature be available?
Reply all
Reply to author
Forward
0 new messages