Skip to content

MCP Apps

MCP Apps are based on the MCP ext-apps specification — an open standard for rendering interactive UI views inside AI conversations.

MCP Apps are the portable baseline across hosts (e.g. Claude, Goose, VSCode, and ChatGPT compatibility mode). frac implements the protocol via the McpAppAdaptor so you use the same hooks regardless of runtime.

Here’s what happens when an MCP Apps client renders a view:

  1. User asks the AI to perform an action (e.g., “Show me flight options to Paris”)
  2. The client calls your MCP tool (e.g., search_flights)
  3. Your tool returns a result with data and a reference to a UI resource
  4. The client fetches the resource (your compiled React component) and renders it in an iframe
  5. The view communicates with the host via the MCP protocol and is hydrated with your tool’s structuredContent and _meta properties

The view–host connection looks like this:

MCP Apps architecture: MCP Server, MCP Host (ChatGPT, Claude), Host UI with Sandbox and Guest App iframe

The Host UI in this diagram designates the MCP Client (Claude, Goose, VSCode, etc.), and the Guest App is your App running in an iframe.

Views run inside an iframe and talk to the host via the same MCP protocol used by your server. The ext-apps spec defines guest-to-host requests and host-to-guest notifications for the view:

MethodDescription
ui/initializeHandshake to establish connection
ui/open-linkOpen external URLs
ui/messageSend follow-up messages to the conversation
ui/request-display-modeRequest display mode change
ui/update-model-contextUpdate view state for the model
tools/callInvoke MCP tools
NotificationDescription
ui/notifications/host-context-changedTheme, locale, display mode, viewport, or other host context updated
ui/notifications/tool-inputTool arguments provided
ui/notifications/tool-resultTool execution completed
ui/notifications/tool-cancelledTool call was cancelled
ui/notifications/tool-input-partialStreaming partial tool arguments (e.g. while the model is still sending)

frac wraps the MCP ext-apps protocol with the same React hooks as the Apps SDK. The McpAppAdaptor translates hook usage into the protocol under the hood:

Protocolfrac HookPurpose
ui/notifications/tool-input, tool-result, metadatauseToolInfo()Access tool input, output, and _meta
ui/update-model-contextuseViewState(), data-llmPersistent view state / model context
tools/calluseCallTool()Make additional tool calls
ui/messageuseSendFollowUpMessage()Send follow-up messages
ui/open-linkuseOpenExternal()Open external URLs
ui/request-display-modeuseDisplayMode()Access/change display mode
ui/notifications/host-context-changed (theme, maxHeight, safeArea)useLayout()Theme, max height, safe area insets
ui/notifications/host-context-changed (locale, userAgent)useUser()Locale and device/capabilities
Modal (polyfilled)useRequestModal()Request modal display (renders in-iframe)
ui/notifications/size-changeduseRequestSize()Manually report view size (ext-apps autoResize handles this by default)

MCP Apps methods not yet supported in frac

Section titled “MCP Apps methods not yet supported in frac”

The following MCP ext-apps protocol methods are not yet wrapped by frac hooks:

Protocol MethodPurpose
ui/notifications/tool-input-partialStreaming partial tool arguments (e.g. while the model is still sending)
ui/notifications/tool-cancelledTool call was cancelled

You can access tool-input-partial and tool-cancelled directly via useMcpAppContext when running in MCP Apps clients, if needed. Support may be added in a future release.

Not all frac features exist in the ext-apps spec. When using frac in MCP Apps clients, the following features are either not supported or polyfilled:

FeatureApps SDKMCP Apps
useFiles, useSetOpenInAppUrl❌ Not supported
useRequestModalPortaled to host⚠️ Polyfilled (renders in-iframe)
useViewState, data-llmPersisted by host⚠️ Polyfilled (state doesn’t persist across view renders)

Graceful degradation: Unsupported features throw; polyfilled ones work with limitations. See the compatibility matrix for details.

Please see the Test Your App guide for more information.