Skip to main content
Glama

šŸŽØ FigCraft Live MCP Server (figcraft-mcp)

License: MIT MCP Protocol Node.js TypeScript

Official, production-grade Model Context Protocol (MCP) server for FigCraft (ArtCraft Team). Enables AI coding assistants (Antigravity IDE, Claude Desktop, Cursor, VS Code) to create design files, automatically open them immediately in the GUI, and generate UI/UX live on the user's screen in real-time with Figma-grade Auto-Layout, Luxury Obsidian Titanium Theming, Anti-Overflow Text Constraints, and Harness MCP Quality Gates.


⚔ The Canonical 1-by-1 Automated Workflow

In traditional workflows, AI agents generated design files in the background, leaving users to manually browse files and open them in FigCraft.

figcraft-mcp enforces the strict 1-per-1 Automated Pipeline:

flowchart TD
    A["1. Create & Name Project File<br/>(AI initializes *.figcraft with project name)"] --> B["2. Automatically Open in FigCraft GUI<br/>(AI sends file.open — user does NOT touch anything)"]
    B --> C["3. Generate Responsive System<br/>(Desktop 1440px, Tablet 768px, Mobile 375px side-by-side)"]
    C --> D["4. Live Luxury Components & Auto-Layout<br/>(Radiant Gold CTAs, Glassmorphism, Zero-Overflow Text)"]
    D --> E["5. Anti-Overflow & Harness Quality Audit<br/>(Verify 0 overflows, 0 literal \\n, and record evidence)"]
    E --> F["6. Automatic Save to Disk<br/>(AI persists canvas state back to .figcraft file)"]

Related MCP server: figma-mcp

šŸ’Ž Solusi Visual & Perbaikan Layout (v1.3.0)

