Logo vun figma-pilot

figma-pilot

Organisatioun
youware-labs

MCP that let AI agents control Figma through code execution

Editeuryouware-labs
Repositoryfigma-pilot
SproochTypeScript
Forks
10
Stären
106
Disponibel Tools
13
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    figma-pilot stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 13 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    106 Stären an 10 Forks aus dem verlinkte Repository.

figma-pilot

npm version License: MIT

AI agents control Figma through code execution.

English | 中文

Demo

OpenAI Landing Page

Prompt: "Create an OpenAI style landing page introducing the upcoming GPT 5.3 release on Figma"

OpenAI Landing Page Demo

Manus Design System

Prompt: "Generate a Manus design system components based on the screenshot, on Figma"

Manus Design System Demo

Design Philosophy

This project is inspired by Anthropic's Code execution with MCP approach.

Instead of exposing dozens of individual MCP tools (which bloat the context window and slow down agents), figma-pilot provides only 3 tools:

ToolDescription
figma_statusCheck connection status
figma_executeExecute JavaScript code with full Figma API
figma_get_api_docsGet API documentation

The AI writes code to interact with Figma. This means:

  • 90%+ fewer tokens in tool definitions
  • Batch operations - modify 100 elements in one call
  • Data filtering - filter results before returning to context
  • Complex workflows - loops, conditionals, error handling

Quick Start

Prerequisites

  • Node.js >= 18
  • Figma Desktop app
  • An MCP-compatible AI client (Claude Desktop, Claude Code, Cursor, Codex, etc.)

1. Install MCP Server

bash
# Claude Code
claude mcp add figma-pilot -- npx @youware-labs/figma-pilot-mcp

# Other MCP clients - add to your MCP config:
json
{
  "mcpServers": {
    "figma-pilot": {
      "command": "npx",
      "args": ["@youware-labs/figma-pilot-mcp"]
    }
  }
}

Config locations:

  • Claude Desktop: ~/.config/claude/claude_desktop_config.json (macOS/Linux)
  • Cursor: ~/.cursor/mcp.json

2. Install Skill (Recommended)

The skills/ folder contains API documentation that helps AI agents use figma_execute correctly. Install it to your AI client's skill directory:

AI ClientSkill Directory
Claude Code / Codex~/.codex/skills/figma-pilot
Cursor~/.cursor/skills-cursor/figma-pilot
Claude Desktop~/.claude/skills/figma-pilot

After installation, restart your AI client to pick up the new skill.

3. Install Figma Plugin

  1. Download figma-pilot-plugin-vX.X.X.zip from Releases
  2. Unzip the file
  3. In Figma: Plugins > Development > Import plugin from manifest...
  4. Select manifest.json from the unzipped folder
  5. Run: Plugins > Development > figma-pilot

4. Verify Connection

Ask your AI agent:

Check the Figma connection status

Usage Examples

Natural Language

Create a card with a title and description

What the AI Generates

Creating a Card:

javascript
await figma.create({
  type: 'card',
  name: 'User Card',
  children: [
    { type: 'text', content: 'Card Title', fontSize: 18, fontWeight: 600 },
    { type: 'text', content: 'Description here', fontSize: 14, fill: '#666' }
  ]
});

Batch Modifying Elements:

javascript
const { nodes } = await figma.query({ target: 'selection' });
const rects = nodes.filter(n => n.type === 'RECTANGLE');
for (const rect of rects) {
  await figma.modify({ target: rect.id, fill: '#0066FF', cornerRadius: 8 });
}
console.log(`Modified ${rects.length} rectangles`);

Accessibility Check:

javascript
const result = await figma.accessibility({ 
  target: 'page', 
  level: 'AA', 
  autoFix: true 
});
console.log(`Fixed ${result.fixedCount} of ${result.totalIssues} issues`);

API Reference

javascript
// Query & Modify
figma.query({ target })           // Query elements
figma.create({ type, ... })       // Create elements  
figma.modify({ target, ... })     // Modify elements
figma.delete({ target })          // Delete elements
figma.append({ target, parent })  // Move into container

// Components
figma.listComponents()            // List components
figma.instantiate({ component })  // Create instance
figma.toComponent({ target })     // Convert to component
figma.createVariants({ ... })     // Create variants

