What works unchanged
- Your MCP server. Tools, schemas, annotations,
instructions, and streamable HTTP transport. See Build: MCP server. _meta.ui.resourceUrion tools, andui://resources with the MIME typetext/html;profile=mcp-app._meta.ui.csp,permissions, andprefersBorderon the resource.- Tool visibility with
_meta.ui.visibility. - The View bridge.
ui/initialize,ui/notifications/tool-input,tool-result,host-context-changed,size-changed,ui/open-link,ui/message,ui/update-model-context,ui/request-display-mode, andtools/callandresources/*from the View. See Build: MCP App UI. - Views built with the
Appclass from@modelcontextprotocol/ext-apps. - Theming through
hostContext.styles.variables. - OAuth 2.1 with PKCE and client ID metadata documents. See Authentication.
If your View uses window.openai
window.openai is specific to ChatGPT. Allternit provides a compatibility shim for it: when your View is served as text/html+skybridge, or your tool or resource _meta carries any openai/* key (or allternit/openaiCompat: true), Allternit injects window.openai and maps it onto the standard bridge, so the View runs unchanged. Views that use the standard bridge or the App class get no shim and need none.
The table shows what each member maps to. Moving to the standard method is still the better long-term choice, because it runs in every MCP Apps host.
To save a result or start an agent task, which the standard does not cover, use the optional
window.allternit extensions.
A small compatibility layer
If one View has to run in several hosts, wrap the differences in one place:request is your JSON-RPC helper from the quickstart, or the equivalent method on the App class.
Server-side changes
- MIME type. Allternit renders
text/html;profile=mcp-app, plaintext/html, and ChatGPT’s older Apps SDK typetext/html+skybridge(which also turns on thewindow.openaishim). - Tool metadata. Allternit reads
_meta.ui.resourceUri, the flat_meta["ui/resourceUri"], and the older_meta["openai/outputTemplate"]to find a View. When a resource has no_meta.ui,openai/widgetCSP,openai/widgetDomainandopenai/widgetPrefersBorderare read in its place. Otheropenai/*keys are not read. - Auth. Allternit sends
resourceand PKCE but noscopeparameter. See Authentication.
Where Allternit differs
Porting from Claude
Claude and Allternit both implement the standard, so there is little to change. Check the CSP you declare, remove any dependency on browser storage, and confirm your OAuth server accepts Allternit’s client ID metadata document.Porting to other hosts
An Allternit app that uses only the standard bridge runs in any host that implements the specification. If you usewindow.allternit, guard every call with detect() and supports(). The extension methods are not part of the standard, and other hosts will not have them.