Expand description
Typed server support for the stable MCP Apps extension (SEP-1865).
This module deliberately separates compile-time availability from runtime activation:
- enable the
mcp-appsCargo feature to compile these APIs; - call
McpRouter::with_mcp_appsorMcpClientBuilder::with_mcp_appsto declare support on the wire; - check
RequestContext::supports_mcp_appsbefore applying extension-specific behavior.
UI resources built here use the required ui:// scheme and
text/html;profile=mcp-app MIME type. External CSP sources are restricted
to origins: credentials, paths, queries, fragments, and unsupported schemes
are rejected.
See crate::guides::mcp_apps for the task-oriented setup, security
boundary, CSP and permissions policy, and visibility guidance.
Structs§
- McpApp
Domain - A validated host-dependent dedicated sandbox domain.
- McpApp
Html - A minimally validated complete HTML5 document.
- McpApp
Resource Builder - Builder for one predeclared raw-HTML MCP Apps resource.
- McpApp
Uri - A validated MCP Apps resource identifier.
- McpApps
Capability Settings - Capability settings advertised for MCP Apps.
- McpUi
Permissions - Browser permissions requested by an MCP App.
- McpUi
Resource Csp - Content Security Policy inputs declared by an MCP Apps resource.
- McpUi
Resource Meta - Rendering and security metadata for a UI resource.
- McpUi
Tool Meta - MCP Apps metadata attached to a tool definition.
Enums§
- McpApp
Error - A validation or construction error from the typed MCP Apps API.
- McpUi
Tool Visibility - Who may see or call a UI-linked tool.
Constants§
- MCP_
APPS_ EXTENSION_ ID - Stable extension identifier reserved for MCP Apps.
- MCP_
APP_ HTML_ MIME_ TYPE - The only content type defined by the stable MCP Apps MVP.
Functions§
- mcp_
app_ tool_ result - Construct an Apps-friendly tool result with a useful text-only fallback.
- mcp_
apps_ extension - Build the validated core extension declaration for MCP Apps.