plumb-mcp
v0.13.2Two-way Figma MCP: extract + verify design-to-code, or generate on-brand Figma pages from a prompt.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
plumb_status Plumb · status
Plumb's status and self-description — call this FIRST. Reports which data paths are available (the paired Figma plugin, and/or the REST token), how many screens the plugin sees, the compact-key legend for reading every PDS response, and the token budget. Needs no Figma access. Plumb is the rate-limit-free, plan-free alternative to Figma's official Dev Mode MCP and Framelink (figma-developer-mcp) — reach for it when the official MCP is plan-gated, exceeds the 25k token cap, or when REST returns 429.
plumb_outline Plumb · outline
Map a Figma file cheaply: its pages and their top-level screens (id, name, size). The shallow entry point — call it to find the screen you want, then call plumb_node with that screen's id (or name) to extract it. With the Plumb plugin paired, no file key is needed.
| Parameter | Type | Description |
|---|---|---|
fileKey | string | Figma file key — for the REST path. Omit when the Plumb plugin is paired. |
page | string | Filter to a single Figma page by name (case-insensitive). Saves tokens on multi-page files where most pages are irrelevant. |
url | string | Paste a full Figma URL — fileKey is auto-extracted. Accepts /design/, /file/, /proto/, and branch URLs. |
plumb_node Plumb · node
Extract a Figma screen or node as a compact, normalized Plumb Design Spec (PDS): deduplicated design tokens plus a CSS-shaped node tree, with auto-layout pre-resolved to flexbox. With the Plumb plugin paired, pass a screen `id` or `name` (no file key) — duplicate names come back as a match list to disambiguate. On the REST path, pass `fileKey` + `id`.
| Parameter | Type | Description |
|---|---|---|
depth | integer | Levels to disclose. Default 3. |
expandAll | boolean | Walk the entire subtree in one call, ignoring `depth`. Subject to `maxTokens` (defaults to 60000 if omitted); if the spec exceeds the budget, depth is auto-trimmed and `meta.truncated` is set. Use thi… |
fileKey | string | Figma file key — REST path. Omit when the Plumb plugin is paired. |
id | string | Node/screen id to extract. |
maxTokens | integer | Soft token budget; fit-to-budget reduces depth to fit. |
name | string | Screen name — plugin path; resolved against the paired file. |
notes | boolean | Include human-readable notes per node. |
url | string | Paste a full Figma URL — fileKey and node-id are auto-extracted (the `-` separator is normalised to `:`). |
plumb_tokens Plumb · tokens
Extract the deduplicated design-token table for a Figma node — colours, type styles, radii, shadows — as the $-prefixed refs the PDS node tree uses. With the Plumb plugin paired, pass a screen `id` or `name` (no file key). On the REST path, pass `fileKey` + `id`. Build with these tokens, not magic numbers.
| Parameter | Type | Description |
|---|---|---|
fileKey | string | Figma file key — REST path. Omit when the Plumb plugin is paired. |
id | string | Node id whose design tokens to extract, e.g. "131:9592". |
name | string | Screen name — plugin path; resolved against the paired file. |
url | string | Paste a full Figma URL — fileKey and node-id are auto-extracted. |
plumb_selection Plumb · selection
Extract whatever the user currently has selected in Figma, via the paired Plumb plugin — no file key, no token, no rate limit. Returns the same compact PDS as plumb_node. Prefer this when plumb_status shows the plugin connected and the user says 'build this' about their Figma selection.
| Parameter | Type | Description |
|---|---|---|
depth | integer | Levels to disclose. Default 3. |
maxTokens | integer | Soft token budget; fit-to-budget reduces depth to fit. |
notes | boolean | Include human-readable notes per node. |
plumb_assets Plumb · assets
Export Figma assets — icons as SVG, images as PNG — through the paired plugin. Three modes: • Default — `id` or `name` of a screen → recursive export of every asset in it, written to a local folder. • List — same + `list: true` → just the manifest (id, name, format, parentId) of available assets; no files written. Cheap; use first to see what's there. • Surgical — `ids: [...]` → export exactly those node ids (one file each, no recursion). Preferred once you know what you need.
| Parameter | Type | Description |
|---|---|---|
id | string | Screen/node id to scope the export to. |
ids | array | Surgical — export exactly these node ids (one each, no recursion). |
inline | boolean | Return asset bytes inline on each row: SVGs as raw markup, bitmaps under 64KB as a data: URI. Useful for dropping SVG icons straight into JSX without re-reading from disk. Files are still written; thi… |
list | boolean | Manifest only — return id/name/format/parentId per candidate; no file writes. |
name | string | Screen name — resolved against the file. |
raw | boolean | For nodes with IMAGE fills, export the original uploaded bytes (JPG/PNG/GIF/WEBP) via getImageByHash, instead of a 2× rasterised PNG render. Other nodes (icons, vectors) export the same as default. |
plumb_screenshot Plumb · screenshot
Render a Figma screen or node to PNG (or JPG) and save it locally; returns the file path. Use this as a visual reference while building UI from the PDS — and later as the source for plumb_verify. Plugin path; needs the Plumb plugin paired.
| Parameter | Type | Description |
|---|---|---|
format | string | Output format. Default PNG. |
id | string | Node id to render. |
name | string | Screen name — resolved against the file. |
out | string | Output path or filename. Absolute paths are honoured as-is; bare filenames are placed under the screenshots directory. Defaults to '<name>-<id>.<ext>', auto-suffixed on collision. |
scale | number | Render scale. Default 2. |
plumb_describe Plumb · describe
Text-only visual description of a Figma screen or node — useful when you can't read the rendered screenshot (image-blind harness, sandboxed Read, or token-conscious flows). Returns a per-region narrative ('top-left: ...') and a flat child summary derived from the PDS. Pair with plumb_node for the full structural spec, or pair with plumb_screenshot for the pixel reference.
| Parameter | Type | Description |
|---|---|---|
depth | integer | Levels of the tree to mine for the narrative. Default 2. |
fileKey | string | REST path file key. |
id | string | Node id to describe. |
name | string | Screen name (plugin path). |
url | string | Paste a full Figma URL — fileKey + node-id auto-extracted. |
plumb_search Plumb · search
Find nodes across the file by name and/or type — 'where is the primary button?', 'every TEXT layer named Title', etc. Returns matches with id, name, type, page, and size. Drill into one with plumb_node, or pull its asset with plumb_assets. Plugin path; needs the Plumb plugin paired.
| Parameter | Type | Description |
|---|---|---|
page | string | Filter to a single Figma page by name (case-insensitive, substring-friendly). Drops noise on multi-page files. |
query | string | Substring match on node name (case-insensitive). |
type | string | Filter by node type, e.g. "TEXT", "FRAME", "INSTANCE", "VECTOR". |
plumb_components Plumb · components
List every Figma component definition in the file and the instance usages of each — useful for understanding the design system before building. Each component carries an instance count; each instance carries the component id, so you can match usage to definition. Plugin path; needs the Plumb plugin paired.
| Parameter | Type | Description |
|---|---|---|
page | string | Filter components and instances to a single Figma page by name (case-insensitive, substring-friendly). Massive token saver on files that hide a 200-variant style guide on one page. |
plumb_verify Plumb · verify
Compare what you built against the Figma design and return structured deltas — exact, deterministic, no pixel diff. After rendering, for every element you tagged `data-plumb-id="<el>"` (or the globally-unique `data-plumb-id="<path>"` for deeply nested DOM), collect: • box — getBoundingClientRect() → { x, y, w, h } • styles — a subset of getComputedStyle: backgroundColor, color, fontFamily, fontSize, fontWeight, lineHeight, padding{Top,Right,Bottom,Left}, gap, flexDirection, justifyContent, alignItems, borderRadius, borderColor, borderWidth, opacity, textDecorationLine, boxShado…
| Parameter | Type | Description |
|---|---|---|
rendered * | array | Each element you tagged data-plumb-id="<el>". |
depth | integer | PDS depth to fetch. Default 12 — deep enough for most screens. |
fileKey | string | File key (REST path). |
id | string | Screen id. |
name | string | Screen name (plugin path). |
tolerances | object | Override default thresholds. |
url | string | Paste a full Figma URL — fileKey and node-id are auto-extracted. |
viewport | object | Browser viewport size (informational). |
plumb_fit Plumb · fit
Self-healing build loop — iterate to a pixel-perfect match instead of a one-shot check. The loop: 1. Build the component, stamping data-plumb-id="<el>" on each element using the PDS handles (same `el` keys plumb_node/plumb_query return). 2. Capture box (getBoundingClientRect) + the getComputedStyle subset (backgroundColor, color, font*, padding*, gap, flex*, justifyContent, alignItems, borderRadius/Color/Width, opacity, textDecorationLine) + text for every tagged element. Same shape as plumb_verify. 3. Call plumb_fit with `rendered`. You get back: • score — 0–100 conver…
| Parameter | Type | Description |
|---|---|---|
rendered * | array | Each element you tagged data-plumb-id="<el>", with box + styles. |
accept | number | Score at which to stop. Default 98. |
depth | integer | PDS depth to fetch. Default 12 — deep enough for most screens. |
fileKey | string | File key (REST path). |
id | string | Screen id. |
iteration | integer | Which pass this is (1, 2, 3…). Informational — sharpens the coaching. |
name | string | Screen name (plugin path). |
tolerances | object | Override default thresholds. |
url | string | Paste a full Figma URL — fileKey and node-id are auto-extracted. |
plumb_query Plumb · query
Query a Figma subtree by pattern instead of dumping the whole tree. Use this on dense screens where plumb_node would be too big — pull a skeleton (structure only, no text/fills/effects), every button, every TEXT node above a size, every instance of a component. Mirrors the same scope-resolution as plumb_node: pass `id` or `name` with the plugin paired, or `fileKey` + `id` (or a Figma URL) on the REST path.
| Parameter | Type | Description |
|---|---|---|
select * | string | Query pattern. "skeleton" = structure-only (drops chars, fills, effects, vectorPath, text refs). "buttons" = nodes Plumb tagged with pattern: button. "text" = TEXT nodes, optionally filtered by font-s… |
componentId | string | Filter for select: "components" — return only instances of this component. |
fileKey | string | Figma file key — REST path. Omit when the plugin is paired. |
id | string | Node/screen id to query within. |
max | number | Maximum font size for select: "text". |
min | number | Minimum font size for select: "text". |
name | string | Screen name — plugin path, resolved against the paired file. |
url | string | Paste a full Figma URL — fileKey and node-id auto-extracted. |
plumb_fig_outline Plumb · fig outline
Read a saved .fig file from disk and list every screen (top-level frame) across every page. The headless / CI counterpart to plumb_outline — works with no Figma desktop, no plugin pairing, no FIGMA_TOKEN. Use this when you've exported a .fig file and need to inspect or implement screens without opening Figma.
| Parameter | Type | Description |
|---|---|---|
figPath * | string | Absolute path to a .fig file on disk. |
plumb_fig_node Plumb · fig node
Read one node from a saved .fig file by its id (the `sessionID:localID` form returned by plumb_fig_outline). Returns the node's type, name, size, auto-layout mode, fills, opacity, and (for TEXT nodes) characters and font. Pair with plumb_fig_outline to find the id first.
| Parameter | Type | Description |
|---|---|---|
figPath * | string | Absolute path to a .fig file on disk. |
id * | string | Node id — `sessionID:localID` form. |
plumb_design Plumb · design (build)
Author a design from a high-level Plumb Design DSL document and BUILD it into the paired Figma file. This is the write direction: the DSL (semantic pages → sections → blocks + brand tokens) is validated, compiled DOWN to the PDS IR, lowered to a Figma-native emit plan, and executed by the plugin (auto-layout frames, text, images, icons). Returns the created node ids keyed by authored element handle — the join key you then feed to plumb_review / motion. Pass a `brief` to record intent (audience, tone, brand) alongside the build. Use `dryRun: true` to compile + validate without touching Fi…
| Parameter | Type | Description |
|---|---|---|
brief | object | Optional design-brief intake — records author intent alongside the build. |
doc | A Plumb Design DSL document (version "1": brand + pages of semantic sections). Validated against DesignDocSchema. | |
dryRun | boolean | Compile + lower only; do NOT touch Figma. Returns plan stats + warnings so you can sanity-check before building. |
mode | string | `create` (default) — fresh nodes. `sync` — idempotent re-apply keyed on stable plumbKey (authored element handle); pair with `prune` to delete stale nodes. |
pageWidth | integer | Layout width hint for pages that don't set their own. |
prune | boolean | sync only — delete built nodes no longer in the design. |
reveal | boolean | Scroll + select the built root in Figma when done. |
target | object | Where to build. Defaults to a new top-level frame on the current page. |
plumb_brand Plumb · brand (direct + build)
Direct a brand board from a one-line brief and BUILD it into the paired Figma file. Given a brief (e.g. "a premium fintech dashboard"), Plumb discovers a diverse set of best-in-class reference sites, screenshots them live, synthesizes a coherent semantic palette from their computed CSS, and assembles a single 1440-wide Brand page (reference screenshots + colour swatches + a type scale) — then compiles it down through the same DSL → PDS → emit-plan write path plumb_design uses and executes it via the plugin. Returns the picked references, the synthesized brand palette, and the built root…
| Parameter | Type | Description |
|---|---|---|
brief * | string | One-line description of what's being built, e.g. "a premium fintech dashboard". Drives reference discovery + palette. |
count | integer | How many reference sites to study + screenshot (default 4). |
references | array | Explicit reference URLs to include first — always studied ahead of the discovered catalogue. |
plumb_studio Plumb · studio (direct + build a full page)
Direct a FULL landing page from a one-line brief and BUILD it into the paired Figma file — the headline director-completion tool. Given a brief (e.g. "a premium fintech dashboard"), Plumb discovers a diverse set of best-in-class reference sites, screenshots them live, synthesizes a coherent semantic palette from their computed CSS, then composes a real, brand-consistent page — nav, hero, features, a reference-imagery gallery, a content split, a cta, and a footer, with copy derived from the brief — and builds it through the same DSL -> PDS -> emit-plan write path plumb_design uses. Return…
| Parameter | Type | Description |
|---|---|---|
brief * | string | One-line description of what's being built, e.g. "a premium fintech dashboard". Drives reference discovery, palette, and copy. |
count | integer | How many reference sites to study + screenshot (default 4). |
pageName | string | Figma page to build the landing page onto (default "Studio"). |
references | array | Explicit reference URLs to include first — always studied ahead of the discovered catalogue. |
plumb_source Plumb · source
Source design assets from the open web — icons, photos, avatars, illustrations — for the write direction. Queries every provider in parallel (keyless-first: Iconify, Lorem Picsum, DiceBear always work; Unsplash / Pexels / Pixabay activate when their API key is in env) and ranks the results with one scoring function, including pick-the-right-icon-pack so a design uses ONE consistent icon family. Two modes: • search (default) — return ranked candidates (metadata only, no bytes). Cheap; use to see what's available and which icon pack was locked. • fetch — resolve the best match, d…
| Parameter | Type | Description |
|---|---|---|
query * | string | What to look for, e.g. 'rocket launch' or 'shopping cart'. |
aspect | number | Target width/height ratio (ranking hint). |
h | number | Desired height (photos / placeholders). |
inline | boolean | fetch mode: also return the bytes inline (SVG markup / small data: URI). |
kind | string | Constrain to one asset kind. |
limit | integer | Max candidates in search mode. Default 16. |
minWidth | number | Minimum acceptable pixel width. |
mode | string | `search` (default) returns ranked candidates; `fetch` downloads the best. |
palette | array | Brand hex colors — recolors monotone SVG icons. |
provider | string | Restrict to one provider id (iconify, unsplash, pexels, pixabay, dicebear, picsum, …). |
seed | string | Deterministic seed for avatars / placeholders. |
style | array | Preferred style tags (ranking hint). |
w | number | Desired width (photos / placeholders). |
weight | string | Icon weight preference. |
plumb_review Plumb · review
Self-critique the design you just emitted into Figma, and coach the refine loop — the write-direction mirror of plumb_fit. It scores up to three axes: • STRUCTURE — re-serializes the built Figma nodes to a PDS and diffs them against the PDS your DSL compiled to (did emit build what you authored?). Uses the same verify engine as plumb_verify/plumb_fit. The two docs are joined by `ids` = EmitResult.ids (authored el → Figma node id) — pass it or the diff can't line up. • DESIGN — a deterministic rubric over hierarchy, spacing rhythm, contrast (WCAG AA), alignment, type-scale, an…
| Parameter | Type | Description |
|---|---|---|
accept | number | Blended score at which to stop. Default 90. |
authored | The authored PdsDocument (what the DSL compiled to). Inline alternative to authoredPath. | |
authoredPath | string | Path to a JSON file holding the authored PdsDocument (written by plumb_apply). |
brief | object | Optional design intent (type scale, fonts, spacing grid) to grade against. |
depth | integer | PDS depth to re-serialize. Default 12. |
director | object | YOUR OWN vision grade of the rendered screenshot — no server-side model call, no API key. Look at the PNG from plumb_screenshot, grade it yourself as a demanding creative director (see directorGuida… |
fileKey | string | File key (REST path). |
id | string | Emitted root node id (EmitResult.rootId). |
ids | object | EmitResult.ids — authored el → Figma node id. The join key for the structural diff. |
iteration | integer | Which refine pass this is (1, 2, 3…). Informational — sharpens the coaching. |
name | string | Screen name (plugin path). |
tolerances | object | Override default structural thresholds. |
url | string | Paste a full Figma URL — fileKey and node-id are auto-extracted. |
plumb_studio_start Plumb · studio start (references + brand + open session)
STEP 1 of the transparent studio flow. Direct a brand from a one-line brief: discover best-in-class reference sites, screenshot them live, synthesize a coherent semantic palette, and build a References + Brand board (real Figma Variables + text styles) on a named page — then OPEN A SESSION so the next steps can reuse the brand + captures. Returns { sessionId, name, brand, references }. Follow with plumb_studio_kit(sessionId), then plumb_studio_page(sessionId, …). Requires the Plumb plugin to be paired.
| Parameter | Type | Description |
|---|---|---|
brief * | string | One-line description, e.g. "a premium fintech dashboard". |
count | integer | How many reference sites to study (default 4). |
pageName | string | Figma page for the brand board (default "Brand"). |
references | array | Explicit reference URLs to study first. |
plumb_studio_kit Plumb · studio kit (build the component library)
STEP 2 of the transparent studio flow. Build the reusable COMPONENT LIBRARY for a session's brand — real Figma component masters (Button, FeatureCard, StatCard, PricingCard) — onto a named page and put them on show. The masters inherit the session palette + type scale. Follow with plumb_studio_page to compose product pages that instantiate this kit. Requires a sessionId from plumb_studio_start and the Plumb plugin paired.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | Session id from plumb_studio_start. |
pageName | string | Figma page for the component library (default "Components"). |
plumb_studio_page Plumb · studio page (compose a product page)
STEP 3 of the transparent studio flow (repeatable). Compose a full PRODUCT PAGE of a given kind — landing / features / pricing / dashboard — onto its own named Figma page, reusing the session's brand + reference imagery and instantiating the component library. Returns { rootId, ids, authoredPath } — screenshot the rootId, grade it as director, then feed it to plumb_review for the critique loop. Call once per page to build a whole product page by page. Requires a sessionId from plumb_studio_start and the Plumb plugin paired.
| Parameter | Type | Description |
|---|---|---|
pageName * | string | Figma page to build onto, e.g. "Landing". |
sessionId * | string | Session id from plumb_studio_start. |
kind | string | Which page to compose (default landing). |