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

# MCP app tools

> Tools used to read, write, publish, and render apps.

> [!NOTE]
>
> The [Content access setting](https://docs.omni.co/ai/settings/mcp.md#content-access) must be enabled to use the tools on this page. `putApp`, `patchApp`, and `publishDraft` also require [Agentic capabilities](https://docs.omni.co/ai/settings/mcp.md#agentic) to be enabled.

Tools used to read, write, publish, and render [apps](https://docs.omni.co/visualize-present/apps).

Changes made with `putApp` or `patchApp` land on the document's shared main [draft](https://docs.omni.co/content/develop/drafts.md) and are invisible to other viewers until [`publishDraft`](#publish-draft) runs. The recommended flow is to read the draft with `getAppDraft`, falling back to `getApp` only when no draft exists yet, then write, then publish.

App settings cannot be changed using these tools. Use the Omni UI to modify app settings.

If the `X-MCP-User-ID` header names an embed user, that user must have an active embed session. If the session has ended, these tools fail with a `403` error.

Tools with the  icon can run as another user with the [`X-MCP-User-ID` header](https://docs.omni.co/ai/mcp/authentication#running-tools-as-another-user).

## Read tools

> [accordion] getApp
>
> Reads a published app's HTML source and sandbox settings
>
> Reads a published app document's complete HTML source and sandbox settings, given a document identifier. Draft edits are not included in the response; use `getAppDraft` instead. Large apps may not be retrievable, since the returned HTML has a size cap.

> [accordion] getAppDraft
>
> Reads the main draft's app HTML and settings
>
> Reads the main draft's app HTML and settings.

> [accordion] showApp
>
> Renders a saved, interactive app inline
>
> > [!NOTE]
> >
> > **Some MCP clients may not render apps correctly**. Omni has confirmed that Claude Desktop, ChatGPT, and VS Code with Copilot correctly render apps. Cursor can render apps, but you may need to open a widget to view the app instead of the app opening by default.
>
> Renders a saved, interactive [app](https://docs.omni.co/visualize-present/apps) inline with live data.
>
> An app rendered through MCP runs under the same sandboxing and governed queries as everywhere else in Omni. See [Apps security](https://docs.omni.co/visualize-present/apps#security) for more information.

## Write tools

> [accordion] putApp
>
> Replaces the app's HTML on the document's main draft
>
> Replaces the app's HTML on the document's shared main draft. The draft is created automatically on the first write and reused on subsequent writes.

> [accordion] patchApp
>
> Applies htmlEdits to an app's main draft
>
> Applies `htmlEdits` to the app on the document's shared main draft, instead of replacing the whole HTML.
>
> Like [`putApp`](#put-app), the draft is created automatically on the first write and reused on subsequent writes.

> [accordion] publishDraft
>
> Publishes an app's main draft
>
> > [!WARNING]
> >
> > Publishing a draft publishes all the changes it contains, including any other editors' unpublished changes to the same document.
>
> Publishes the main draft so its changes become visible to viewers. Before publishing, this tool reads the draft to confirm it contains an app and refuses if it doesn't.

## Related

* [MCP server tools](https://docs.omni.co/ai/mcp/tools) - See every tool group and the settings each requires
* [Omni MCP settings](https://docs.omni.co/ai/settings/mcp.md) - Turn groups of tools on or off for your organization
