Ship HTML-first consent, status, and orchestration screens with @frontmcp/ui and @frontmcp/uipack.
The FrontMCP UI packages provide a platform-aware HTML component system designed for LLM surfaces. They render complete markup (no React runtime required) and ship a Tailwind v4 theme system, page templates, and OpenAI App widgets so you can style consent screens, troubleshooting pages, or CodeCall dashboards inside any MCP server.
Package responsibilities:
@frontmcp/ui provides HTML components (/components), layouts (/layouts), widgets (/widgets), and React components (/react)
@frontmcp/uipack provides theming (/theme), page templates (/pages), and build utilities
Wrap content with baseLayout, then mix components such as card and button. Everything resolves to HTML strings you can hand to an MCP resource or auth callback.
import { baseLayout } from '@frontmcp/ui/layouts';import { card, button } from '@frontmcp/ui/components';import { DEFAULT_THEME } from '@frontmcp/uipack/theme';const content = card( ` <h2 class="text-lg font-semibold">CRM Access</h2> <p>Grant the CodeCall orchestrator access to customer data.</p> ${button('Approve', { variant: 'primary', type: 'submit' })}`, { variant: 'elevated' },);const html = baseLayout(content, { title: 'Authorize CRM', description: 'Let the agent read CRM data for this session.', theme: DEFAULT_THEME, width: 'md', align: 'center', scripts: { tailwind: true },});
Send html as the body of an MCP resource, OAuth consent page, or even an email.
Use createTheme to adjust palettes, typography, and CDN endpoints. Then decide whether to inline scripts (Claude Artifacts) or load from the network (OpenAI, Gemini).
Claude Artifacts and other restricted environments block outbound requests. Call fetchAndCacheScriptsFromTheme during build, then inline the cached scripts with buildCdnScriptsFromTheme(..., { inline: true }).
Components validate input with Zod. When something is wrong, the library renders a compact error box that lists the component name and the failed property—perfect for catching mistakes before you ship.
import { button } from '@frontmcp/ui/components';const ok = button('Continue', { variant: 'primary' });// Invalid variant => returns an error markup instead of throwingconst broken = button('Continue', { variant: 'purple' as any });
Validation errors render in development and production. Keep an eye on your previews to ensure you only ship supported variants and attributes.
The @frontmcp/ui/widgets module exposes OpenAI App SDK components (resource pickers, action lists) plus status badges, progress indicators, and table helpers. Pair this guide with the CodeCall CRM demo to see the library inside a full orchestration workflow, or expose the HTML through an MCP resource for your own consent flows.