# grafta (npm · grafta)

Talk to any Figma file with your AI: ask what's in it, change it, or turn it into code.

- Trust score: 72/100 (medium)
- Change this week: +3
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-11-21

## Components

- npm · `grafta`: 72/100 (this document), [markdown](https://verifymcp.io/servers/n0ss4-grafta/grafta.md), [page](https://verifymcp.io/servers/n0ss4-grafta/grafta)

## Channel facts

- Registry: `npm`
- Package: `grafta`
- Version: `0.5.0`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-11-21.

- **Supply Chain Security**: 100/100
  - No malware found by supply-chain analysis.
  - No known CVEs affecting this package version or its production dependencies.
  - No install/post-install scripts declared.
  - 0 of 5 dependencies flagged as unhealthy.
- **Provenance & Transparency**: 48/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 9 days ago).
  - Publishes a security disclosure policy (SECURITY.md).
- **Schema Quality & AI Usability**: 57/100
  - AI-judged instruction clarity (good).
  - Context-footprint check failed: tool/resource definitions use about 8868 tokens (~197/item across 45 items; 45 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 47/100
  - Stability observed for 14 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 88/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 65% of tool parameters carry a description.
- **Tool Safety**: 75/100
  - No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.
  - 0 of 1 tool(s) whose name or description implies an irreversible operation declare an MCP destructiveHint annotation; "delete_node" implies "delete" and declares no destructiveHint at all, which the MCP spec reads as destructive by default.
  - An AI judge read all 46 captured unit(s) of tool text and found none that tries to manipulate the model reading it.
- **Capabilities**: 100/100
  - Implements a current MCP spec version (2026-07-28).

## Install

### How do I install the grafta MCP server?

grafta runs locally as an npm package, launched with npx -y grafta mcp. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.

### Claude

```bash
claude mcp add n0ss4-grafta -- npx -y grafta mcp
```

### Cursor

```json
{
  "mcpServers": {
    "n0ss4-grafta": {
      "command": "npx",
      "args": [
        "-y",
        "grafta",
        "mcp"
      ]
    }
  }
}
```

### VS Code

```json
{
  "servers": {
    "n0ss4-grafta": {
      "command": "npx",
      "args": [
        "-y",
        "grafta",
        "mcp"
      ]
    }
  }
}
```

### Codex

```bash
codex mcp add n0ss4-grafta -- npx -y grafta mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "n0ss4-grafta": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "grafta",
        "mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add n0ss4-grafta --command npx --arg -y --arg grafta --arg mcp
```

### Hermes

```yaml
mcp_servers:
  n0ss4-grafta:
    command: "npx"
    args: ["-y", "grafta", "mcp"]
```

### Netclaw

```json
{
  "McpServers": {
    "n0ss4-grafta": {
      "Transport": "stdio",
      "Command": "npx",
      "Arguments": [
        "-y",
        "grafta",
        "mcp"
      ]
    }
  }
}
```

### Vellum

```bash
assistant mcp add n0ss4-grafta -t stdio -c npx -a -y grafta mcp
```

### Other

```json
{
  "mcpServers": {
    "n0ss4-grafta": {
      "command": "npx",
      "args": [
        "-y",
        "grafta",
        "mcp"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-11-21 (score 72, +1)

No change was recorded against any check on this day. Stability & Change Management went from 43 to 47. That category is still filling its 30-day observation window: 13 days of observed history at the previous scan, 14 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-11-18 (score 71, +1)

No change was recorded against any check on this day. Stability & Change Management went from 33 to 37. That category is still filling its 30-day observation window: 10 days of observed history at the previous scan, 11 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-11-16 (score 70, +1)

No change was recorded against any check on this day. Stability & Change Management went from 27 to 30. That category is still filling its 30-day observation window: 8 days of observed history at the previous scan, 9 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-11-14 (score 69, +1)

No change was recorded against any check on this day. Stability & Change Management went from 20 to 23. That category is still filling its 30-day observation window: 6 days of observed history at the previous scan, 7 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-11-13 (score 68, +15)

- [security improvement] Malware scan: unverified → pass

### 2026-11-12 (score 53, −14)

- [security regression] Malware scan: pass → unverified
- [functional] Package version: 0.4.0 → 0.5.0

### 2026-11-11 (score 67, +15)

- [security improvement] Malware scan: unverified → pass

### 2026-11-10 (score 52, −14)

- [security regression] Malware scan: pass → unverified
- [functional improvement] Stability: unverified → 0.10
- [functional] Package version: 0.3.0 → 0.4.0

## MCP tools (45)

### `open_file` (~154 tokens)

Open a Figma .fig file and keep it open for later calls. Returns a handle and a summary: pages, node counts, components, variable collections, images. Opening a path that is already open returns the same handle without reading it again. Large files take seconds to open; every later call on the handle is fast. Edits the file had not saved when grafta last stopped are replayed, and `recovered` says how many; edits all saved to another file are not, and it says which file.

Input parameters:

- `path` (string, required): Path to a .fig file.
- `recover` (boolean): Replay edits this file had not saved when grafta last stopped. Default true; false discards them.

### `new_file` (~134 tokens)

Create a new, empty .fig at a path that does not exist, and open it: one page and nothing else. `from` is any .fig you have; only its format is used (Figma's schema, which grafta does not invent), none of its content: no pages, components, styles, variables or images. Returns the handle, as open_file does.

Input parameters:

- `from` (string, required): Any .fig, whose format the new file uses.
- `page` (string): The page's name. Default "Page 1".
- `path` (string, required): A new path ending in .fig.

### `close_file` (~61 tokens)

Close an open file and free the memory it holds. Edits not saved with save_as are discarded, for good: they are not recovered on the next open. The result says how many there were.

Input parameters:

- `handle` (string, required): The handle open_file returned.

### `list_open` (~38 tokens)

List the files currently open, with their handles, node counts, unsaved edits, how long each took to open, and the process's memory.

### `summarize` (~70 tokens)

Overview of an open file: every page with its id, node count and number of top-level frames, plus totals for nodes, components, component sets, instances, text nodes, variables, styles and images, and the prototype's flows and live interactions.

Input parameters:

- `handle` (string, required): The handle open_file returned.

### `list_screens` (~147 tokens)

The screens of a page, as a person sees them in Figma, in their order: a page's top-level frames, components, sections and other layers; a deck's slides, across its rows; a site page's breakpoints. Each with id, name, type, size and whether it is visible, ready for render_node. Paged.

Input parameters:

- `budget` (integer): Maximum result size in bytes. Default 32768.
- `cursor` (string): next_cursor from the previous page.
- `handle` (string, required): The handle open_file returned.
- `limit` (integer): Results per page.
- `page` (string, required): A page's id, from summarize.

### `search_nodes` (~182 tokens)

Find nodes by name (case-insensitive substring), by type (FRAME, TEXT, INSTANCE, COMPONENT, COMPONENT_SET, PAGE, SECTION, GROUP, RECTANGLE, VECTOR, …), or both, optionally only inside one node. Returns id, name, type and the path from the page, in document order, paged. Hidden nodes are included.

Input parameters:

- `budget` (integer): Maximum result size in bytes. Default 32768.
- `cursor` (string): next_cursor from the previous page.
- `handle` (string, required): The handle open_file returned.
- `limit` (integer): Results per page.
- `name` (string): Case-insensitive substring of the node name.
- `type` (string): Node type, in the plugin API's spelling.
- `within` (string): Only search inside this node id (a page, a frame…).

### `read_node` (~281 tokens)

Read one node exactly, in Figma's terms: geometry, fills/strokes (hex colours, bound variable names), effects, corner radii, auto-layout, constraints, text and its style, and for an instance its component and variant. A layer's prototype is `reactions` (trigger, actions, destination, transition), as the plugin API names them; a page gives its `flowStartingPoints`, a frame `overflowDirection` and overlay settings. Children to `depth` (default 1). Properties at Figma's default are left out: visible true, opacity 1, rotation 0, no fills/strokes/effects, radius 0, no auto-layout, constraints MIN/MIN. `undecoded` names stored fields this view does not model; read_raw returns them.

Input parameters:

- `budget` (integer): Maximum result size in bytes. Default 32768.
- `children_from` (integer): Skip this many children of the node: to resume a result cut for budget.
- `depth` (integer): Levels of children to include. 0 = the node alone. Default 1.
- `geometry` (boolean): Include vector path data (SVG d strings). Default false.
- `handle` (string, required): The handle open_file returned.
- `id` (string, required): Node id, e.g. 12:345.

### `read_raw` (~104 tokens)

The node exactly as the file stores it: every field of its node change, including the ones read_node does not model (listed there as `undecoded`). Byte fields are shown as their length and a fingerprint.

Input parameters:

- `budget` (integer)
- `fields` (array): Only these top-level fields. Default: all.
- `handle` (string, required): The handle open_file returned.
- `id` (string, required): Node id, e.g. 12:345.

### `list_components` (~140 tokens)

The components this file defines: every component set (with its variant properties and their values) and every standalone component, with id, name, page, component property definitions and how many instances use it. Variants inside a set are not listed separately; read_node on the set lists them as children. Paged.

Input parameters:

- `budget` (integer): Maximum result size in bytes. Default 32768.
- `cursor` (string): next_cursor from the previous page.
- `handle` (string, required): The handle open_file returned.
- `limit` (integer): Results per page.
- `name` (string): Only components whose name contains this (case-insensitive).

### `component_instances` (~103 tokens)

Where a component is used: every instance of it (of any variant, for a component set), with id, name and path. Paged.

Input parameters:

- `budget` (integer): Maximum result size in bytes. Default 32768.
- `cursor` (string): next_cursor from the previous page.
- `handle` (string, required): The handle open_file returned.
- `id` (string, required): A component or component set id.
- `limit` (integer): Results per page.

### `list_variables` (~123 tokens)

The file's design variables (tokens): each collection with its modes, and each variable's type and value per mode. Colours are hex; an alias is shown as { alias: <variable name> }, not flattened. Paged over variables.

Input parameters:

- `budget` (integer): Maximum result size in bytes. Default 32768.
- `collection` (string): Only this collection (name or id).
- `cursor` (string): next_cursor from the previous page.
- `handle` (string, required): The handle open_file returned.
- `limit` (integer): Results per page.

### `export_tokens` (~193 tokens)

Write the file's variables as W3C Design Tokens (DTCG 2025.10) JSON, one NEW file per collection and mode, the way Figma imports them: <dir>/<collection>.<mode>.tokens.json. Names split on / into groups; colours exact from the file (sRGB components and alpha, hex beside); numbers without an invented unit; an alias within its collection as a {group.token} reference, to another collection as its value with Figma's com.figma.aliasData. Lists what was not written (unresolved), every name changed to fit the format (renamed), and notes. The folder must exist; no file is written over.

Input parameters:

- `collection` (string): Only this collection (name or id); all when left out.
- `dir` (string, required): An existing folder for the token files.
- `handle` (string, required): The handle open_file returned.

### `create_variable_collection` (~121 tokens)

Make a variable collection (a set of design tokens) with named modes, e.g. modes: ["Light", "Dark"]. Then create_variable adds variables to it, and set_properties binds a fill to one by name. In a file with no Internal Only Canvas (one from new_file), grafta writes one first, where Figma keeps variables.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `modes` (array, required): Mode names, in order.
- `name` (string, required): The collection's name, e.g. "Colors".

### `create_variable` (~227 tokens)

Add a variable to a collection, with a value for every mode: { "Light": "#7C3AED", "Dark": "#A78BFA" }. type is COLOR, FLOAT, STRING or BOOLEAN. A value may be { alias: <variable name or id> }, another local variable of the same type, as semantic tokens alias primitive ones. A COLOR variable can be bound at once with set_properties, fills: [{ type: SOLID, variable: <name> }].

Input parameters:

- `collection` (string, required): A collection's name or id.
- `handle` (string, required): The handle open_file returned.
- `name` (string, required): e.g. "Brand/Primary"; slashes group it in Figma's panel.
- `type` (required)
- `values` (object, required): Mode name → value: "#RRGGBB" or "#RRGGBBAA" for COLOR, a number for FLOAT, a string for STRING, true or false for BOOLEAN, or { "alias": "<variable name or id>" } for another local variable of the sa…

### `set_variable` (~177 tokens)

Change a variable grafta made: rename it, or change its value in the modes named (the others keep theirs). Values are as create_variable takes them, aliases included. Every fill bound to it follows, and a text whose size it binds is estimated again (texts_resized). The file's own variables are refused.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `id` (string, required): A variable's id, or its name when only one has it.
- `name` (string)
- `values` (object): Mode name → value: "#RRGGBB" or "#RRGGBBAA" for COLOR, a number for FLOAT, a string for STRING, true or false for BOOLEAN, or { "alias": "<variable name or id>" } for another local variable of the sa…

### `set_variable_collection` (~99 tokens)

Change a collection grafta made: rename it, or add a mode (add_mode: "High contrast"). In a new mode every variable takes its value in the first mode, to change with set_variable. The file's own collections are refused.

Input parameters:

- `add_mode` (string)
- `handle` (string, required): The handle open_file returned.
- `id` (string, required): A collection's id or name.
- `name` (string)

### `list_styles` (~91 tokens)

The file's own colour, text and effect styles, with their values: paints in hex, a text style's font, size, line height and letter spacing, effects. Styles removed from the file and a library's are left out. Apply one with set_properties: fillStyle, strokeStyle, effectStyle or textStyle.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `type`

### `create_style` (~225 tokens)

Make a style: type FILL with fills (paints, as set_properties takes them), TEXT with fontFamily, fontStyle, fontSize, lineHeight and letterSpacing, or EFFECT with effects. Figma lists it under Local styles. Apply it with set_properties: fillStyle or strokeStyle for a FILL style, effectStyle, textStyle.

Input parameters:

- `effects` (array): EFFECT: shadows and blurs, as set_properties takes them.
- `fills` (array): FILL: paints, as set_properties takes them.
- `fontFamily` (string)
- `fontSize` (number)
- `fontStyle` (string): e.g. "Bold", "Semi Bold".
- `handle` (string, required): The handle open_file returned.
- `letterSpacing`: Pixels, or { value, unit: PIXELS | PERCENT }.
- `lineHeight`: Pixels, or { value, unit: PIXELS | PERCENT }.
- `name` (string, required): e.g. "Brand/Primary"; slashes group it.
- `type` (required)

### `set_style` (~239 tokens)

Change a colour, text or effect style, grafta's or one the file already has (a kit's brand colour, changed once): rename it, or change its values (as create_style takes them for its type). Every node using it follows, in Figma and in read_node, instances are derived again, and a text style's texts are estimated again (texts_resized). Library styles are refused.

Input parameters:

- `effects` (array): EFFECT: shadows and blurs, as set_properties takes them.
- `fills` (array): FILL: paints, as set_properties takes them.
- `fontFamily` (string)
- `fontSize` (number)
- `fontStyle` (string): e.g. "Bold", "Semi Bold".
- `handle` (string, required): The handle open_file returned.
- `id` (string, required): A style's id, or its name when only one has it.
- `letterSpacing`: Pixels, or { value, unit: PIXELS | PERCENT }.
- `lineHeight`: Pixels, or { value, unit: PIXELS | PERCENT }.
- `name` (string)

### `get_image` (~69 tokens)

An image the file embeds, by the imageHash a fill carries (read_node shows it). Returned as an image, up to 4 MB; a larger one is described instead.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `hash` (string, required): The fill's imageHash.

### `render_node` (~155 tokens)

Draw a node (a board, frame, component, instance, shape or text) as a PNG you can look at, from the open file including unsaved edits. Use it to see a screen you read, or to check a change before save_as. Drawn offline: the caption's `notes` name everything drawn approximately or left out, and an empty list means nothing was.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `id` (string, required): Node id, e.g. 12:345.
- `max_size` (integer): Largest side in pixels; a larger picture is scaled down to fit. Default 2048.
- `scale` (number): Pixels per unit. Default 1.

### `export_pdf` (~152 tokens)

Write nodes (frames, boards, components) to a NEW .pdf file, a page each in the order given, each page the node's size in points: screens for review or handoff. Each page is the drawing render_node makes, unsaved edits and modes included, as vectors, with text grafta wrote kept as selectable text. The result's `pages` give each page's notes, as render_node's do; a shadow or blur makes what it covers an image. Never overwrites.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `ids` (array, required): Node ids, one page each, in order.
- `path` (string, required): A new path ending in .pdf.

### `check_contrast` (~223 tokens)

Check every visible text under a node (a screen, a frame, a component) against WCAG 2.2 AA: its colour against what is actually drawn behind it, as render_node draws it, in the frame's mode and with instances' overrides. 4.5:1 is required, 3:1 for large text (24 px, or 18.66 px bold). Lists the texts that fail, with colour, background, ratio and what is required, and those that cannot be measured, with why; `all: true` lists the passing ones too. Over a background of several colours, the lowest ratio is given. Paged.

Input parameters:

- `all` (boolean): List passing texts too. Default false.
- `budget` (integer): Maximum result size in bytes. Default 32768.
- `cursor` (string): next_cursor from the previous page.
- `handle` (string, required): The handle open_file returned.
- `id` (string, required): The node whose texts are checked.
- `limit` (integer): Results per page.

### `create_page` (~53 tokens)

Create a page at the end of the file's page list. Returns its id. Nothing is written to disk until save_as.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `name` (string, required)

### `create_frame` (~128 tokens)

Create an empty frame (no fill, no auto-layout) on a page or inside a frame, at x,y relative to the parent, with a width and height. Returns its id. Fills, strokes, auto-layout and text are not available yet: they have not been measured in Figma.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `height` (number, required)
- `name` (string, required)
- `parent` (string, required): A page or frame id.
- `width` (number, required)
- `x` (number)
- `y` (number)

### `create_instance` (~136 tokens)

Create an instance of a component this file defines, on a page or inside a frame, at x,y relative to the parent. It takes the component's own size. For a component set, pass one variant's id (the set's children, via read_node). Components from another file cannot be instantiated yet.

Input parameters:

- `component` (string, required): A component (or variant) id.
- `handle` (string, required): The handle open_file returned.
- `name` (string): Default: the component's name.
- `parent` (string, required): A page or frame id.
- `x` (number)
- `y` (number)

### `create_component` (~129 tokens)

Turn a frame into a component, in place, keeping its children, so it can be reused: then place copies with create_instance (component: its id) and change what each copy shows with override_instance. Build the frame first (create_frame, create_text, create_vector, set_properties), then make it a component. A frame inside a component or an instance cannot be one.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `id` (string, required): The frame to turn into a component.
- `name` (string): A new name, e.g. "Button/Primary".

### `create_variant_set` (~131 tokens)

Group components into a variant set, as Figma's own sets: one component with properties, each component a variant of it. variants: [{ id, values: { "State": "Default" } }], every variant naming the same properties with a different combination. The components must share a parent; the set is placed around them. Then create_instance with any variant's id, and set_variant to switch an instance.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `name` (string, required): The set's name, e.g. "Product row".
- `variants` (array, required)

### `set_variant` (~97 tokens)

Switch an instance of a variant to another variant of its set, by the values that change: { "State": "Substitute" }. The other properties keep their values. Its overrides stay; Figma matches them to the new variant's layers.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `id` (string, required): An instance of a variant.
- `values` (object, required): Property name → the value to switch to.

### `add_component_property` (~150 tokens)

Give a component a property its instances set: TEXT (a label), BOOLEAN (show a part or not) or INSTANCE_SWAP (which icon), with its default. Then bind a layer inside the component with set_properties componentPropertyReferences ({ characters | visible | mainComponent: <property> }), and set each instance's value with set_properties componentProperties ({ "Label": "Guardar" }).

Input parameters:

- `component` (string, required): A component's id.
- `default` (required): A string, true or false, or a component's name or id.
- `handle` (string, required): The handle open_file returned.
- `name` (string, required): e.g. "Label", "Show icon".
- `type` (required)

### `create_text` (~527 tokens)

Create a text layer on a page or in a frame. characters is the text (a line break starts a new paragraph). fontFamily and fontStyle name a font as Figma does (e.g. "Inter", "Semi Bold"); by default, the file's most used font. fontSize, fills (like set_properties: SOLID colour or a local colour variable; default black), x, y, textAlignHorizontal (LEFT, CENTER, RIGHT, JUSTIFIED), lineHeight (pixels, or { value, unit: PIXELS | PERCENT }), letterSpacing (likewise). Give width to wrap text inside a fixed width; give height too to fix the box (textAutoResize NONE); without either the box fits the text. Rich text: runs instead of characters, [{ characters, fontFamily?, fontStyle?, fontSize?, fills?, textDecoration?, textCase?, letterSpacing?, lineHeight?, hyperlink?: { type: URL, value } }], each run styled apart from the layer (a link is underlined unless it says otherwise); paragraphs, one per line of the text, [{ listType: NONE | UNORDERED | ORDERED, indentation?: 1 | 2 }]; paragraphSpacing, paragraphIndent, textDecoration (NONE, UNDERLINE, STRIKETHROUGH), textCase (ORIGINAL, UPPER, LOWER, TITLE, SMALL_CAPS, SMALL_CAPS_FORCED), textAlignVertical (TOP, CENTER, BOTTOM) and textAutoResize (NONE, WIDTH_AND_HEIGHT, HEIGHT). Figma lays the text out when the file is opened, so the size grafta reports is provisional.

Input parameters:

- `characters` (string)
- `fills` (array)
- `fontFamily` (string)
- `fontSize` (number)
- `fontStyle` (string)
- `handle` (string, required): The handle open_file returned.
- `height` (number)
- `letterSpacing`
- `lineHeight`
- `name` (string): Layer name. Default: the characters.
- `paragraphIndent` (number)
- `paragraphSpacing` (number)
- `paragraphs` (array)
- `parent` (string, required): A page or frame id.
- `runs` (array): The text as styled pieces; instead of characters.
- `textAlignHorizontal`
- `textAlignVertical`
- `textAutoResize`
- `textCase`
- `textDecoration`
- `width` (number)
- `x` (number)
- `y` (number)

### `create_vector` (~296 tokens)

Draw a vector from SVG path data (M L H V C S Q T A Z), as icon sets publish it: Lucide, Heroicons, Material Symbols. `path` is one path's d, or a list of them. `viewBox` is the box the data is drawn in ([0, 0, 24, 24] for Lucide), scaled to width and height; without it, the path's own bounds. For a line icon give strokes, strokeWeight (in the vector's pixels: Lucide's 2 at 24 px is 4 at 48 px), strokeCap and strokeJoin ROUND, and no fills. Figma draws the geometry itself.

Input parameters:

- `fillRule`
- `fills` (array)
- `handle` (string, required): The handle open_file returned.
- `height` (number)
- `name` (string)
- `parent` (string, required): A page or frame id.
- `path` (required): SVG path data: a string, or a list of strings drawn together.
- `strokeCap`
- `strokeJoin`
- `strokeWeight` (number)
- `strokes` (array)
- `viewBox` (array): [min x, min y, width, height] of the box the path is drawn in.
- `width` (number)
- `x` (number)
- `y` (number)

### `create_shape` (~231 tokens)

Draw a shape as Figma's own layer type: RECTANGLE (cornerRadius), ELLIPSE (arcData { startingAngle, endingAngle, innerRadius } in radians: a ring, a pie, a half arc), LINE (width is its length; needs strokes), POLYGON (pointCount sides) or STAR (pointCount points, innerRadius 0-1). Fills and strokes as set_properties takes them; nothing is painted unless named. Style it further with set_properties.

Input parameters:

- `arcData` (object)
- `cornerRadius` (number)
- `fills` (array)
- `handle` (string, required): The handle open_file returned.
- `height` (number): Not for a LINE.
- `innerRadius` (number)
- `name` (string)
- `parent` (string, required): A page or frame id.
- `pointCount` (integer)
- `strokeWeight` (number)
- `strokes` (array)
- `type` (required)
- `width` (number, required)
- `x` (number)
- `y` (number)

### `override_instance` (~205 tokens)

Change what an instance shows, without changing its component: the colour of an icon, a button's label, a hidden part. properties: fills and strokes (paints, as in set_properties), characters (text layers), visible. layer names the component's layer by its id, as read_node on the component shows it; for a layer inside a nested instance, give a path of ids [nested instance, layer]. Without layer, fills and strokes recolour every vector layer of the component that already has fills (or strokes), and never add paint to a layer that had none. Many icons are drawn with strokes, not fills: read_node on the component shows which, and a stroked icon is recoloured with strokes.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `id` (string, required): An instance you created.
- `layer`: A layer id in the component, or a path of ids through nested instances.
- `properties` (object, required)

### `fill_template` (~224 tokens)

Place a component once per row of data, in a page or frame (an auto-layout frame flows them): product cards, list rows, localised screens. Rows are a JSON array of objects, or a CSV file whose first line names the keys. Each key of a row is, in this order: `name` (the instance's layer name); a variant property, when `component` is a variant set; a component property (TEXT, BOOLEAN, INSTANCE_SWAP); or the name of a layer in the component, whose text it sets, or whose image when the value is a .png or .jpg path. Any other key refuses the call before anything is written. One call, up to 1000 rows.

Input parameters:

- `component` (string, required): A component, or a variant set.
- `csv` (string): A CSV file instead of rows: its first line names the keys.
- `handle` (string, required): The handle open_file returned.
- `parent` (string, required): A page or frame id.
- `rows` (array): One object per instance.

### `import_layout` (~244 tokens)

Write a web page's layout as design layers: a layout snapshot (JSON from grafta's snapshot.js, https://n0ss4.github.io/grafta/snapshot.js, run in a browser on the page: graftaSnapshot('<css selector>')) becomes frames, text, images and auto-layout in a page or frame. Flexbox becomes auto-layout with fill, hug or fixed sizing as the browser measured it (layout: "auto", the default), or every box is placed where the browser put it ("absolute"). Backgrounds, uniform borders, radii, box shadows, opacity, fonts and local or data: images are written; what is not (a gradient, a transform, an inline SVG, a remote image) is listed under not_imported, with its element. One call.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `layout` (string): Flexbox as auto-layout (default), or every box where the browser put it.
- `parent` (string, required): A page or frame id.
- `snapshot` (string, required): The snapshot's JSON file.
- `x` (number)
- `y` (number)

### `set_properties` (~1560 tokens)

Change a frame, instance or text layer you created, using read_node's names: x, y, width, height, name, visible, clipsContent (clip children to the frame), auto-layout (layoutMode NONE | HORIZONTAL | VERTICAL, itemSpacing, counterAxisSpacing, padding or paddingTop/Right/Bottom/Left, primaryAxisSizingMode and counterAxisSizingMode FIXED | AUTO, primaryAxisAlignItems MIN | CENTER | MAX | SPACE_BETWEEN, counterAxisAlignItems MIN | CENTER | MAX, layoutWrap), a child's layoutGrow (0 | 1), layoutAlign (INHERIT | STRETCH) and layoutPositioning (AUTO | ABSOLUTE), fills and strokes (SOLID paints: { type: SOLID, color: "#RRGGBB", opacity?, variable? }, where variable binds the paint to one of the file's local colour variables by name; or { type: GRADIENT_LINEAR | GRADIENT_RADIAL, gradientStops: [{ position: 0-1, color, opacity? }], angle? (linear, degrees: 180 top to bottom, 90 left to right) or gradientTransform? }; or { type: IMAGE, image: "<PNG or JPEG path>" or imageHash, scaleMode?: FILL | FIT | STRETCH }), strokeWeight, strokeAlign (INSIDE, CENTER, OUTSIDE), cornerRadius or topLeftRadius/topRightRadius/bottomRightRadius/bottomLeftRadius, effects ({ type: DROP_SHADOW | INNER_SHADOW | LAYER_BLUR | BACKGROUND_BLUR, color?, opacity?, offset?: {x,y}, radius, spread? }) and opacity, and dashPattern (dash then gap lengths, [] for solid). On an instance: x, y, name, visible, size, and its own fills, strokes, strokeWeight, strokeAlign and dashPattern, which it keeps while the rest follows its component. On a text layer: x, y, width (fixes the width and wraps), height (fixes the box), name, visible, characters, fontFamily, fontStyle, fontSize, fills, textAlignHorizontal, lineHeight, letterSpacing, opacity, and as create_text takes them: runs (replacing the characters and their styles), paragraphs, paragraphSpacing, paragraphIndent, textDecoration, textCase, textAlignVertical, textAutoResize. A font, size, colour, spacing, decoration or case set on the layer applies to every char…

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `id` (string, required): A frame, instance or text layer you created.
- `properties` (object, required)

### `move_node` (~233 tokens)

Move a frame, component or component set, instance, text layer, shape or vector: into another page or frame, or among its siblings. Siblings are drawn in order, the last on top; in an auto-layout frame the order is also the flow. Give `parent` (with `to`: "front", the default, or "back"), or `behind` / `in_front_of` a sibling to go right behind or in front of it, in that sibling's parent. x,y are relative to the new parent; by default the node keeps them.

Input parameters:

- `behind` (string): A node to go right behind, in its parent.
- `handle` (string, required): The handle open_file returned.
- `id` (string, required)
- `in_front_of` (string): A node to go right in front of, in its parent.
- `parent` (string): A page or frame id.
- `to` (string): With parent: the top of the stack (last, the default) or the bottom (first).
- `x` (number)
- `y` (number)

### `delete_node` (~142 tokens)

Delete a node (a page, frame, text or instance) and everything inside it. Returns the ids removed. Refused when another node points at it or at something inside it (an instance of a component in it, a prototype link to it, an override of one of its layers), naming who; and refused inside a component. `also` deletes more nodes in the same call: what they point at among themselves does not count, so components that use each other can go together.

Input parameters:

- `also` (array): More nodes deleted with it, in one call.
- `handle` (string, required): The handle open_file returned.
- `id` (string, required)

### `group_nodes` (~86 tokens)

Group layers that share a parent, as Figma's Group: the group sits at their bounds and each layer keeps its place on the canvas. Moving or resizing a grouped layer with set_properties fits the group again. ungroup undoes it.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `ids` (array, required)
- `name` (string): Default "Group".

### `ungroup` (~63 tokens)

Ungroup a group: its layers go to the group's parent, in its place and order, each where it was on the canvas, and the group is removed.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `id` (string, required): A group's id.

### `create_section` (~103 tokens)

Make a section on a page, to organise screens ("Onboarding", "Checkout"). Then move frames into it with move_node (parent: the section), or create them in it.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `height` (number, required)
- `name` (string)
- `parent` (string, required): A page's id.
- `width` (number, required)
- `x` (number)
- `y` (number)

### `duplicate_node` (~140 tokens)

Duplicate a node with everything in it: every layer copied with a new id, instances still instances of their components, bindings and styles kept. The copy goes in the same parent unless one is named, at x, y (by default the original's), in front of its new siblings; then change it. A component, or anything holding one, is not duplicated.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `id` (string, required)
- `name` (string)
- `parent` (string): Where the copy goes; by default the original's parent.
- `x` (number)
- `y` (number)

### `save_as` (~143 tokens)

Write the open file, with its edits, to a NEW path ending in its product's extension: .fig, or .deck for a Figma Slides file, .jam for FigJam, .site for Figma Sites. Never overwrites: a path that exists, or the source file, is refused. The written file is read back and compared before success is reported. Open the result in Figma to see it.

Input parameters:

- `handle` (string, required): The handle open_file returned.
- `path` (string, required): A new path ending in .fig, or .deck, .jam or .site for a Figma Slides, FigJam or Figma Sites file.

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/n0ss4-grafta/grafta#diagnostics

## Score history

- 2026-11-21: 72
- 2026-11-20: 71
- 2026-11-19: 71
- 2026-11-18: 71
- 2026-11-17: 70
- 2026-11-16: 70
- 2026-11-15: 69
- 2026-11-14: 69
- 2026-11-13: 68
- 2026-11-12: 53
- 2026-11-11: 67
- 2026-11-10: 52
- 2026-11-09: 66
- 2026-11-08: 66
- 2026-11-07: 51

## Common questions

### What is the grafta MCP server?

grafta is an MCP server listed in the public MCP registry as io.github.n0ss4/grafta. Talk to any Figma file with your AI: ask what's in it, change it, or turn it into code. This page covers its npm package (grafta).

### Is the grafta MCP server safe to use?

grafta scores 72 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 21 November 2026. It declares no install or post-install scripts. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

### What tools does the grafta MCP server expose?

grafta exposes 45 tools: open_file, new_file, close_file, list_open, summarize, and 40 more. Their descriptions and schemas cost roughly 8,529 tokens of context every time the server is loaded.

### Is the grafta MCP server still maintained?

grafta is still listed as active in the MCP registry. We last reached this channel on 21 November 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

### What licence is the grafta MCP server under?

grafta declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.

### What did VerifyMCP test on the grafta MCP server?

VerifyMCP ran 16 checks on grafta, covering Malware scan, Known CVEs, Install scripts, Dependency health and 12 more. Endpoint Security and Transport & Reachability do not apply to an npm package, so they were not tested. The score does not measure everything, and the scoring documentation lists what it leaves out.

## Links

- npm package: https://www.npmjs.com/package/grafta
- Socket report: https://socket.dev/npm/package/grafta
- Repository: https://github.com/n0ss4/grafta
- Website: https://n0ss4.github.io/grafta
- Changelog RSS feed: https://verifymcp.io/servers/n0ss4-grafta/grafta.xml
- Changelog JSON feed: https://verifymcp.io/servers/n0ss4-grafta/grafta/changelog.json
- Trust report (JSON): https://verifymcp.io/servers/n0ss4-grafta/grafta.json
- HTML version of this page: https://verifymcp.io/servers/n0ss4-grafta/grafta
