{"slug": "what-does-the-mcp-apps-2-1-webmcp-bridge-actually-expose", "title": "What Does the MCP Apps 2.1 WebMCP Bridge Actually Expose?", "summary": "A developer built a companion example testing the WebMCP bridge in MCP Apps SDK 2.1.0, using an in-memory MCP connection and a page-API double to determine exactly what the bridge exposes in both directions. The tests found that app-registered tools take priority on name collisions, that disabling the bridge leaves the app's own tools available while stopping page tools from being imported, and that structured content takes precedence over content blocks when an app tool is invoked through its WebMCP mirror, with error results becoming rejected executions. The example also pins the package version explicitly because the registry's latest tag still resolved to 2.0.4 at the time of verification.", "body_md": "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 WebMCP. A bridge between them is convenient, but “bridged” leaves several important questions unanswered.\n\nWhich tools become visible? What happens when names collide? Do all annotations survive? Is a structured result returned as an object or wrapped as protocol content?\n\n[MCP Apps 2.1.0](https://github.com/modelcontextprotocol/ext-apps/releases/tag/v2.1.0) makes those questions timely. The companion example tests the released SDK against an in-memory MCP connection and a small page-API double. That gives us executable answers about SDK behavior while keeping native-browser and host integration as separate checks.\n\nThe bridge supports both directions. App-registered tools can be mirrored onto the document's WebMCP surface. Tools already exposed by the page can become available through the app's tool interface.\n\nThose directions have different owners. The app controls its registrations and their cleanup. The page controls its existing tools. A bridge should not accidentally discover its own mirrors and import them again.\n\nThe current [SDK implementation](https://github.com/modelcontextprotocol/ext-apps/blob/v2.1.0/src/webmcp.ts) explicitly manages that distinction. It also filters page tool descriptors to the relevant document context. Avoid interpreting the bridge as a way to aggregate every tool from every frame in a host application.\n\nThe example uses `@modelcontextprotocol/ext-apps@2.1.0` explicitly. At the November 22, 2026 verification point, the registry's `latest` tag still resolved to 2.0.4 even though 2.1.0 was available. A tag is not a substitute for recording the installed package version.\n\nThe package also pins compatible MCP dependencies and includes a lockfile. That makes a bridge experiment reproducible after release tags move.\n\nThe app constructor makes the switch visible:\n\n``` js\nconst app = new App(\n  { name: \"event-review\", version: \"1.0.0\" },\n  { tools: { listChanged: true } },\n  { autoResize: false, webMcpBridge: true },\n);\n```\n\nThis is the bridge setting from the companion fixture. The SDK enables bridging by default; spelling it out makes the experiment easier to read. A second test sets it to `false` and checks the resulting discovery behavior.\n\nGive the page and app different tools. The page exposes `read_page_status`; the app exposes `read_event_review`. If both use the same name initially, a passing discovery test can conceal which registration supplied the result.\n\nWith bridging enabled, the test confirms that the host-side app interface can discover the page tool and that the document can discover the app tool. With bridging disabled, the app's own tool remains available through its MCP connection, while the page tool is not imported through the bridge.\n\nThis distinction is useful when deciding whether to disable automatic bridging. Turning it off is not equivalent to disabling the app's tools. It changes the connection between the two surfaces.\n\nThe implementation gives app registrations priority when names collide. Treat that as a documented resolution rule, not an invitation to reuse generic names everywhere. Names such as `read_event_review` communicate ownership and purpose more clearly than `get_data`.\n\nMCP tool results can contain content blocks and structured content. WebMCP callers expect the page-facing execution result. The bridge must translate between these representations.\n\nFor the tested version, an app result's structured content takes precedence when the tool is invoked through its WebMCP mirror. An error result becomes a rejected execution at that boundary. When there is no structured content, the bridge uses the available content representation.\n\nThe companion tool returns both forms intentionally. The test calls the mirrored tool and verifies the structured event-review object. This prevents a superficial “the promise resolved” assertion from passing even if the caller receives an unexpected wrapper.\n\nThe [app source](https://github.com/modelcontextprotocol/ext-apps/blob/v2.1.0/src/app.ts) and bridge implementation are part of the research record. They are especially useful here because a broad feature announcement cannot specify every translation detail.\n\nThe page fixture includes both `readOnlyHint` and another hint. The test verifies the specific mapping implemented by this release: `readOnlyHint` is carried across the relevant bridge path. It does not assume every WebMCP annotation has an identical MCP Apps counterpart.\n\nThis is a contract boundary worth documenting in an integration review. If a host relies on a hint that the bridge does not transmit, the host may present or classify the tool differently from the original page.\n\nHints still do not replace application enforcement. Validate inputs, constrain resource access, and require the appropriate user decision for consequential actions in the application itself. Translation metadata cannot supply missing authorization.\n\nRegistration has a lifetime. The fourth fixture concern is what happens when the app removes its tool. The SDK test confirms that removing the app registration removes its page mirror.\n\nThat matters in a React application where a review panel can close or switch events. A stale mirror can advertise a capability whose original owner no longer exists. Include discovery after removal in the test instead of checking only the initial tool list.\n\nThe companion suite contains four passing tests covering bidirectional exposure, the disabled bridge, mirror removal, and annotation mapping. They use the real released SDK and its in-memory transport. The page API is a test double, so these results do not establish Chrome permission behavior, an actual host's embedded-frame policy, or a complete native end-to-end workflow.\n\nFor an event-review demo, begin with bounded read operations and a prepare-review action. Keep final submission behind the application's existing review and authorization path. Then decide explicitly which tools should be visible to the host and which should remain local to the page.\n\nThe bridge removes integration work, but it does not remove interface design. A useful tool surface still needs clear names, validated inputs, predictable results, and a lifetime tied to the workflow that owns it.", "url": "https://wpnews.pro/news/what-does-the-mcp-apps-2-1-webmcp-bridge-actually-expose", "canonical_source": "https://dev.to/gde/what-does-the-mcp-apps-21-webmcp-bridge-actually-expose-5aaa", "published_at": "2026-11-30 15:11:00+00:00", "updated_at": "2026-11-30 15:16:03.256816+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "developer-tools"], "entities": ["Model Context Protocol", "MCP Apps SDK", "WebMCP", "@modelcontextprotocol/ext-apps"], "also_reported_by": [], "takeaway": "In MCP Apps SDK 2.1.0, the WebMCP bridge gives app registrations priority on name collisions and returns an app tool's structured content (not its content blocks) when invoked through its WebMCP mirror, while error results surface as rejected executions.", "recommendation": {"advice": "Pin @modelcontextprotocol/ext-apps to 2.1.0 explicitly rather than relying on the latest tag, and give page and app tools distinct names so discovery tests reveal which surface supplied a result.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/what-does-the-mcp-apps-2-1-webmcp-bridge-actually-expose", "markdown": "https://wpnews.pro/news/what-does-the-mcp-apps-2-1-webmcp-bridge-actually-expose.md", "text": "https://wpnews.pro/news/what-does-the-mcp-apps-2-1-webmcp-bridge-actually-expose.txt", "jsonld": "https://wpnews.pro/news/what-does-the-mcp-apps-2-1-webmcp-bridge-actually-expose.jsonld"}}