A UI resource for MCP Apps (Model Context Protocol Apps extension).
UI resources serve static HTML files that are rendered in sandboxed iframes by MCP hosts
(like Claude Desktop). They are linked to tools via _meta.ui.resourceUri and provide
interactive interfaces for tool results.
Example
mcp_resources do
mcp_ui_resource :estimates_list, "ui://estimates/list.html",
html_path: "priv/mcp_apps/estimates.html"
mcp_ui_resource :dashboard, "ui://dashboard.html",
html_path: "priv/mcp_apps/dashboard.html",
csp: [connect_domains: ["api.example.com"]],
permissions: [camera: true]
endThe HTML file at html_path is read at request time and returned with MIME type
text/html;profile=mcp-app.
See MCP Apps spec.
Summary
Functions
Returns the fixed MIME type for MCP App UI resources.