Scan your whole stack
Are you using @frontmcp/ui?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.13.0-rc.2
@frontmcp/ui was last scanned on 26 Nov 2026 at version 1.13.0-rc.2. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.13.0-rc.2 LATEST | 26 Nov 2026 | No rules fired |
| 1.13.0-rc.1 | 26 Nov 2026 | No rules fired |
| 1.12.3 | 24 Nov 2026 | No rules fired |
| 1.12.2 | 14 Nov 2026 | Not shown |
| 1.12.1 | 13 Nov 2026 | Not shown |
Findings for v1.13.0-rc.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.13.0-rc.2; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
@frontmcp/ui is the React side of FrontMCP widgets: the UI a tool shows inside an AI host such as ChatGPT or Claude. You write a widget as a React component in a file of its own and point the tool's ui.template at it; FrontMCP bundles the file, wraps it in McpBridgeProvider and mounts it with the call's data. This package gives that component hooks that read the call and call tools through the host, eleven components built on MUI (Material UI), a theme, and renderers for content such as charts, PDFs, maps and diagrams. A widget written as an HTML template doesn't need it (Tools with a UI). To make a React app that an agent can drive, use @frontmcp/react instead.
npm install @frontmcp/ui react react-dom @mui/material @emotion/react @emotion/styled
McpBridgeProvider from @frontmcp/ui/react.react and react-dom 18 or 19, @mui/material 7, 8 or 9, and @emotion/react and @emotion/styled 11. npm 7 and later install them with the package, along with @types/react and @types/react-dom.esbuild, an optional peer of @frontmcp/uipack that nothing installs for you. A project from frontmcp create has it; anywhere else, run npm install esbuild and keep it a dependency, not a dev dependency, since it's loaded when the tool is called.The renderers' libraries are optional peers, not installed with the package:
| Renderer | Entry point | Optional peers |
|---|---|---|
| Charts | @frontmcp/ui/renderer/charts |
recharts |
@frontmcp/ui/renderer/pdf |
react-pdf, pdfjs-dist |
|
| Flow diagrams | @frontmcp/ui/renderer/flow |
@xyflow/react |
| Maps | @frontmcp/ui/renderer/maps |
react-leaflet, leaflet |
| Mermaid diagrams | @frontmcp/ui/renderer/mermaid |
mermaid |
| Math | @frontmcp/ui/renderer/math |
katex |
| Video and audio | @frontmcp/ui/renderer/media |
react-player |
| Markdown and MDX | @frontmcp/ui/renderer/mdx |
react-markdown, remark-gfm, rehype-highlight, rehype-raw |
| HTML | @frontmcp/ui/renderer/html |
dompurify; without it the HTML is shown escaped |
| CSV, images, React JSX | /renderer/csv, /renderer/image, /renderer/react |
None. JSX is compiled with Babel, loaded from esm.sh. |
Each renderer loads its library at runtime, the first time it renders: by package name where the page can resolve it (an installed peer under Node or a dev server, or an import map), and otherwise from esm.sh in the browser. The stylesheets for maps, math and flow diagrams, and the PDF.js worker, always come from esm.sh.
Point the tool's ui.template at the widget file with an absolute path:
import { join } from 'node:path';
import { Tool, ToolContext, z } from '@frontmcp/sdk';
@Tool({
name: 'get_weather',
description: 'Current weather for a city',
inputSchema: { city: z.string() },
outputSchema: { city: z.string(), tempC: z.number(), conditions: z.string() },
ui: { template: { file: join(__dirname, 'weather.widget.tsx') } },
})
export class GetWeather extends ToolContext {
async execute({ city }: { city: string }) {
return { city, tempC: 21, conditions: 'Sunny' };
}
}
Export the component as the default from weather.widget.tsx:
import { Badge, Card } from '@frontmcp/ui/components';
import { FrontMcpThemeProvider } from '@frontmcp/ui/theme';
type Weather = { city: string; tempC: number; conditions: string };
export default function WeatherWidget({ output }: { output: Weather | null }) {
if (!output?.city) return <p>Loading…</p>;
return (
<FrontMcpThemeProvider>
<Card title={output.city} subtitle="Current weather">
<p>{output.tempC}°C</p>
<Badge label={output.conditions} variant="success" />
</Card>
</FrontMcpThemeProvider>
);
}
The widget gets three props: output, input and loading. Check for a field you need, like output?.city, rather than for output: a failed result's error text is truthy too. In an ES module server, use join(import.meta.dirname, 'weather.widget.tsx'). Name widget files *.widget.tsx and leave them out of the server's own tsc build; frontmcp build copies them into its output. Building a widget file covers relative paths, resourceMode and what each host gets.
import { useCallTool } from '@frontmcp/ui/react';
type Weather = { city: string; tempC: number };
export default function Refreshable({ output }: { output: Weather | null }) {
const [refresh, { data, loading, error }] = useCallTool<{ city: string }, Weather>('get_weather');
const weather = data?.structuredContent ?? (output?.city ? output : null);
return (
<div>
<p>{weather ? `${weather.city}: ${weather.tempC}°C` : 'No data yet'}</p>
<button disabled={loading} onClick={() => refresh({ city: 'Bergen' })}>
Bergen
</button>
{error && <p role="alert">{error.message}</p>}
</div>
);
}
useCallTool() returns an array, not an object. call(args) asks the host to call the tool and resolves with the host's whole result, so the tool's output is in data.structuredContent. A tool that fails usually comes back as a result with isError: true in data; error is for calls that couldn't be made, like Tool calls not supported on this platform (ext-apps) from a host that never answered the handshake.
| Import | What's in it |
|---|---|
@frontmcp/ui/react |
McpBridgeProvider and the hooks. @frontmcp/ui exports them too, with the bridge. |
@frontmcp/ui/components |
The eleven components. Each also has its own entry point, like @frontmcp/ui/components/Card. |
@frontmcp/ui/theme |
FrontMcpThemeProvider, createFrontMcpTheme, defaultTheme, darkTheme, useFrontMcpTheme. |
@frontmcp/ui/renderer |
ContentView, renderContent, detectContentType, registerAllRenderers, registerRenderer, and every renderer. Each renderer also has its own entry point; /renderer/common has the shared helpers. |
@frontmcp/ui/bridge |
The bridge as a class, FrontMcpBridge and createBridge(), with its adapters and generateBridgeIIFE(), for pages FrontMCP doesn't build. |
@frontmcp/ui/runtime |
detectContentType, and transpileJsx() with the Babel loader it uses. |
@frontmcp/ui/auth, @frontmcp/ui/auth/vanilla |
Components and helpers for a custom login UI; the vanilla entry has no React. |
A widget file is already inside McpBridgeProvider. Outside a provider the hooks return empty values, and call() fails with Bridge not initialized.
| Hook | Returns |
|---|---|
useToolOutput<T>() |
The call's output: the output embedded in the page, then each result the host sends. |
useToolInput<T>() |
The call's arguments. |
useStructuredContent<T>() |
The structuredContent of the result the host sent; empty until one arrives. |
useCallTool<In, Out>(name, options?) |
[call, { data, loading, error, called }, reset]. Options: onSuccess, onError, resetOnToolChange (default true). |
useToolCalls({ key: toolName, ... }) |
{ key: { call, data, loading, error, reset }, ... }: useCallTool for several tools. |
useSendMessage() |
[send(text), { loading, error, sent }]: adds a message to the conversation, where the host allows it. |
useOpenLink() |
open(url), through the host. |
useTheme(), useDisplayMode() |
"light" or "dark", and "inline", "fullscreen" or "pip", as the host reports them. |
useHostContext() |
What the host said about itself: { theme, displayMode, locale, userAgent, safeArea, viewport?, ... }. |
useCapability(name) |
Whether the host can do name, like "canCallTools". false until the host answers the handshake. |
useMcpBridge(), useMcpBridgeContext() |
The bridge, and { bridge, loading, error, ready, adapterId, capabilities, revision }. |
@frontmcp/ui/components are React components built on MUI. Put them inside FrontMcpThemeProvider.
| Component | Main props | Renders |
|---|---|---|
Button |
variant (primary, secondary, danger, ghost), size, loading, disabled, onClick |
An MUI Button; loading adds a spinner. |
Card |
title, subtitle, headerActions, footer, elevation, clickable, slotProps |
An MUI Card. |
Alert |
severity, title, dismissible, onDismiss, icon |
An MUI Alert. |
Badge |
label (required), variant, size, dot, removable, onRemove |
An MUI Chip. |
Avatar |
src, alt, size, variant |
An MUI Avatar. |
Modal |
open and onClose (required), title, actions, maxWidth, slotProps |
An MUI Dialog. |
Table |
columns ({ key, label, align? }[]), rows, size, stickyHeader, maxHeight |
An MUI Table. |
TextField |
label, value, onChange(value), type, multiline, error, helperText |
An MUI TextField; onChange gets the value. |
Select |
options ({ value, label }[]), label, value, onChange(value) |
An MUI select field. |
List |
items ({ id, primary, secondary?, icon?, onClick?, divider? }[]), dense |
An MUI List. |
Loader |
variant (spinner, bar, skeleton, overlay), label, determinate, value |
A spinner, progress bar, skeleton or backdrop. |
LoaderProvider replaces every Loader under it with your own render function. The theme comes from createFrontMcpTheme({ palette?, typography?, shape?, mode? }), or the ready-made defaultTheme and darkTheme, passed to FrontMcpThemeProvider as theme.
import { ContentView, registerAllRenderers } from '@frontmcp/ui/renderer';
registerAllRenderers();
export function Report({ content }: { content: string }) {
return <ContentView content={content} />;
}
ContentView detects the kind of content in a string, such as CSV, a Mermaid diagram, a chart's JSON or an image URL, and renders it with the matching renderer, wrapped in Suspense. renderContent(content, options?) does the same without the Suspense boundary, and detectContentType(content) only names the kind. When more than one renderer matches, the higher priority wins, in this order: pdf, chart, flow, map, mermaid, math, image, video, audio, csv, jsx, mdx, html. registerRenderer() adds your own { type, priority?, canHandle(content), render(content, options?) }.
ui option: every option of a tool's widget, serving modes, Content Security Policy@frontmcp/sdk: the server framework; a tool's ui option comes from it.@frontmcp/uipack: the React-free core that builds every widget page on the server, with the html template helpers.@frontmcp/testing: test helpers, with matchers for a tool's rendered widget.@frontmcp/react: hooks and components for running a FrontMCP server inside a React app.Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.