> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skybridge.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Every server API, hook, and utility, with host compatibility.

Every Skybridge export. Server APIs run in your MCP server and work with any host. [View](https://docs.skybridge.tech/build/view.md) 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

| API | Description |
| - | - |
| [`mcpAuthMetadataRouter`](https://docs.skybridge.tech/api-reference/mcp-auth-metadata-router) | Serve OAuth metadata for client discovery. |
| [`McpServer`](https://docs.skybridge.tech/api-reference/mcp-server) | The per-request server your handler registers tools on. |
| [`optionalBearerAuth`](https://docs.skybridge.tech/api-reference/optional-bearer-auth) | Attach a verified identity when a token is present. |
| [`registerTool`](https://docs.skybridge.tech/api-reference/register-tool) | Register a tool, its schemas, and the view it renders. |
| [`requireBearerAuth`](https://docs.skybridge.tech/api-reference/require-bearer-auth) | Gate a server behind a verified bearer token. |
| [`Skybridge`](https://docs.skybridge.tech/api-reference/skybridge) | The app: its config, OAuth, and the handler that registers tools. |

## Hooks

| Hook | Description | Supported Hosts |
| - | - | - |
| [`useCallTool`](https://docs.skybridge.tech/api-reference/use-call-tool) | Call server tools from the view and track call state. | |
| [`useDisplayMode`](https://docs.skybridge.tech/api-reference/use-display-mode) | Read and request inline, pip, or fullscreen. | |
| [`useDownload`](https://docs.skybridge.tech/api-reference/use-download) | Save files to the user's device. | |
| [`useFiles`](https://docs.skybridge.tech/api-reference/use-files) | Upload and pick host-managed files. | |
| [`useHost`](https://docs.skybridge.tech/api-reference/use-host) | Identify which host is rendering the view. | |
| [`useOpenExternal`](https://docs.skybridge.tech/api-reference/use-open-external) | Open a URL outside the view iframe. | |
| [`useRegisterViewTool`](https://docs.skybridge.tech/api-reference/use-register-view-tool) | Expose a tool that runs inside the view. | |
| [`useRequestClose`](https://docs.skybridge.tech/api-reference/use-request-close) | Ask the host to dismiss the view. | |
| [`useRequestModal`](https://docs.skybridge.tech/api-reference/use-request-modal) | Open the view as a host modal. | |
| [`useRequestSize`](https://docs.skybridge.tech/api-reference/use-request-size) | Ask the host to resize the view iframe. | |
| [`useSendFollowUpMessage`](https://docs.skybridge.tech/api-reference/use-send-follow-up-message) | Send a follow-up turn to the model. | |
| [`useSetOpenInAppUrl`](https://docs.skybridge.tech/api-reference/use-set-open-in-app-url) | Override the fullscreen open-in-app URL. | |
| [`useToolInfo`](https://docs.skybridge.tech/api-reference/use-tool-info) | Read the tool input, output, and metadata that rendered the view. | |
| [`useUser`](https://docs.skybridge.tech/api-reference/use-user) | Read locale, theme, and device capabilities. | |
| [`useViewState`](https://docs.skybridge.tech/api-reference/use-view-state) | Persist UI state on the host across renders. | |
| [`useViewport`](https://docs.skybridge.tech/api-reference/use-viewport) | Read the max height and safe-area insets. | |

## Utilities

| Utility | Description |
| - | - |
| [`createStore`](https://docs.skybridge.tech/api-reference/create-store) | A Zustand store synced with host view state. |
| [`data-llm`](https://docs.skybridge.tech/api-reference/data-llm) | Describe on-screen state to the model in words. |
| [`generateHelpers`](https://docs.skybridge.tech/api-reference/generate-helpers) | Generate typed hooks inferred from your server. |

## Types

| Type | Description |
| - | - |
| [`FileRef`](https://docs.skybridge.tech/api-reference/file-ref) | Reference a host-managed file in a tool schema. |
| [Type Utilities](https://docs.skybridge.tech/api-reference/utility-types.md) | Pull tool input, output, and name types from your server. |

## Low-level

| Hook | Description |
| - | - |
| [`useAppsSdkContext`](https://docs.skybridge.tech/api-reference/use-apps-sdk-context) | Read a raw ChatGPT (`window.openai`) context value by key. |
| [`useMcpAppContext`](https://docs.skybridge.tech/api-reference/use-mcp-app-context) | Read a raw MCP Apps context value by key. |

> [card] [Quickstart](https://docs.skybridge.tech/get-started/quickstart.md)
>
> Scaffold and run your first app

> [card] [Build Tools](https://docs.skybridge.tech/build/tools.md)
>
> Register the tools these APIs call

> [card] [ChatGPT Plugins and MCP Apps](https://docs.skybridge.tech/resources/chatgpt-and-mcp-apps.md)
>
> How the two runtimes differ and what's unified


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.