@frontmcp/uipack
v0.12.2
Published
FrontMCP UIpack - Bundling, build tools, and platform adapters for MCP UI development (React-free core)
Downloads
17,885
Maintainers
Readme
@frontmcp/uipack
React-free build utilities, theming, runtime helpers, and platform adapters for FrontMCP UI development.
Package Split
| Package | Purpose | React Required |
| ------------------ | --------------------------------------------------------------------- | -------------- |
| @frontmcp/uipack | Themes, runtime helpers, build/render pipelines, validation, adapters | No |
| @frontmcp/ui | HTML/React components, layouts, widgets, web components | Yes (peer dep) |
Install
npm install @frontmcp/uipackFeatures
- Theme system — Tailwind-style palettes, fonts, CDN assets, platform-aware inlining (docs)
- Build API — compile tool templates with esbuild/SWC, emit static widgets, cached manifests (docs)
- Build modes — static, dynamic, or hybrid rendering; multi-platform bundler helpers (docs)
- Runtime helpers — wrap HTML/React/MDX with CSP, sanitize content, expose MCP Bridge metadata (docs)
- Platform adapters — OpenAI/Claude/Gemini discovery metadata, serving modes, host capabilities (docs)
- Validation — schema path extraction, Handlebars template validation, error boxes (docs)
- Bundler/cache — filesystem and Redis caches, transpile/render caches, hashing utilities (docs)
Quick Example
import { buildToolUI } from '@frontmcp/uipack/build';
const result = await buildToolUI({
template: '<div>{{output.temperature}} C</div>',
context: { input: { location: 'London' }, output: { temperature: 18 } },
platform: 'openai',
});Full guide: UI Overview
Entry Points
| Path | Purpose |
| ----------------------------- | -------------------------------------------------------- |
| @frontmcp/uipack/theme | Theme system, platform definitions, CDN helpers |
| @frontmcp/uipack/runtime | MCP Bridge runtime, CSP utilities, sanitizers |
| @frontmcp/uipack/build | Build API, static widget compiler, serving-mode resolver |
| @frontmcp/uipack/adapters | Discovery metadata + platform adapters |
| @frontmcp/uipack/pages | Prebuilt page templates (consent/error/success) |
| @frontmcp/uipack/validation | Component + template validation helpers |
| @frontmcp/uipack/bundler | esbuild/SWC bundler and cache utilities |
| @frontmcp/uipack/registry | Tool UI registry, URI helpers, render functions |
| @frontmcp/uipack/types | Shared template/context types |
| @frontmcp/uipack/utils | Escaping, safe stringify, helper utilities |
Docs
| Topic | Link | | ----------------- | ------------------------------- | | Overview | UI Overview | | Theme system | Theming | | Build API | Build Tools | | Build modes | Build Modes | | Runtime helpers | Runtime | | Platform adapters | Adapters | | Validation | Validation | | Bundler | Bundler |
Related Packages
@frontmcp/ui— React components that consume these helpers@frontmcp/sdk— core framework and decorators@frontmcp/testing— UI assertions for automated testing
License
Apache-2.0 — see LICENSE.
