Merge pull request #159 from modelcontextprotocol/martinalong/mcp-apps/custom-fonts

[MCP Apps] Add way to pass custom fonts
This commit is contained in:
Anton Pidkuiko 2025-12-17 17:45:54 +07:00 • committed by GitHub
commit 242ec23856
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -285,6 +285,17 @@ export const McpUiToolCancelledNotificationSchema = z.object({
}),
});
/**
* @description CSS blocks that can be injected by apps.
*/
export const McpUiHostCssSchema = z.object({
/** @description CSS for font loading (@font-face rules or @import statements). Apps must apply using applyHostFonts(). */
fonts: z
.string()
.optional()
.describe("CSS for font loading (@font-face rules or"),
});
/**
* @description Style configuration for theming MCP apps.
*/
@ -293,6 +304,10 @@ export const McpUiHostStylesSchema = z.object({
variables: McpUiStylesSchema.optional().describe(
"CSS variables for theming the app.",
),
/** @description CSS blocks that apps can inject. */
css: McpUiHostCssSchema.optional().describe(
"CSS blocks that apps can inject.",
),
});
/**