figma-pilotのロゴ

figma-pilot

組織
youware-labs

MCP that let AI agents control Figma through code execution

公開者youware-labs
リポジトリfigma-pilot
言語TypeScript
フォーク
10
スター
106
利用可能なツール
13
通信方式stdio
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    figma-pilotは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 13個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには106件のスターと10件のフォークがあります。

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

インストール

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

利用可能なツール

  • 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を複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度figma-pilotに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

figma-pilotをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. figma-pilotのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "figma-pilot": {
      "command": "npx",
      "args": [
        "-y",
        "figma-pilot"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてfigma-pilotのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. figma-pilotのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
figma-pilotを使ってこのタスクを手伝ってもらえますか?
figma-pilot
はい、読みました。
figma-pilotで調べた結果をお伝えします。

よくある質問

figma-pilot MCPサーバーは何に使いますか?

figma-pilotは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでfigma-pilot MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでfigma-pilotを利用できます。

TypingMindでfigma-pilot MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。figma-pilotを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

figma-pilot MCPをTypingMindに接続するにはどうすればよいですか?

figma-pilotはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでfigma-pilot MCPのどのようなツールを利用できますか?

figma-pilotは13個のMCPツールを提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

figma-pilot MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。figma-pilotで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