fresnel-mcp

v0.2.2
fresnel-mcp Checked 2 days ago Published 1 month ago

MCP server for fresnel: let AI agents create, edit, preview and export Liquid Glass app icons (.icon bundles)

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

icon_create Create icon

Creates a new .icon bundle (Icon Composer format). background accepts "#RRGGBB", "gradient:#top,#bottom", "auto-gradient:#color", "automatic", "system-light", "system-dark" or a color string like "display-p3:1,0.5,0,1".

ParameterTypeDescription
path *stringBundle path, e.g. "MyApp.icon" (".icon" is added if missing). Relative paths are inside the first allowed root.
backgroundstringBackground fill for all appearances
dark_backgroundstringBackground override for the dark appearance
dry_runbooleanValidate and report the result without writing anything
overwritebooleanReplace an existing bundle. Default false
watchbooleanAlso target watchOS (circular). Default true

icon_inspect Inspect icon

Shows the groups, layers, attributes and per-appearance overrides of an .icon bundle.

ParameterTypeDescription
path *stringPath to the .icon bundle (".icon" is added if missing)

icon_add_group Add group

Adds a group. Groups carry the Liquid Glass settings (translucency, blur-material, specular, shadow, lighting).

ParameterTypeDescription
name *string
path *stringPath to the .icon bundle (".icon" is added if missing)
dry_runbooleanValidate and report the result without writing anything
indexinteger0 = frontmost (default)
propsobjectGroup attributes, e.g. {"translucency": {"enabled": true, "value": 0.5}, "blur-material": 0.3}

icon_add_layer Add layer

Adds an image layer to a group (the group is created if it does not exist). Provide either `svg` (inline SVG markup), `source` (path to an .svg/.png/.jpg file inside the allowed roots) or `png_base64`. Artwork should be a square, unmasked 1024×1024 canvas with a transparent background; it is placed at its natural size, centered.

ParameterTypeDescription
group *stringGroup name or #index. A missing group is created in front (index 0); use icon_move to reorder.
path *stringPath to the .icon bundle (".icon" is added if missing)
dry_runbooleanValidate and report the result without writing anything
file_namestringName to store in Assets/, e.g. "star.svg"
indexintegerPosition inside the group, 0 = frontmost (default)
namestringLayer name
png_base64string
propsobjectLayer attributes, e.g. {"glass": true, "opacity": 0.8, "fill": "#FFFFFF", "position": {"scale": 0.8, "translation-in-points": [0, -40]}}
sourcestringImage file path
svgstringInline SVG markup

icon_set Set attributes

Sets attributes on the document, a group or a layer. Pass `appearance` ("dark", or "tinted" = Mono in Icon Composer) and/or `platform` ("iOS", "macOS", "watchOS", "square" = iOS+macOS) to write a variant for only that case. Set a value to null to remove it (or to remove the override when `appearance` is given). See fresnel://schema/icon-json for keys and formats.

ParameterTypeDescription
path *stringPath to the .icon bundle (".icon" is added if missing)
props *objectkebab-case keys, e.g. {"translucency": {"enabled": true, "value": 0.6}, "specular": true}
target *string"document", "<Group>" or "<Group>/<Layer>" (names or #index)
appearancestring
dry_runbooleanValidate and report the result without writing anything
platformstring

icon_move Reorder

Moves a group or layer to a new index (0 = frontmost). Layers can move to another group with to_group.

ParameterTypeDescription
index *integer
path *stringPath to the .icon bundle (".icon" is added if missing)
target *string
dry_runbooleanValidate and report the result without writing anything
to_groupstring

icon_align Align or distribute

Aligns groups or layers by their bounding boxes (left, hcenter, right, top, vcenter, bottom), or spaces 3+ items evenly (distribute-horizontal, distribute-vertical). With one target, or basis "canvas", items align to the 1024 pt canvas. Only positions change.

ParameterTypeDescription
how *string
path *stringPath to the .icon bundle (".icon" is added if missing)
targets *array"<Group>" or "<Group>/<Layer>" (names or #index); all of the same kind
basisstringDefault: selection (canvas when there is one target)
dry_runbooleanValidate and report the result without writing anything
platformstringWrite the positions as a platform variant

icon_remove Remove group or layer

Removes a group or a layer. Unused assets are deleted from Assets/.

ParameterTypeDescription
path *stringPath to the .icon bundle (".icon" is added if missing)
target *string
dry_runbooleanValidate and report the result without writing anything

icon_validate Validate

Checks the icon against the schema and Apple HIG recommendations (square unmasked layers, opaque background, no text, variants, …).

ParameterTypeDescription
path *stringPath to the .icon bundle (".icon" is added if missing)

icon_render Render preview

Renders an approximate preview PNG of one appearance and returns it as an image. Optionally saves it with `out`.

ParameterTypeDescription
path *stringPath to the .icon bundle (".icon" is added if missing)
appearancestringDefault: "default". Mono in Icon Composer = clear-light / clear-dark / tinted-light / tinted-dark
light_anglenumberLight direction in degrees, 0 = top (default), -45 = top-left
maskstring
outstringSave the PNG to this path
platformstringDefault: iOS. watchOS renders a circle
sizeintegerPixels, default 512
tintstringTint color for tinted appearances, "#RRGGBB"

icon_render_sheet Render all appearances

Renders the six appearances (Default, Clear light, Tinted light / Dark, Clear dark, Tinted dark) side by side and returns the PNG.

ParameterTypeDescription
path *stringPath to the .icon bundle (".icon" is added if missing)
cellintegerCell size in pixels, default 240
outstring
tintstringTint color for tinted appearances, "#RRGGBB"

icon_export Export

Exports the icon. Formats: "icon" (copy of the .icon bundle for Xcode 26+ / Icon Composer), "icns" (macOS), "appiconset" (Xcode asset catalog with Dark and Tinted variants), "png" (PNG set per appearance and size). Raster formats use fresnel’s approximate renderer. Assets.car requires Apple’s actool on macOS and is not produced here.

ParameterTypeDescription
formats *array
out_dir *string
path *stringPath to the .icon bundle (".icon" is added if missing)
appearancesarrayPNG appearances, default all six
sizesarrayPNG sizes, default [1024, 512, 256, 128, 64, 32, 16]