Skip to content

@maxhealth.tech/prefab / mcp / ViewerResourceOptions

Interface: ViewerResourceOptions

Defined in: mcp/resource.ts:248

Properties

uri?

ts
optional uri?: string;

Defined in: mcp/resource.ts:250

Resource URI.

Default

ts
PREFAB_RESOURCE_URI

title?

ts
optional title?: string;

Defined in: mcp/resource.ts:252

Resource title.

Default

ts
'Prefab Viewer'

csp?

ts
optional csp?: McpAppCsp;

Defined in: mcp/resource.ts:254

CSP configuration.

Default

ts
{ resourceDomains: ['https://cdn.jsdelivr.net'] }

permissions?

ts
optional permissions?: McpAppPermissions;

Defined in: mcp/resource.ts:256

Permission Policy requests.


scripts?

ts
optional scripts?: string[];

Defined in: mcp/resource.ts:258

Additional <script> URLs to load after the renderer.


stylesheets?

ts
optional stylesheets?: string[];

Defined in: mcp/resource.ts:260

Additional <link rel="stylesheet"> URLs.


cdnBase?

ts
optional cdnBase?: string;

Defined in: mcp/resource.ts:262

Override CDN base URL (no trailing slash).


themeBridge?

ts
optional themeBridge?: "vscode";

Defined in: mcp/resource.ts:267

Inject a theme bridge stylesheet. 'vscode' makes the viewer follow the user's editor theme. See RendererHtmlOptions.themeBridge.


cache?

ts
optional cache?: McpCacheHint;

Defined in: mcp/resource.ts:272

Cache fields for the resources/read result (SEP-2549).

Default

ts
{ ttlMs: 86_400_000, cacheScope: 'public' }

declareCapability?

ts
optional declareCapability?: boolean;

Defined in: mcp/resource.ts:279

Declare the io.modelcontextprotocol/ui extension capability on the server (SEP-2133). Must happen before the server connects; a server that is already connected keeps its existing capabilities and a warning is logged.

Default

ts
true

Released under the MIT License.