@maxhealth.tech/prefab / mcp / rendererHtml
Function: rendererHtml()
ts
function rendererHtml(options?): string;Defined in: mcp/resource.ts:216
Generate the HTML page for a prefab MCP Apps viewer resource.
Returns the minimal HTML that loads prefab.css and renderer.auto.min.js from the CDN, plus any additional scripts/stylesheets you specify.
Parameters
| Parameter | Type |
|---|---|
options? | RendererHtmlOptions |
Returns
string
Example
ts
import { rendererHtml } from '@maxhealth.tech/prefab/mcp'
const html = rendererHtml()
// or with extra scripts:
const html = rendererHtml({ scripts: ['https://cdn.example.com/plugin.js'] })
// inside VS Code, to follow the user's editor theme:
const html = rendererHtml({ themeBridge: 'vscode' })