Figma MCP Server

by xxflux
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • The MCP server is built with Bun, providing the runtime environment for the server implementation.

  • Provides tools for creating and modifying Figma designs through natural language prompts, including capabilities to create basic design elements, design complete page layouts, and modify existing designs.

  • The server is implemented in TypeScript, providing type safety and modern language features for the implementation.

Figma MCP(モデルコンテキストプロトコル)

モデル コンテキスト プロトコルを使用して、カーソル エージェントを通じて Figma デザインを作成および変更するための完全なソリューションです。

ブログ: https://xflux.us/2025/04/06/ai-powered-design-automation-building-a-figma-mcp-with-cursor/

概要

このプロジェクトは、Cursor Agent を介した自然言語プロンプトを用いて、Figma で AI を活用したデザイン作成を可能にします。このプロジェクトは、主に以下の 2 つのコンポーネントで構成されています。

  1. MCP サーバー: モデル コンテキスト プロトコルを実装し、WebSocket 経由で Figma プラグインと通信する Bun + TypeScript サーバー。
  2. Figma プラグイン:Figma 内で動作し、MCP サーバーからの指示に基づいてデザイン操作を実行するプラグイン。

この統合により、自然言語を使用して次のことが可能になります。

  • 基本的なデザイン要素(図形、テキストなど)を作成する
  • 複数のセクションを含む完全なページレイアウトを設計する
  • 既存のデザインを変更する

リポジトリ構造

  • figma-mcp-server/ : MCPサーバーの実装
  • figma-plugin/ : デザイン操作を実行するためのFigmaプラグイン

クイックスタート

1. MCPサーバーをセットアップする

cd figma-mcp-server cp .env.example .env # Edit this file to add your Figma token bun install bun run index.ts

2. Figmaプラグインを設定する

cd figma-plugin npm install npm run build

次に、プラグインを Figma にインポートします。

  1. Figmaを開く
  2. プラグイン > 開発 > マニフェストからプラグインをインポートに移動します
  3. figma-plugin/manifest.jsonファイルを選択する

3. カーソルエージェントに接続する

カーソル内:

  1. 設定 > エージェント > MCP サーバーに移動します
  2. URL: http://localhost:3000/api/mcp/schemaで新しいサーバーを追加します。

詳細なドキュメント

詳細な手順については、以下を参照してください。

使用例

すべての設定が完了したら、Cursor Agent を使用して次のようなプロンプトを含むデザインを作成できます。

Create a landing page with a header, hero section with heading "Our Product" and subheading "The best solution for your needs", 3 features in the features section, and a footer with contact information.

仕組み

  1. カーソルエージェントは自然言語プロンプトを受け取ります
  2. 構造化されたMCPリクエストをMCPサーバーに送信する
  3. MCPサーバーはリクエストを処理し、WebSocket経由でFigmaプラグインに指示を送信します。
  4. FigmaプラグインはFigmaのデザイン操作を実行します

ライセンス

マサチューセッツ工科大学

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

モデル コンテキスト プロトコルを実装する TypeScript サーバー。Cursor Agent を通じて自然言語プロンプトを使用して、Figma で AI を活用したデザイン作成を可能にします。

  1. Overview
    1. Repository Structure
      1. Quick Start
        1. 1. Set up the MCP Server
        2. 2. Set up the Figma Plugin
        3. 3. Connect to Cursor Agent
      2. Detailed Documentation
        1. Example Usage
          1. How It Works
            1. License
              ID: u62chj6z0c