DEV Community

Cover image for What Does the MCP Apps 2.1 WebMCP Bridge Actually Expose?

What Does the MCP Apps 2.1 WebMCP Bridge Actually Expose?

Raju Dandigam on November 30, 2026

An embedded MCP App can now encounter two tool surfaces: the tools it registers through the MCP Apps SDK and the tools its document exposes through...
Collapse
 
sylwia-lask profile image
Sylwia Laskowska •

Wow, this is interesting!

Collapse
 
andrii_0308f2a18c503d78ec profile image
Andrii •

One compatibility edge worth testing: Chrome 160 replaces RegisteredTool.window with Tool.source, but ownWebMcpTools() currently checks only tool.window and treats an undefined value as belonging to the current document. That could allow tools from other frames into the bridge unintentionally; I'd support both API shapes, reject null or mismatched sources, and add a real-browser iframe test. Have you considered testing the bridge against the new Tool interface?

Collapse
 
raju_dandigam profile image
Raju Dandigam Google Developer Experts •

@andrii_0308f2a18c503d78ec Good catch. The in-memory page double cannot establish that iframe ownership boundary. A real-browser check should register tools in two frames, then assert that only the current document’s tools cross the bridge under both descriptor shapes—and fail closed when source information is absent. If you have a minimal Chrome 160 repro, I’d be interested in comparing it with the current fixture.

Collapse
 
andrii_0308f2a18c503d78ec profile image
Andrii • • Edited

Thanks, @raju_dandigam . I don’t have a Chrome 160 repro yet; I spotted this while reading the 2.1.0 source. I’d start with a same-origin iframe so the browser test checks document ownership without mixing in cross-origin permissions. The assertion I’d want is that WebMCP can see both tools, but only the current document’s tool is listed or callable through the bridge. I’d keep the missing-source case in the existing fixture so it can be tested directly.

Collapse
 
sherotree profile image
Sherotree •

The result-boundary section is what I'll steal: when the mirrored tool is invoked from WebMCP, structured content takes precedence and an error becomes a rejected execution, not a resolved wrapper. A test that only checks that the promise resolved would have gone green on the wrong shape. That's exactly the kind of "bridged" lie this post is trying to pin down.

Collapse
 
paullovelace profile image
Paul Lovelace •

The asymmetric fixture is the testing move I'd steal — same name on both sides and a passing discovery test would have hidden which registration actually supplied the result. The bit I'm still chewing on is the collision rule: app registrations win, which is documented, but it quietly means a page tool with a generic name just disappears behind the app's version. Do you namespace your page tools to avoid that, or is it basically a non-issue in practice because your names are specific enough?

Collapse
 
aheadkit profile image
AheadKit •

The annotation part is the one that stuck with me. readOnlyHint making it across is good, but the shape of the problem is what the bridge doesn't transmit, because then the host classifies the tool differently from the page that defined it. I ran into the same shape on the other side of MCP last week: a baseline diff that catches an added tool and a widened input, but prints "No changes" when the launch command itself is swapped, because the command isn't a tool. The mirror-removal test is the one I'd trust most in a React app. A stale mirror advertising a capability whose owner is gone is exactly the kind of thing that fails quietly in production.

Collapse
 
zealot2002 profile image
goodlords •

The "latest still pointed at 2.0.4 after 2.1.0 was out" detail is the kind of thing I would have missed if I was only reading a changelog. Pinning the package, and giving the page and the app different tool names, is what makes the discovery result trustworthy. A passing test with the same name on both sides could hide which registration actually answered. I also like the reminder that turning the bridge off is not the same as disabling the app's own tools — it only cuts the connection between the two surfaces.

Collapse
 
johnclentoira profile image
john Clent Oira •

Excellent breakdown. The distinction between tool discovery, ownership, and execution boundaries is particularly important. Bridging tools simplifies integration, but it doesn't eliminate the need for explicit authorization, predictable behavior, and proper lifecycle management. Thanks for sharing such a practical technical analysis.

Collapse
 
igorvii profile image
Igor •

The cleanup fixture raises an adjacent question I'd love to see pinned down: discovery-after-removal is tested — but what about a call already in flight when the registration is removed? The mirror vanishes from the tool list, yet the handler may still commit its side effect. For read_page_status that's cosmetic; for a consequential tool (the prepare-review action, or anything that charges a wallet) the gap between "rejected before execution" and "response lost after commit" is exactly where duplicate-execution bugs live.
We probe this window against MCP tool stacks in our lab — lost response after commit, in-flight takeover, cross-instance races — and it's rarely specified at the bridge layer. Does 2.1.0 define result semantics for calls in flight during removal, or is that left to the app?
Also +1 on recording the installed version instead of the tag — we pin exact versions and lockfile hashes in every test record for the same reason.

Collapse
 
the_daily_flare profile image
The daily flare •

The 2.0.4 latest tag still pointing at 2.1.0 on November 22 caught me off guard, since I would have trusted the tag blindly.

Collapse
 
sergeevdms profile image
Dmitry Sergeev •

One case the document filter does not cover: any script running in the app's own document can register a WebMCP tool, so an analytics or chat widget the app loads would become a host-visible tool if the bridge imports everything registered there, and bridging is on by default. Ownership by document says nothing about which script wrote the tool. A test where a third-party script registers a tool after load, plus an allowlist of page tool names the app expects to import, would show whether the bridge can be scoped to what the app author actually wrote

Collapse
 
visionwei profile image
Wei Bin •

The asymmetric fixture is the move I would steal: give the page and the app different tools, then reuse a name to see which registration wins. A passing test that cannot tell me whose tool ran is worse than a failing one, because it teaches me to trust a surface I have not checked. Pinning the exact release matters more than trusting a latest tag — I have been bitten by a tag pointing at an older build. When the app wins a collision silently, do you log that shadowing, or does the page tool just vanish without a trace?

Collapse
 
mudassirworks profile image
Mudassir Khan •

the asymmetric fixture is what makes this test honest. with the same tool name on both sides a passing discovery check tells you nothing about which registration actually answered.

the collision rule worries me a bit though. app registrations winning silently means a page tool can get shadowed and nobody notices until a call comes back in the wrong shape. i would want the bridge to warn on every collision, or fail the test when one happens, so renames get forced early instead of discovered in prod.

have you checked whether the surviving tool keeps its own readOnlyHint after a shadowing, or does the annotation come from the mirror?

Collapse
 
aiframe profile image
AI Frame •

The cleanup question is the one I'd want pinned down next too — in a React panel that mounts and unmounts, a stale mirrored tool is exactly the kind of thing that only bites in production. The asymmetric fixture is a nice trick as well; using different names on each side so a passing test can't hide which registration answered is the sort of detail that's easy to skip and expensive to debug later. Thanks for testing the released SDK instead of trusting the docs' version of it.

Collapse
 
vexaloom-labs profile image
vexaloom-labs •

Default-on bridging turns a page's tool inventory into an agent capability decision before the app author has made one.