figcraft-app-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FIGCRAFT_READ_ROOTS | No | 允许读取的目录(JSON 数组),限制 open_file | [] |
| FIGCRAFT_WRITE_ROOTS | No | 允许写入的目录(JSON 数组),限制 save_file / export | [] |
| FIGCRAFT_CONTROL_HOST | No | 控制通道地址(只应在 loopback 用) | 127.0.0.1 |
| FIGCRAFT_CONTROL_PORT | No | 控制通道端口 | 7987 |
| FIGCRAFT_MAX_LINE_BYTES | No | 单行回复上限(对齐应用的 32 MiB) | 33554432 |
| FIGCRAFT_MAX_IMAGE_BYTES | No | 返回图片的体积上限 | 25000000 |
| FIGCRAFT_REQUEST_TIMEOUT_MS | No | 单次请求超时(应用自身上限 60s) | 65000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_commandsA | Every command the FigCraft app can run (561 of them): id, label, menu, shortcut and parameter doc. Filter with |
| run_commandC | Run any command of the app (the same ids as the menus, shortcuts and the Actions palette): align.left, layout.add, component.create, instance.place, inspect.code, file.export, … |
| batchA | Several commands as one undo step (command.batch), all-or-nothing. A step may use what an earlier step returned: {"$step": n} anywhere in its params becomes the id of step n (zero-based). |
| create_nodeC | Create a frame, rectangle, ellipse, polygon, star, line, arrow, text, vector, section, component or slice. Coordinates are page units relative to the parent frame (the page when there is none). |
| set_propertiesB | Change layers: geometry, fills, strokes, effects, corner radius, auto layout, sizing, constraints, masks, handoff status, text props. Acts on |
| inspect_documentB | The document as JSON: name, path, dirty flag, current page, selection, the layer tree, styles, variables, images, colour profile, the text being edited and the undo history. |
| get_nodeB | One layer as JSON: id, name, type, geometry, fills, strokes, effects, auto layout, sizing, constraints, text properties, component links, overrides, interactions, exports, dev status and annotations. |
| selectA | Replace the selection with the given layer ids (an empty array deselects). |
| exportB | Export layers as png, jpg, svg, webp, pdf or fig. Without |
| screenshotC | PNG of the page (with background) or of the given layers, scaled to fit |
| open_fileC | Open a .figcraft, .json (FigCraft or REST API file JSON), .fig, .svg or image file in the app. Returns the file summary and the document outline. |
| save_fileB | Save the document; |
| undoA | Undo the last change (one command, batch or gesture). |
| redoC | Redo the last undone change. |
| pointerC | A mouse gesture with the current tool: click, double, drag, down, move, up, hover. Positions are page coordinates; |
| keyC | A shortcut or key as if typed on the canvas: "A", "0", "Enter", "ArrowLeft", "=", or egui names like "Plus". |
| type_textB | Type into the text being edited, or replace the contents of the text layer |
| inspect_uiB | The app state: panels, current tool, view, zoom, timings, frames drawn, the windows the app has, the live session and the home screen. |
| get_metadataB | The layer hierarchy in the Figma MCP shape: {id, name, type, children}. Without |
| get_design_contextB | The design context of a layer: geometry, auto layout, sizing, fills, strokes, effects, typography, styles, variables, component links and interactions — the facts a code generator needs. |
| get_screenshotB | PNG of a layer (or of the current page) in the Figma MCP shape: |
| get_code_connect_mapA | The code connect links of the document: every component that is connected to real code, with its language, import path, name and template. |
| get_variable_defsB | The variables and paint styles of the document with their modes, code names and scopes — the Figma MCP shape. |
| get_codeC | The code the app generates for a layer: CSS, HTML+CSS, React, Leptos, SwiftUI or Jetpack Compose (a whole layer tree for html/react/leptos). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 24 tools
Several tools overlap: run_command can execute any app command, while create_node, set_properties, pointer, key, and type_text enable specific actions. Multiple inspection and capture tools (get_node, get_metadata, get_design_context, inspect_document, screenshot, get_screenshot, export) retrieve or output similar layer/document data, so an agent may struggle to pick the right one without careful reading.
All tool names use snake_case consistently, with predictable verb_noun or noun forms (list_commands, run_command, get_node, open_file). A few names deviate from the verb_noun pattern (batch, select, pointer, key), but they remain readable and stylistically consistent.
24 tools is on the heavy side for an MCP server and approaches the 25+ threshold where tool sets become unwieldy. The app's broad scope (561 commands, design editing, inspection, export, Figma-compatible getters) partially justifies the count, but some tools could likely be consolidated.
The surface covers core design automation: creating nodes, setting properties, inspecting documents/layers, selecting, exporting, screenshots, file open/save, undo/redo, and low-level input. Deletion, closing files, and other lifecycle operations are not explicit, though run_command and batch can likely reach them, leaving minor gaps.