Publish governed MCP Apps
Version interactive UI as a Telvine plugin component, with group policies, review, CSP declarations and MCP Apps delivery.
Telvine publishes MCP Apps as mcp_app plugin components. The UI bundle, text fallback and CSP origins belong to an immutable plugin version. The /mcp endpoint exposes launch tools and ui:// resources after checking runtime identity and the current stable release.
Read what MCP Apps are and examples for the protocol and use cases.
Package a UI component
Keep your existing .claude-plugin/plugin.json or .codex-plugin/plugin.json. Add a Telvine-specific packaging file, telvine.apps.json, at the plugin root:
{
"apps": [{
"name": "budget-planner",
"title": "Budget planner",
"description": "Explore budget allocations in an interactive view.",
"entrypoint": "ui/budget-planner.html",
"fallback": "Remaining budget = total budget minus allocated amounts. Compare scenarios before acting.",
"csp": { "connectDomains": [], "resourceDomains": [] },
"prefersBorder": true
}]
}
telvine.apps.json is not an Agent Skills field or a requirement of the MCP Apps protocol. It tells the Telvine publisher how to inventory and store your UI components.
Build a complete HTML5 document at the entrypoint before publishing. Bundle your JavaScript, styles and the MCP Apps SDK into the HTML so a restrictive host can load it without a CDN. React and other frontend frameworks can be used at build time. Telvine serves the resulting artifact; it does not execute uploaded server code or run the frontend build.
Entrypoints must be relative HTML paths under ui/. Symlinks and traversal are rejected. A release may contain up to 20 apps, with at most 1 MB of HTML per app and 4 MB of encoded app bundle data in total. The publisher calculates a SHA-256 hash of the HTML; the API validates it.
Publish, evaluate and release
npm i -g @telvine/cli
telvine login
telvine publish ./my-plugin --version 1.0.0
# Run a real plugin regression/holdout suite in your controlled environment.
telvine eval run ./my-plugin --suite outcomes --plugin-id plg_yourpluginid \
--version 1.0.0 --engine-version <your-installed-promptfoo-version>
# Review HTML, fallback and CSP in Dashboard → Governance.
telvine plugins review plg_yourpluginid --version 1.0.0
# A different organization administrator approves when enforcement is enabled.
telvine plugins review plg_yourpluginid --version 1.0.0 --action approve
telvine plugins release plg_yourpluginid --version 1.0.0
Versions containing UI start as drafts. Changing HTML, CSP, fallback or app metadata requires a new plugin version. Publishing a draft preserves the current live version. Stable promotion checks the plugin's required eval suites and, when configured, independent approval. A version with no release eval evidence cannot become stable.
The review covers the whole plugin version and its UI bundle. An eval result means what the configured cases and graders actually test: a passing text-only suite is not proof that a frontend renders. Test the interface in the hosts you intend to support and include the relevant checks in your release policy.
Govern UI access
In Dashboard → Governance → Governed MCP Apps, choose the plugin's UI audience:
- Everyone authenticated in the organization.
- Members of selected Entra groups.
UI policies apply to every MCP App in that plugin. Attached skills retain their separate skill access policies. Skill-scoped read keys cannot launch or read plugin UI; plugin-scoped keys are restricted to that plugin. An Entra-enabled organization requires verified Entra identity at runtime, as described in governed skills setup.
Every discovery, launch and UI resource read checks identity, group policy, the live stable version and required approval. A stale cached tool or URI cannot retrieve an older release after it is demoted or replaced. Reconnect or refresh tools after releases and access changes; the endpoint does not send live list-change notifications.
Administrative inspection shows HTML as source text, along with the fallback, hash and CSP. It does not execute the app inside the management dashboard. General version APIs return app metadata without HTML, so read keys cannot bypass runtime resource access checks.
Negotiate UI support
A host advertises:
{
"capabilities": {
"extensions": {
"io.modelcontextprotocol/ui": {
"mimeTypes": ["text/html;profile=mcp-app"]
}
}
}
}
Telvine returns a Mcp-Session-Id for UI-capable connections. Send that header with subsequent requests. The session is identity-bound, expires after 24 hours and stores capability state only. Reinitialize when it expires; DELETE /mcp with the valid session header terminates it. Native clients can omit Origin; browser clients need an origin permitted by MCP_ALLOWED_ORIGINS.
tools/list includes a version-specific launch tool for each permitted app. With UI support negotiated, _meta.ui.resourceUri points at the version-specific ui://telvine/... resource. resources/read returns the HTML using text/html;profile=mcp-app and the published CSP metadata.
Without negotiated UI support, the same launch tool returns its published text fallback and no UI metadata. UI resources are not listed for those clients. Hosts must support the Apps extension to render the view; ordinary MCP tool support is not sufficient.
Pass data to the view
Launch tools accept an optional data object. Telvine returns it in structuredContent.data, together with plugin ID, plugin version, app name and an opaque delivery ID. The host forwards the result to the view through the Apps bridge. Telvine does not persist data or put it in telemetry.
This launch path does not implement your external business APIs. A production app can use appropriate backend tools or explicitly allowed network services, each with its own authorization. Never embed Bearer tokens or secrets in the published HTML. Granting UI access does not authorize invoice approval, payment or another consequential action.
CSP and sandboxing
The published csp.connectDomains and csp.resourceDomains accept explicit HTTPS origins; connection origins can also use WSS. Paths, wildcards and embedded credentials are rejected. Empty lists mean no external access. This release does not enable nested frames, custom base URIs or camera/microphone/location permissions.
The host must enforce CSP inside its sandbox and may further restrict it. Telvine supplies the reviewed declarations; it cannot override a host's restrictions. Prefer bundled code: bytes fetched from an allowed external origin are outside the immutable HTML artifact and may change independently.
Metadata-only telemetry
A launch emits plugin.component.invoked with component_type: "mcp_app" and the exact plugin version. This records a launch request, not a confirmed render or completed task. Resource prefetches do not count as invocations.
If the view detects an error after receiving its launch result, it can request telvine_report_app_error through the host, passing only delivery_id. Telvine verifies receipt ownership and records one plugin.component.error per delivery. Raw error strings, HTML, data objects, prompts, tool arguments and model outputs are excluded. No business success event is inferred from opening an app.
Runnable example
The repository includes examples/mcp-app-plugin, a local budget calculator built with the official Apps SDK. Build it with npm install && npm run build from that directory, publish it, then follow the release process above. It has no external API dependencies and performs no transactions.
The official MCP Apps examples include maps, PDF viewers, scenario modelers and analytics displays. They are useful references for building your own governed UI component.