Skip to content

MCP Integration Overview

A2UI and the Model Context Protocol (MCP) integrate in four ways depending on whether your application or an external MCP client owns the outer host, and whether the MCP server returns structured JSON data, reusable A2UI layout templates, or sandboxed HTML apps.

Choose an MCP integration pattern

Use the table below to pick the guide that matches your host environment and MCP server output:

Your goalOuter hostMCP server outputGuide
Invoke headless MCP tools from A2UI inputs and buttonsYour A2UI web appJSON or plain-text tool resultsCall MCP Tools from A2UI
Return reusable A2UI layouts and per-call data from toolsYour A2UI web appa2ui:// templates (application/a2ui+json)Serve A2UI Layouts from an MCP Server
Embed third-party interactive HTML widgets on an A2UI surfaceYour A2UI web appui:// HTML apps (text/html;profile=mcp-app)Embed MCP Apps in A2UI Surfaces
Display A2UI surfaces inside Claude Desktop, Cursor, or VS CodeExternal MCP Apps hostui:// HTML bundle containing an A2UI rendererRender A2UI Inside an MCP App

How the patterns fit together

  1. When you own the web application, @a2ui/catalog-mcp connects your Lit, React, or Angular renderer directly to MCP Client sessions. Surfaces can call tools with callMcpTool and write returned JSON into the surface Data Model (Call MCP Tools from A2UI), or mount third-party ui:// HTML widgets inside a double-iframe sandbox with McpApp (Embed MCP Apps in A2UI Surfaces).
  2. When an MCP server emits A2UI messages (application/a2ui+json), it can publish declarative component layouts as a2ui:// resources and return compact updateDataModel updates from tools/call (Serve A2UI Layouts from an MCP Server). If the outer client supports MCP Apps (ui:// HTML iframes) rather than A2UI natively, your server can package an A2UI web renderer inside the ui:// HTML bundle itself (Render A2UI Inside an MCP App).