Features

MCP Apps

Some MCP servers ship their own interactive UI with a tool: a chart you can click, a picker, a small dashboard. This is the MCP Apps standard (io.modelcontextprotocol/ui), and Trellaris can draw those apps as cards in chat. Because an app is code written by a third party, it is reviewed and pinned before it renders, runs in a sandbox on a separate origin, and every call it makes goes through the same governance as any other tool call.

A2UI or MCP Apps?

A2UIMCP Apps
Who writes the UIThe agent, as a JSON descriptionThe tool vendor, as an HTML page
What can appearOnly components in the trusted catalogWhatever the vendor's page draws
How it is kept safeCatalog validation on every surfaceReview and pinning, a sandboxed origin, a strict CSP, governed calls
Switched onAlways (in web chat)Per organization, off by default

Review and pinning

When an MCP server is registered in the Tools Library, discovery reads every ui:// resource its tools name. Each app waits for an org_admin to approve it (GET /mcp-servers/{slug}/apps, then โ€ฆ/approve or โ€ฆ/reject). Approval pins three things together:

If the server later serves anything else (new HTML, a wider CSP, a new permission) that is drift: the app stops rendering, the server's owner is notified, and it waits for approval again. An MCP server with an unreviewed app cannot be promoted to a shared ring.

Switching it on

MCP Apps are off for every organization until an org_admin switches them on (PUT /admin/mcp-apps). The same setting holds four browser-permission switches (camera, microphone, geolocation, clipboard write), all off by default; an app that asks for one gets it only if the org allows it. A tool_allowlist policy can also say render_apps: false for any scope, and any such row wins: the tool still runs, but the person sees its text result instead of the card.

Apps render only in a web chat. Slack, Teams and automations always get the tool's text result.

The sandbox

The app's page never runs on the product's origin. The card frames a proxy page on a separate sandbox origin (MCP_APPS_SANDBOX_ORIGIN), and the proxy frames the app with the CSP that was approved. The product's session cookie is host-only and __Host- prefixed, so code on the sandbox origin can neither read it nor overwrite it. If a deployment has no sandbox origin set, the card says apps are not configured and nothing renders.

What an app can do

The app talks to the chat over postMessage (JSON-RPC). The host answers only these methods:

MethodWhat happens
tools/callCalls a tool on the same server through /mcp-apps/instances/{id}/tools-call. Only the person who started the run may call it. A tool from another server is refused (403). A write is refused (409, mcp_app.approval_required) and never runs: an app call can arrive after the run has ended, so there is nothing to park.
resources/readReads a resource on the same server, through the same endpoint family.
ui/update-model-contextTells the agent what is on screen. It reaches the model on the next turn, inside an <app_context> block.
ui/messageProposes a message. It fills the composer and is never sent without the person pressing Send.
ui/open-linkShows the URL; it opens only when the person clicks it.
ui/request-display-modeInline or fullscreen. The host's own exit button and Escape always leave fullscreen.
ui/initialize, pingThe handshake, which carries the product's theme so the app can match light or dark.

A tool marked visibility: ["app"] is app-only: the app may call it, and the model is never offered it.

Governance on every call

Try it: the Sales Chart Demo

The repository carries a small MCP server with one app, a regional sales bar chart, so you can see all of this in a real chat. In a local compose stack:

  1. Start it: docker compose -f infra/docker-compose.workload.yml up -d --no-deps mcp-app-demo.
  2. Seed one organization (the user must be an org_admin): docker exec trellis-api-1 python scripts/seed_mcp_app_demo.py you@example.com. It registers the server, approves the app, switches MCP Apps on for that org and creates a personal agent, Sales Chart Demo.
  3. Open the product at http://localhost:3000 (the sandbox is 127.0.0.1:3100, which must be a different host), chat with Sales Chart Demo and ask "show EMEA sales".

On the card, the region buttons call an app-only tool through the governed endpoint, Ask about this chart fills the composer, and Full screen asks the host for fullscreen. Change the app's HTML and restart the server to see drift: the card stops rendering until the seed script approves it again.