Table of Contents

Class McpUiResourceMeta

Namespace
ModelContextProtocol.Extensions.Apps
Assembly
ModelContextProtocol.Extensions.Apps.dll

Represents the UI metadata associated with an MCP resource in the MCP Apps extension.

[Experimental("MCPEXP003", UrlFormat = "https://github.com/modelcontextprotocol/csharp-sdk/blob/main/docs/list-of-diagnostics.md#mcpexp003")]
public sealed class McpUiResourceMeta
Inheritance
McpUiResourceMeta
Inherited Members

Remarks

This metadata is placed under the ui key in the resource's _meta object. It provides Content Security Policy (CSP) configuration, sandbox permissions, CORS origin, and visual boundary preferences for the UI resource served by this MCP server.

Properties

Csp

Gets or sets the Content Security Policy configuration for this resource.

[JsonPropertyName("csp")]
public McpUiResourceCsp? Csp { get; set; }

Property Value

McpUiResourceCsp

Remarks

Specifies the allowed origins for network requests, resource loads, and nested frames.

Domain

Gets or sets the dedicated origin domain for this resource.

[JsonPropertyName("domain")]
public string? Domain { get; set; }

Property Value

string

Remarks

When set, the host will serve the resource from this dedicated origin, enabling OAuth flows and CORS without wildcard exceptions.

Permissions

Gets or sets the sandbox permissions for this resource.

[JsonPropertyName("permissions")]
public McpUiResourcePermissions? Permissions { get; set; }

Property Value

McpUiResourcePermissions

Remarks

Controls which browser sandbox features the UI resource is allowed to use.

PrefersBorder

Gets or sets a value indicating whether the host should render a visual border around the UI.

[JsonPropertyName("prefersBorder")]
public bool? PrefersBorder { get; set; }

Property Value

bool?