Skip to main content
An MCP Apps host (Claude and others) exposes view context that Skybridge’s cross-host hooks read for you. useMcpAppContext is the escape hatch: it reads that context raw, by key, for a protocol-level field the hooks don’t surface. It runs only on MCP Apps hosts, not ChatGPT; the Apps SDK counterpart is useAppsSdkContext.

Example

useUser gives the locale but not the host time zone, so a schedule reads timeZone from the context to render times in the user’s zone.

Type Parameters

K

Inferred from key: the literal key you pass fixes the return type to McpAppContext[K].

Parameters

key

Required. The context key to read and subscribe to. The hook re-renders only when this key changes; to watch several keys, call it once per key.

options

appInfo ({ name, version }) optionally identifies the view to the host. Omit it for a generic default.

Returns

The requested key’s current value, empty until the host provides it: host-context keys are undefined, tool-state keys null. The table lists each key with the cross-host hook that also surfaces it; hosts may send others not listed.

useAppsSdkContext

The Apps SDK counterpart for ChatGPT

useToolInfo

Read the tool result across both runtimes

Apps SDK and MCP Apps

What the raw MCP Apps layer is, and how Skybridge unifies it