fonts

September 11, 2026 ยท View on GitHub

List the local fonts available on this machine (macOS only). These family names are valid fontFamily values on ; each family lists its variants.

MCP toolfonts
CLIdapi fonts [options]

Input

FieldTypeCLIDescription
familystring-f, --family <pattern>filter to families whose name contains this (case-insensitive)
weightsstring[]-w, --weights <weights...>filter to variants with the given CSS weights, e.g. ["400", "700"]
style"normal" | "italic"-s, --style <style>filter to variants with the given style, normal or italic
limitinteger-l, --limit <n>return at most this many families (default: 50)

Font families listed here are valid fontFamily values on <text>; see jsx/fonts.md for how a family and variant are named in a composition, and context for the families the open project has actually registered. Runs in the app's main process, so no project needs to be open.

A machine has hundreds of families, so filter by family when looking for one. total counts every family the filters match; when it is larger than families.length, the limit cut the list.

Output

One JSON object:

{
  families: Array<{
    family:   string;
    variants: Array<{
      weight: string;            // CSS weight, e.g. "400"
      style:  "normal" | "italic";
      source: string;            // CSS local() source
    }>;
  }>;
  total: number;                 // families matching the filters, before the limit
}