Figma MCP サーバー
Figma ファイル構造を分析するための MCP (Model Context Protocol) サーバー。
特徴
- Figmaファイルを分析してノード階層を抽出する
- REST APIとMCPプロトコルの両方をサポート
- 設定可能なノードツリーの深さ
前提条件
- Node.js 16以上
- npmまたはyarn
- Figma APIキー
インストール
npmから
出典
構成
サンプル環境ファイルをコピーし、Figma API キーを追加します。
次に、 .env
ファイルを編集し、Figma API キーを追加します。
Figma アカウント設定から Figma API キーを取得できます: https://www.figma.com/developers/api#access-tokens
使用法
REST APIサーバーとして
サーバーを起動します。
これにより、ポート 3000 (または.env
ファイルで指定されたポート) で Express サーバーが起動します。
APIエンドポイント
GET /health
- ヘルスチェックエンドポイントGET /openapi.json
- OpenAPI仕様GET /mcp.json
- MCP マニフェストPOST /analyze
- Figma ファイルを解析する
分析エンドポイントへのリクエストの例:
MCPサーバーとして
サーバーは、MCP プロトコルを介して LLM によって直接使用できます。
またはソースから実行する場合:
クライアントの例
シンプルなクライアントサンプルが含まれています。使い方は以下のとおりです。
最後のパラメータはオプションの深度パラメータです。
発達
開発モードで実行
テスト
ドッカー
コンテナ化されたデプロイメント用に Dockerfile が提供されています。
ライセンス
マサチューセッツ工科大学
You must be authenticated.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
REST API または MCP プロトコル経由でアクセス可能なノード階層を抽出することで、Figma ファイル構造の分析を容易にします。
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityEnables seamless interaction with Figma via the Model Context Protocol, allowing LLM applications to access, manipulate, and track Figma files, components, and variables.Last updated -2106TypeScript
- -securityAlicense-qualityEnables Cursor to access Figma files through the Model Context Protocol, enhancing its ability to accurately interpret and utilize design data for code generation.Last updated -560,7388,062TypeScriptMIT License
- -securityAlicense-qualityFigma MCP with full API functionalityLast updated -5416TypeScriptMIT License
- -securityFlicense-qualityExtracts components from Figma designs and transforms them into standardized JSON format for easy consumption by AI models and tools for interface reconstruction.Last updated -TypeScript