npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@frontmcp/uipack

v0.7.2

Published

FrontMCP UIpack - Bundling, build tools, and platform adapters for MCP UI development (React-free core)

Readme

@frontmcp/uipack

React-free build utilities, theming, runtime helpers, and platform adapters for FrontMCP UI development. @frontmcp/uipack powers HTML string templates, cacheable widgets, and discovery metadata without pulling React or DOM libraries into your server.

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 dependency) |

Install @frontmcp/uipack when you need HTML-first tooling, template validation, or platform adapters. Install @frontmcp/ui alongside it for ready-made components.

Installation

npm install @frontmcp/uipack
# or
yarn add @frontmcp/uipack

Features

  • Theme system – Configure Tailwind-style palettes, fonts, and CDN assets, then inline or externalize scripts per platform.
  • Build API – Compile tool templates with esbuild/SWC, emit static widgets, and ship cached manifests for serverless environments.
  • Build modes – Choose static, dynamic, or hybrid rendering plus multi-platform bundler helpers so the same widget rehydrates on OpenAI, Claude, and Gemini.
  • Runtime helpers – Wrap HTML/React/MDX templates with CSP, sanitize user content, and expose MCP Bridge metadata.
  • Platform adapters – Generate OpenAI/Claude/Gemini discovery metadata, resolve serving modes, and understand host capabilities.
  • Validation – Extract schema paths, validate Handlebars templates, and render error boxes before code hits production.
  • Bundler/cache – File-system and Redis caches, transpile/render caches, and hashing utilities for incremental builds.

Quick Start

Theme + layout utilities

import { DEFAULT_THEME, createTheme, buildCdnScriptsFromTheme } from '@frontmcp/uipack/theme';

const customTheme = createTheme({
  name: 'brand',
  colors: {
    semantic: {
      primary: '#0BA5EC',
      secondary: '#6366F1',
    },
  },
});

const scripts = await buildCdnScriptsFromTheme(customTheme, { inline: true });

Build tool UI HTML

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',
});

console.log(result.html);

Wrap tool responses with MCP metadata

import { wrapToolUI, createTemplateHelpers } from '@frontmcp/uipack/runtime';

The helpers = createTemplateHelpers();
const html = `<div>${helpers.escapeHtml(ctx.output.summary)}</div>`;

const response = wrapToolUI({
  html,
  displayMode: 'inline',
  servingMode: 'auto',
  widgetDescription: 'Summarized status card',
});

Resolve platform capabilities

import { getPlatform, canUseCdn, needsInlineScripts } from '@frontmcp/uipack/theme';

const claude = getPlatform('claude');
const inline = needsInlineScripts(claude);
const cdnOk = canUseCdn(claude);

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 |

Template validation

import { validateTemplate } from '@frontmcp/uipack/validation';
import { z } from 'zod';

const outputSchema = z.object({
  temperature: z.number(),
  city: z.string(),
});

const result = validateTemplate('<div>{{output.city}}</div>', outputSchema);
if (!result valid) {
  console.warn(result.errors);
}

Cache + bundler helpers

import { createFilesystemBuilder } from '@frontmcp/uipack/bundler/file-cache';

const builder = await createFilesystemBuilder('.frontmcp-cache/builds');
const manifest = await builder.build({ entry: './widgets/weather.tsx' });

Development

yarn nx build uipack
yarn nx test uipack

Related packages

License

Apache-2.0