Berdasarkan riset dokumentasi Context7 MCP untuk Figma Plugin API dan Tailwind CSS v4 design tokens:

  1. Anti-Overflow Text Wrapping (textAutoResize: 'height'):

    • Menghilangkan teks yang meluber keluar dari kartu dengan memaksa text node menggunakan textAutoResize: 'height' dan pembatasan lebar (sizingH: 'fill' / constrained width), sehingga teks secara otomatis membungkus (wrap) ke bawah secara rapi.

  2. Pembersihan Mutlak Karakter \n:

    • Memastikan string multiline terkonversi menjadi karakter line-break asli, bukan string karakter \n literal.

  3. Palet Warna Luxury Obsidian Titanium:

    • Menggantikan warna khaki/kusam dengan Radiant Amber Gold (#F59E0B), Obsidian Space Canvas (#090D14), Glassmorphic Cards (#131B2CD9), dan Neon Emerald Badges (#064E3B66 + #34D399).

  4. Depth & Glassmorphism (effects):

    • Menambahkan drop shadow mewah (effects: [{ type: 'dropShadow', color: '#F59E0B4D', radius: 24 }]) pada tombol utama dan soft elevation shadow pada kartu.


šŸ› ļø MCP Tools Reference (15 Tools)

Tool Name

Parameters

Description

figcraft_create_and_open

filePath (string), projectName (string)

Langkah 1 & 2: Buat file kanonik .figcraft beserta nama proyek, lalu otomatis langsung buka di jendela aktif FigCraft GUI.

figcraft_create_responsive_system

projectName (string), theme ('luxury'|'dark'|'light')

Responsive System: Buat 3 Artboard sinkron berdampingan (Desktop 1440px, Tablet 768px, Mobile 375px) dengan Auto-Layout vertikal.

figcraft_create_autolayout_frame

name, direction, gap, padding, mainAlign, crossAlign, sizingH, sizingV, bgColor, effects

Figma Flexbox: Buat kontainer Auto-Layout terstruktur dengan drop shadow dan corner smoothing.

figcraft_create_component

type ('navbar'|'hero'|'card'), parent (number), options (object)

Atomic Components: Render komponen tingkat tinggi siap pakai dengan garansi anti-overflow.

figcraft_fix_overflow

(none)

Anti-Overflow Auto-Fixer: Pindai seluruh kanvas dan perbaiki otomatis teks yang melebihi batas kotaknya serta bersihkan literal \n.

figcraft_apply_luxury_theme

(none)

Luxury Theming: Terapkan palet Obsidian Titanium, tombol emas bersinar (glow), dan kartu kaca modern di seluruh kanvas.

figcraft_audit_layout

(none)

Harness Audit: Audit kualitas kanvas (overflow, teks literal \n, cakupan responsif) dan hasilkan bukti Harness quality gate.

figcraft_create_node

type, name, parent, x, y, width, height, text, props

Langkah 3: Gambar elemen visual secara live di kanvas dengan sanitasi teks otomatis dan auto-wrap.

figcraft_set_properties

id (number), props (object)

Ubah styling, warna (fills), garis (strokes), tipografi, dan auto-layout pada layer aktif.

figcraft_batch

commands (array)

Jalankan serangkaian perintah desain FigCraft secara atomik dalam satu batch transaksi.

figcraft_inspect_document

depth (number), allPages (boolean)

Ambil tree hierarki lengkap dari seluruh layer, halaman, dan styling dokumen aktif sebagai JSON.

figcraft_open_file

filePath (string)

Buka berkas desain (.figcraft, .json, .fig, .sketch, .svg, gambar) ke tab aktif jendela FigCraft.

figcraft_save_file

path (string, opsional)

Simpan dokumen kanvas aktif ke disk (.figcraft).

figcraft_screenshot

ids (array), scale (number)

Rekam snapshot visual kanvas aktif atau frame tertentu dalam format PNG resolusi tinggi.

figcraft_ensure_gui

(none)

Periksa dan luncurkan otomatis jendela FigCraft GUI pada port kontrol 9099 jika belum aktif.


šŸ¤ Kolaborasi Powerful: Harness MCP + FigCraft MCP

FigCraft MCP dirancang untuk berkolaborasi langsung dengan principal-agentic-harness:

  1. Claim Task di Harness: Agen mengklaim tugas UI/UX melalui harness.claim_task.

  2. Inisialisasi Kanvas & Sistem Responsif: Agen membuat berkas dengan figcraft_create_and_open, lalu menghasilkan 3 artboard responsif (Desktop 1440, Tablet 768, Mobile 375) via figcraft_create_responsive_system.

  3. Desain Komponen Bebas Overflow: Agen menggunakan figcraft_create_component dan figcraft_create_autolayout_frame. Semua teks otomatis dibatasi dengan textAutoResize: 'height' sehingga tidak pernah meluber.

  4. Perbaikan Otomatis & Audit: Agen menjalankan figcraft_fix_overflow dan figcraft_audit_layout untuk memastikan 0 overflow dan 0 literal \n.

  5. Rekam Bukti & Verifikasi Quality Gate: Bukti audit kanvas langsung direkam ke Harness melalui harness.record_evidence dan checkpoint ditandai lulus via harness.update_quality_checkpoint.


šŸ“ Repository Structure

figcraft-mcp/
ā”œā”€ā”€ bin/
│   └── figcraft-mcp.js       # CLI runner for npx execution
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ index.ts              # Main stdio MCP entrypoint
│   ā”œā”€ā”€ server.ts             # McpServer instance & tool definitions (15 tools)
│   ā”œā”€ā”€ client.ts             # FigCraft Wire Socket Client (Port 9099)
│   ā”œā”€ā”€ layout.ts             # Luxury tokens, Auto-Layout normalizer & text sanitizer
│   ā”œā”€ā”€ components.ts         # High-level atomic UI components (Navbar, Hero, Card)
│   ā”œā”€ā”€ audit.ts              # Harness-ready layout audit & anti-overflow repair engine
│   ā”œā”€ā”€ template.ts           # Canonical .figcraft project builder
│   └── types.ts              # TypeScript interfaces & types
ā”œā”€ā”€ dist/                     # Compiled production ESM & types
ā”œā”€ā”€ package.json              # NPM manifest & metadata
ā”œā”€ā”€ tsconfig.json             # TypeScript configuration
ā”œā”€ā”€ LICENSE                   # MIT License
└── README.md                 # Complete documentation

šŸ“„ License

Distributed under the MIT License. See LICENSE for more information.

Author: Vicky Mosafan

Available Tools

30 tools
apply_luxury_themeA

Ubah palet warna dan styling kanvas aktif dari yang kaku/kusam ke tema modern Luxury Obsidian & Amber Gold / Radiant Cyan (tombol emas berkilau dengan glow shadow, kartu kaca glassmorphism, dan badge emerald neon).

Inputs: no named parameters.

audit_layoutA

Audit kualitas layout kanvas secara otomatis untuk mendeteksi teks yang meluber melebihi kotak (overflow), teks escaped \n mentah, hierarki flat layers tanpa Auto-Layout, serta kelengkapan artboard responsif. Menghasilkan skor kualitas dan payload bukti untuk Harness MCP quality checkpoints.

Inputs: no named parameters.

batchB

Jalankan serangkaian perintah manipulasi desain FigCraft secara atomik dalam satu batch transaksi.

Inputs: commands (required).

create_and_openB

Langkah 1 & 2 Kanonik: Buat berkas kanvas (.figcraft) beserta namanya di disk, lalu otomatis LANGSUNG buka berkas tersebut di jendela aktif FigCraft GUI di monitor pengguna tanpa perlu user buka manual.

Inputs: filePath (required), projectName.

create_autolayout_frameC

Buat kontainer Auto-Layout (Figma-grade Flexbox) dengan arah vertikal/horizontal, padding, gap, alignment, sizing (hug/fill/fixed), corner smoothing (squircle), dan dropShadow/glassmorphism sehingga elemen tidak berantakan atau bertumpuk.

Inputs: name (required), x, y, gap, +16 more.

create_componentB

Hasilkan komponen UI modern Luxury Obsidian Titanium siap pakai dengan anti-overflow guarantee: "navbar" (logo + links + radiant CTA), "hero" (neon emerald badge + multiline display + dual buttons), atau "card" (media slot + tag + title + body + radiant gold price/cta).

Inputs: type (required), parent (required), options (required).

create_nodeB

Langkah 3 Kanonik: Gambar elemen visual (frame, rectangle, text, ellipse, button, dll) secara LIVE langsung di kanvas dengan pembersihan otomatis karakter \n dan perlindungan otomatis dari teks meluber (textAutoResize: "height").

Inputs: type (required), x, y, name, +5 more.

create_responsive_systemB

Buat sistem 3 Artboard Responsif tersinkronisasi berdampingan di kanvas (Desktop 1440px, Tablet 768px, Mobile 375px) dengan Auto-Layout root frame vertikal dan tema warna Luxury Obsidian Titanium. Terintegrasi penuh dengan Harness MCP responsive verification.

Inputs: theme, projectName.

ensure_guiB

Pastikan FigCraft GUI berjalan aktif dengan jendela interaktif di monitor pengguna pada port kontrol 9099.

Inputs: no named parameters.

figcraft_apply_luxury_themeB

Ubah palet warna dan styling kanvas aktif dari yang kaku/kusam ke tema modern Luxury Obsidian & Amber Gold / Radiant Cyan (tombol emas berkilau dengan glow shadow, kartu kaca glassmorphism, dan badge emerald neon).

Inputs: no named parameters.

figcraft_audit_layoutA

Audit kualitas layout kanvas secara otomatis untuk mendeteksi teks yang meluber melebihi kotak (overflow), teks escaped \n mentah, hierarki flat layers tanpa Auto-Layout, serta kelengkapan artboard responsif. Menghasilkan skor kualitas dan payload bukti untuk Harness MCP quality checkpoints.

Inputs: no named parameters.

figcraft_batchB

Jalankan serangkaian perintah manipulasi desain FigCraft secara atomik dalam satu batch transaksi.

Inputs: commands (required).

figcraft_create_and_openB

Langkah 1 & 2 Kanonik: Buat berkas kanvas (.figcraft) beserta namanya di disk, lalu otomatis LANGSUNG buka berkas tersebut di jendela aktif FigCraft GUI di monitor pengguna tanpa perlu user buka manual.

Inputs: filePath (required), projectName.

figcraft_create_autolayout_frameB

Buat kontainer Auto-Layout (Figma-grade Flexbox) dengan arah vertikal/horizontal, padding, gap, alignment, sizing (hug/fill/fixed), corner smoothing (squircle), dan dropShadow/glassmorphism sehingga elemen tidak berantakan atau bertumpuk.

Inputs: name (required), x, y, gap, +16 more.

figcraft_create_componentB

Hasilkan komponen UI modern Luxury Obsidian Titanium siap pakai dengan anti-overflow guarantee: "navbar" (logo + links + radiant CTA), "hero" (neon emerald badge + multiline display + dual buttons), atau "card" (media slot + tag + title + body + radiant gold price/cta).

Inputs: type (required), parent (required), options (required).

figcraft_create_nodeB

Langkah 3 Kanonik: Gambar elemen visual (frame, rectangle, text, ellipse, button, dll) secara LIVE langsung di kanvas dengan pembersihan otomatis karakter \n dan perlindungan otomatis dari teks meluber (textAutoResize: "height").

Inputs: type (required), x, y, name, +5 more.

figcraft_create_responsive_systemB

Buat sistem 3 Artboard Responsif tersinkronisasi berdampingan di kanvas (Desktop 1440px, Tablet 768px, Mobile 375px) dengan Auto-Layout root frame vertikal dan tema warna Luxury Obsidian Titanium. Terintegrasi penuh dengan Harness MCP responsive verification.

Inputs: theme, projectName.

figcraft_ensure_guiA

Pastikan FigCraft GUI berjalan aktif dengan jendela interaktif di monitor pengguna pada port kontrol 9099.

Inputs: no named parameters.

figcraft_fix_overflowB

Pindai seluruh kanvas dan perbaiki otomatis teks yang melebihi batas kotaknya (text overflow) serta bersihkan karakter \n escaped mentah menjadi multiline wraps rapi dengan textAutoResize: "height".

Inputs: no named parameters.

figcraft_inspect_documentA

Inspeksi hierarki kanvas dokumen aktif: halaman, layer, frame, styling, dan bounding box.

Inputs: depth, allPages.

figcraft_open_fileA

Buka berkas desain (.figcraft, .json, .fig, .sketch, .svg, gambar) ke tab aktif di GUI FigCraft.

Inputs: filePath (required).

figcraft_save_fileC

Simpan dokumen aktif di FigCraft ke disk (.figcraft).

Inputs: path.

figcraft_screenshotC

Ambil snapshot visual kanvas aktif atau frame tertentu dalam format PNG untuk bukti Harness quality gate.

Inputs: ids, scale.

figcraft_set_propertiesC

Ubah properti visual (fills, stroke, tipografi, corner radius, corner smoothing, effects, auto-layout) pada node yang ada di kanvas.

Inputs: id (required), props (required).

fix_overflowA

Pindai seluruh kanvas dan perbaiki otomatis teks yang melebihi batas kotaknya (text overflow) serta bersihkan karakter \n escaped mentah menjadi multiline wraps rapi dengan textAutoResize: "height".

Inputs: no named parameters.

inspect_documentC

Inspeksi hierarki kanvas dokumen aktif: halaman, layer, frame, styling, dan bounding box.

Inputs: depth, allPages.

open_fileB

Buka berkas desain (.figcraft, .json, .fig, .sketch, .svg, gambar) ke tab aktif di GUI FigCraft.

Inputs: filePath (required).

save_fileB

Simpan dokumen aktif di FigCraft ke disk (.figcraft).

Inputs: path.

screenshotB

Ambil snapshot visual kanvas aktif atau frame tertentu dalam format PNG untuk bukti Harness quality gate.

Inputs: ids, scale.

set_propertiesB

Ubah properti visual (fills, stroke, tipografi, corner radius, corner smoothing, effects, auto-layout) pada node yang ada di kanvas.

Inputs: id (required), props (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 30 tools

    Disambiguation1/5

    Every single tool exists twice with byte-identical descriptions: `figcraft_create_and_open` and `create_and_open`, `figcraft_batch` and `batch`, etc. An agent has no principled way to choose between the prefixed and unprefixed variants — they appear to do exactly the same thing. This is the maximal case of overlapping tools.

    Naming Consistency2/5

    Individually the names follow a clean `verb_noun` snake_case pattern (create_node, set_properties, audit_layout). However the surface uses two parallel naming conventions simultaneously — a `figcraft_`-prefixed alias set and a bare alias set — with no stated rule for which to use, which is exactly the kind of mixed convention this dimension penalizes.

    Tool Count2/5

    The count is reported as 30, well past the 25+ threshold for 'too many', and in reality there are only ~15 unique operations duplicated 2x. The extra 15 tools earn no place in the surface and actively inflate the tool list an agent must scan.

    Completeness4/5

    The unique tool set covers the full canvas lifecycle for a Figma-like editor: create/open, node creation, autolayout, components, property mutation, theming, overflow repair, layout audit, document inspection, screenshot, save, and a generic `batch` escape hatch. Minor gaps exist (no explicit delete/remove-node, reorder, or grouping tool outside of batch), but these are workable.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI coding assistants to draw UI directly on a Figma Desktop canvas and read existing designs back as structured JSON, tokens, CSS, and screenshots, all over a localhost bridge without external API keys.
      299 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to create and modify native Figma canvas designs through a companion desktop plugin, generating AutoLayout UI trees, UX state matrices, and interactive component variants while auditing cognitive UX heuristics and user journeys.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI coding agents to control FigCraft Desktop in real time, streaming UI elements with live cursor feedback, auditing designs against Anti-Slop UI rules, and wiring interactive prototype flows.
      3
      MIT