// Accessibility & Tokens
figma.accessibility({ target })   // WCAG checking
figma.createToken({ ... })        // Create design token
figma.bindToken({ ... })          // Bind token to element

// Export
figma.export({ target, format })  // Export as image

Full documentation: skills/SKILL.md

Architecture

┌─────────────┐     stdio      ┌─────────────────┐     HTTP      ┌──────────────┐
│ MCP Client  │ <------------> │  MCP Server     │ <-----------> │ Figma Plugin │
│             │                │  (with bridge)  │   port 38451  │              │
└─────────────┘                └─────────────────┘               └──────────────┘

Development

Project Structure

figma-pilot/
├── packages/
│   ├── cli/           # CLI application
│   ├── plugin/        # Figma plugin
│   ├── mcp-server/    # MCP server (npm package)
│   └── shared/        # Shared TypeScript types
├── scripts/
│   ├── install.sh     # Installation script
│   └── package-plugin.sh
└── skills/            # API documentation for AI agents

Building from Source

bash
git clone https://github.com/youware-labs/figma-pilot.git
cd figma-pilot
bun install && bun run build

Creating a Release

bash
# Build and package
bun run build
./scripts/package-plugin.sh 0.x.x

# Publish to npm
cd packages/mcp-server && npm publish --access public

# Create GitHub release
gh release create v0.x.x dist/releases/figma-pilot-plugin-v0.x.x.zip \
  --title "v0.x.x" \
  --notes "Release notes here"

Troubleshooting

Plugin Not Connecting

  1. Ensure MCP server is running (check your AI client's MCP status)
  2. Plugin should show "Connected" in Figma
  3. Try reopening the plugin
  4. Check that port 38451 is not blocked

Port 38451 Already in Use

bash
lsof -i :38451
kill <PID>

MCP Server Not Found

For offline use, install globally:

bash
npm install -g @youware-labs/figma-pilot-mcp

Plugin Error: "ENOENT: no such file or directory, lstat '.../dist/main.js'"

This error means the dist folder is missing from the plugin directory. This can happen if:

  1. The downloaded zip file was incomplete
  2. You're using the source code directly without building

Solution:

If you have the source code, build the plugin:

bash
cd packages/plugin
bun install
bun run build

Or build from the project root:

bash
bun run build:plugin

After building, verify that packages/plugin/dist/main.js and packages/plugin/dist/ui.html exist, then import the plugin again in Figma.

License

MIT - YouWare Labs

Installatioun

TypingMind
{
  "mcpServers": {
    "figma-pilot": {
      "command": "npx",
      "args": [
        "@youware-labs/figma-pilot-mcp"
      ]
    }
  }
}

Disponibel Tools

  • figma_status

    Check connection status to Figma plugin. Call this first to verify the plugin is running.

  • figma_list_components

    List all available components in the Figma file. Use this to discover reusable components before creating instances.

  • figma_create

    Create a new element in Figma. Supports frames, text, rectangles, ellipses, and semantic types like card, button, nav.

  • figma_modify

    Modify existing elements in Figma. Target by ID, name, or selection.

  • figma_delete

    Delete elements from Figma.

  • figma_append

    Move element(s) into a container frame.

  • figma_instantiate

    Create an instance of a component. Use list_components first to discover available components.

  • figma_selection

    Get information about the current selection in Figma.

  • figma_query

    Get detailed information about a specific element.

  • figma_to_component

    Convert an element to a reusable component.

  • figma_create_variants

    Create component variants with different property values.

  • figma_ensure_accessibility

    Check and optionally fix accessibility issues.

  • figma_export

    Export elements as images (PNG, SVG, PDF).

figma-pilot MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal figma-pilot verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

figma-pilot als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu figma-pilot an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "figma-pilot": {
      "command": "npx",
      "args": [
        "-y",
        "figma-pilot"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu figma-pilot. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu figma-pilot.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat figma-pilot?
figma-pilot
Jo. Ech hunn et gelies.
Dat hunn ech mat figma-pilot fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server figma-pilot benotzt?

figma-pilot ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech figma-pilot MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir figma-pilot mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat figma-pilot MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann figma-pilot verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech figma-pilot MCP mat TypingMind?

figma-pilot leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt figma-pilot MCP an TypingMind zur Verfügung?

figma-pilot stellt 13 MCP-Tools zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir figma-pilot MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann figma-pilot eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