Module: ActionMCP::Apps

Defined in:
lib/action_mcp/apps.rb,
lib/action_mcp/apps/view_manifest.rb

Overview

Constants and helpers for the MCP Apps extension (ext-apps, SEP-1865, stable 2026-01-26). See: https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx

Defined Under Namespace

Modules: Views Classes: ViewManifest

Constant Summary collapse

EXTENSION_KEY =
"io.modelcontextprotocol/ui"
VISIBILITY_VALUES =
%w[model app].freeze
URI_SCHEME =
%r{\Aui://\S+\z}
MIME_TYPE =
MimeTypes::APP_HTML
EXTENSION_SETTINGS =
{ mimeTypes: [ MIME_TYPE ] }.freeze
UI_META_KEYS =

_meta.ui fields and nested CSP directive keys per ext-apps spec.

%i[csp permissions domain prefersBorder].freeze
CSP_KEYS =
%i[connectDomains resourceDomains frameDomains baseUriDomains].freeze
PERMISSION_KEYS =
%i[camera microphone geolocation clipboardWrite].freeze
CONNECT_ORIGIN_PATTERN =

The stable MCP Apps spec allows WebSocket endpoints for connect-src only.

%r{\A(?:https?|wss?)://[^\s"'<>]+\z}
RESOURCE_ORIGIN_PATTERN =
%r{\Ahttps?://[^\s"'<>]+\z}
BRIDGE_PACKAGE =

Vendored browser bridge: the official self-contained ESM bundle from @modelcontextprotocol/ext-apps (app-with-deps export). Refresh with bin/update-apps-bridge.

"@modelcontextprotocol/ext-apps"
BRIDGE_VERSION =
"1.7.4"
BRIDGE_PATH =
File.expand_path("apps/javascript/ext_apps.js", __dir__)

Class Method Summary collapse