turul_mcp_ext_apps/lib.rs
1//! # MCP Apps Extension (`io.modelcontextprotocol/ui`, SEP-1865)
2//!
3//! Spec-neutral host crate for the MCP-side surface of the Apps extension:
4//! UI views embedded in AI chat hosts, served by MCP servers as `ui://`
5//! resources and linked from tools via `_meta.ui`.
6//!
7//! Scope: this crate binds what an MCP **server** declares —
8//! - the client capability shape under `capabilities.extensions`
9//! ([`UiClientCapabilities`], identifier [`EXTENSION_IDENTIFIER`])
10//! - tool `_meta.ui` metadata ([`UiToolMeta`]: `resourceUri`, `visibility`)
11//! - UI-resource `_meta.ui` metadata ([`UiResourceMeta`]: CSP, sandbox
12//! permissions, dedicated origin, border preference)
13//!
14//! The host↔view iframe protocol (`ui/*` methods over postMessage) belongs to
15//! app/host SDKs and is deliberately not bound here.
16//!
17//! The Apps protocol versions independently of core MCP (current: 2026-01-26);
18//! this crate's `v2026_07_28` module names the CORE spec lane it pairs with.
19//! Schema provenance: `schema/README.md`.
20
21#[cfg(feature = "protocol-2026-07-28")]
22pub mod v2026_07_28;
23
24#[cfg(feature = "protocol-2026-07-28")]
25pub use v2026_07_28::{
26 EXTENSION_IDENTIFIER, EmptyObject, MCP_APP_HTML_MIME, META_KEY_UI, UiClientCapabilities,
27 UiResourceCsp, UiResourceMeta, UiResourcePermissions, UiToolMeta, UiToolVisibility,
28 client_supports_html_views, declared_by_client,
29};