Developer guide

OpenAI Visualizations, MCP Apps, and Sites: which surface should you build for?

Compare ChatGPT's inline Visualizations, MCP Apps widgets, and hosted Sites for React reuse, tool calls, and persistent data.

Draft preview — this article has not been published.

By ELFUpdated Evidence reviewed

A small interactive card in ChatGPT can look similar to an embedded application, but appearance does not identify its runtime contract. For a React library, separate native Visualizations, MCP Apps UI, and hosted Sites at the adapter boundary.

Public documentation reviewed November 7, 2026. Examples in this guide describe an application architecture; they do not claim every ChatGPT account has every surface enabled.

Compare the three surfaces

The public documentation describes Visualizations as interactive explanations in a chat and recommends Sites when a durable hosted application is needed. MCP Apps supplies the separate protocol for tool-connected UI. Visualizations documentation · MCP Apps specification

SurfaceGood starting useIntegration boundaryOur recommended data assumption
Native VisualizationA calculator, simulation, chart, or explorable explanationThe current native authoring profileTreat inputs as local and supplied data as a snapshot unless a tested persistence contract is provided.
MCP Apps UI in ChatGPTA tool result with actions against an applicationMCP Apps protocol, with optional ChatGPT extensionsKeep business records in your server or service; use view state for presentation.
OpenAI SiteA hosted application people return to by URLWeb application frontend and backendConfigure storage and server authorization for records that must survive.

This is a selection guide, not a promise that the same generated HTML can be submitted to all three.

Native Visualizations: begin with a bounded interactive result

OpenAI's public guide describes native Visualizations as charts, maps, calculators, simulations, and other interactive explanations. It says a shared visualization is generally based on information available when generated, rather than a continuously synchronized dashboard. Availability is still dependent on the supported account and client. Read the native Visualizations guide.

For a portable component library, our recommended native profile starts with prepared data and local interaction. A pricing comparison can change sliders and recompute totals without needing an account. A project overview can filter the supplied rows without pretending to reread a live service.

Keep delivery restrictions in the native profile configuration: accepted HTML shape, asset rules, byte budget, and permitted bridge operations. Review them in the actual authoring environment. The public user guide is not a substitute for a versioned developer ABI, and an MCP example does not establish native Visualization capabilities.

If a component needs a backend but its current profile has no supported connection, provide a meaningful read-only preview or choose another surface. Do not ship controls that imply an unimplemented save.

MCP Apps: a protocol for tool-connected UI

The MCP Apps specification defines HTML resources using ui:// URIs and the MIME type text/html;profile=mcp-app. Tools identify their UI resource through metadata. The iframe and host communicate through JSON-RPC messages over postMessage, with capability negotiation and host-enforced sandbox restrictions. MCP Apps specification

Use the maintained protocol SDK at the transport boundary. Your application should receive domain data and typed actions after that translation, so a planner component does not need to know how an iframe handshake works.

OpenAI recommends the standard MCP Apps bridge for shared integrations and exposes additional ChatGPT features through window.openai. Its UI guidance separates server-owned business records, temporary view state, and durable storage controlled by the application. window.openai.setWidgetState is synchronous and widget-scoped; it is not a durable business-data commit. OpenAI's MCP UI guide

For example, a task completion action should call an authorized server tool, validate the result, and update the controller from the returned record. A selected tab may remain local or use an available view-restoration mechanism. The difference belongs in the API and in the visible status.

Standard metadata and ChatGPT extensions

For new standard integrations, use _meta.ui.resourceUri for the tool-to-resource association and _meta.ui.csp for resource policy. The latter uses names such as connectDomains and resourceDomains. Older OpenAI-specific aliases have different names; do not mix the two shapes accidentally. Confirm the supported fields in the current reference.

A declared network domain is a configuration request, not permission to put credentials in the frontend. Application authorization remains a server responsibility. A capability should become available to the component only after its adapter has established that the host supports the corresponding operation.

Sites: a deployed application with explicit storage

Sites documentation identifies D1 for durable structured records and R2 for uploaded files. It also describes identity options and requires authorization decisions to stay in server code. Those are application services that must be configured for the site's requirements. Sites data and connections

A Site's React view can use the same board or checklist as an embedded widget. Its controller, however, should call the site's authenticated backend. Do not make window.openai the foundation of a Site simply because a ChatGPT widget example uses that global.

For a shared board, assign records a stable identifier and an ownership scope. Make the backend return the accepted revision after a mutation. On reload, fetch that record under the current identity. These are our recommended application-level rules; a database binding alone does not implement them.

What should be universal in your library?

Share the things you own: domain schemas, validators, pure transformations, accessible controls, visual tokens, and component props. Configure the things the host owns: mounting, theme input, transport, navigation, view restoration, and delivery policy.

For instance, a checklist view can accept items, onToggle, busyIds, and error. One entry point connects it to a local controller for an interactive explanation. Another connects it to server tools for an MCP App. A third connects it to a Site backend. The rendered interaction is familiar while the storage promises stay precise.

“Universally compatible” should mean the same component contract has an honest implementation on each supported profile. It should not mean that every profile silently claims networking, identity, shared editing, or cloud persistence.

Read portable React components and state for the controller boundary, and self-contained widget bundles for the artifact pipeline.