MCP PHP SDK

McpApps implements ServerExtensionInterface

FinalYes

The MCP Apps extension (io.modelcontextprotocol/ui).

MCP Apps allows servers to expose interactive HTML UI applications as resources. Clients that support the extension render these in sandboxed iframes.

Enable on the server via Builder::enableExtension().

Tags
see
https://github.com/modelcontextprotocol/ext-apps
author

Christopher Hertel mail@christopher-hertel.de

Table of Contents

Interfaces

ServerExtensionInterface
A server-side MCP protocol extension advertised during capability negotiation.

Constants

EXTENSION_ID  : mixed = 'io.modelcontextprotocol/ui'
MIME_TYPE  : mixed = 'text/html;profile=mcp-app'
URI_SCHEME  : mixed = 'ui'

Methods

getCapabilities()  : array{mimeTypes: string[]}
The capability payload announced for this extension.
getId()  : string
The reverse-DNS identifier used as the key under `capabilities.extensions`.
resourceMarker()  : stdClass
The marker value for the `_meta.ui` field on a UI resource *descriptor* (its `resources/list` entry), flagging the resource as an MCP App.

Constants

EXTENSION_ID

public mixed EXTENSION_ID = 'io.modelcontextprotocol/ui'

MIME_TYPE

public mixed MIME_TYPE = 'text/html;profile=mcp-app'

URI_SCHEME

public mixed URI_SCHEME = 'ui'

Methods

getCapabilities()

The capability payload announced for this extension.

public getCapabilities() : array{mimeTypes: string[]}
Return values
array{mimeTypes: string[]}

getId()

The reverse-DNS identifier used as the key under `capabilities.extensions`.

public getId() : string
Return values
string

resourceMarker()

The marker value for the `_meta.ui` field on a UI resource *descriptor* (its `resources/list` entry), flagging the resource as an MCP App.

public static resourceMarker() : stdClass

The structured CSP/permissions metadata instead belongs on the resource content (the resources/read payload) via UiResourceContentMeta.

Return values
stdClass
On this page

Search results