Skip to main content
Every Skybridge export. Server APIs run in your MCP server and work with any host. View hooks run inside the rendered view, where a host that lacks a capability degrades gracefully, either a no-op or a thrown error documented on the hook’s page.

Server

APIDescription
mcpAuthMetadataRouterServe OAuth metadata for client discovery.
McpServerThe server you register tools and views on.
optionalBearerAuthAttach a verified identity when a token is present.
registerToolRegister a tool, its schemas, and the view it renders.
requireBearerAuthGate a server behind a verified bearer token.

Hooks

HookDescriptionSupported Hosts
useCallToolCall server tools from the view and track call state.
useDisplayModeRead and request inline, pip, or fullscreen.
useDownloadSave files to the user’s device.
useFilesUpload and pick host-managed files.
useLayoutRead theme, max height, and safe-area insets.
useOpenExternalOpen a URL outside the view iframe.
useRegisterViewToolExpose a tool that runs inside the view.
useRequestCloseAsk the host to dismiss the view.
useRequestModalOpen the view as a host modal.
useRequestSizeAsk the host to resize the view iframe.
useSendFollowUpMessageSend a follow-up turn to the model.
useSetOpenInAppUrlOverride the fullscreen open-in-app URL.
useToolInfoRead the tool input, output, and metadata that rendered the view.
useUserRead locale and device capabilities.
useViewStatePersist UI state on the host across renders.

Utilities

UtilityDescription
createStoreA Zustand store synced with host view state.
data-llmDescribe on-screen state to the model in words.
generateHelpersGenerate typed hooks inferred from your server.

Types

TypeDescription
FileRefReference a host-managed file in a tool schema.
Type UtilitiesPull tool input, output, and name types from your server.

Low-level

HookDescription
useAppsSdkContextRead a raw ChatGPT (Apps SDK) context value by key.
useMcpAppContextRead a raw MCP Apps context value by key.

Quickstart

Scaffold and run your first app

Build Tools

Register the tools these APIs call

Apps SDK and MCP Apps

How the two runtimes differ and what’s unified