figma-mcp
figma-mcp
高性能で双方向のModel Context Protocol(MCP)サーバー。Rustで書かれており、AIコーディングアシスタントをFigma Desktopに直接接続します。
AIエージェント(Claude Code、Cursor、Windsurf、Antigravity、VS Code、Zed)がFigmaキャンバス上に直接UIを描画し、既存のデザインを構造化されたJSONツリー、デザイントークン、CSS、スクリーンショットとして読み戻すことを可能にします。外部APIキーは一切不要です。
⚡ ハイライト
純Rustネイティブパフォーマンス:
< 1msで起動、~3MB RAM使用、GCポーズゼロ。双方向ブリッジ: AIはUIの書き込み(ベクター、コンポーネント、フレーム、オートレイアウトの描画)とデザインの読み取り(階層の抽出、スタイルの計算、キャンバスのキャプチャ)の両方が可能です。
サンドボックス化されたJSランタイム: デザインスクリプトの安全な実行を実現するBoa(純Rust ECMAScriptエンジン)を搭載。
組み込みアセットCDN: 7つのアイコンライブラリ(Ionicons、Lucide、Tabler、Bootstrap、Fluent、Phosphor)からSVGアイコンを自動取得し正規化します。
マルチタブ/マルチセッション対応: 複数の開いているFigmaファイルに同時にシームレス接続します。
100%ローカルホストプライバシー: すべての通信はHTTPロングポーリングを介して厳密に
127.0.0.1:38451上に留まります。
Related MCP server: Figma Dash MCP Server
🏛️ アーキテクチャ
┌─────────────────────────────────────────────────────────┐
│ Terminal (Standalone Server) │
│ figma-mcp │
│ • MCP SSE Transport (/sse, /message) │
│ • Sandboxed JS Runtime (Boa) │
│ • Built-in Asset & Icon Resolver │
│ • Async WebSocket & HTTP Long-Polling Bridge (Axum) │
└───────────────▲─────────────────────────▲───────────────┘
│ (ws://127.0.0.1:38451) │ (http://127.0.0.1:38451/sse)
│ │
┌─────────┴─────────┐ ┌─────────┴─────────┐
│ Figma Desktop │ │ AI Assistant(s) │
│ (Plugin Bridge) │ │ Antigravity/Cursor│
└───────────────────┘ │ Claude Code / Zed │
└───────────────────┘🚀 クイックスタート
1. NPXによるワンライン起動(Rustツールチェーン不要)
セットアップ不要で、Mac、Linux、Windowsのどのマシンでもfigma-mcpを起動できます:
npx figma-mcpこれにより、お使いのアーキテクチャ向けのプリビルドネイティブバイナリが自動的にダウンロードされ、サーバーが起動します。
または、Cursor / Claude Desktop / Windsurf / Antigravity MCP設定で設定する場合:
{
"mcpServers": {
"figma-mcp": {
"command": "npx",
"args": ["-y", "figma-mcp", "--stdio"]
}
}
}2. またはソースからビルド(Rust)
前提条件: Rustツールチェーン(cargo >= 1.80)。
git clone https://github.com/BuiHung1612/figma-mcp.git
cd figma-mcp
cargo build --release
./target/release/figma-mcp3. Figmaプラグインのインストール
Figma Desktopを開きます。
プラグイン → 開発 → マニフェストからプラグインをインポート... に移動します。
このリポジトリから
plugin/manifest.jsonファイルを選択します。プラグインを実行します(プラグイン → 開発 → Figma MCP Bridge)。
プラグインUIに緑のドット(接続済み)が表示されます。
4. MCPクライアントの設定
Google Antigravity(SSEトランスポート - 推奨)
~/.gemini/config/mcp_config.jsonまたはプロジェクトの.agents/mcp_config.jsonに追加します:
{
"mcpServers": {
"figma-mcp": {
"serverUrl": "http://127.0.0.1:38451/sse"
}
}
}Claude Code / Cursor / Windsurf / VS Code
SSEまたはstdioで接続できます:
オプションA: SSEトランスポート(推奨)
{
"mcpServers": {
"figma-mcp": {
"url": "http://127.0.0.1:38451/sse"
}
}
}オプションB: Stdioサブプロセス(NPX経由)
{
"mcpServers": {
"figma-mcp": {
"command": "npx",
"args": ["-y", "figma-mcp", "--stdio"]
}
}
}🛠️ MCPツールリファレンス
figma-mcpは7つのファーストクラスMCPツールを公開しています:
figma_get_selection
Figmaキャンバス上で現在選択されているレイヤー/フレームを超高速かつトークン圧縮で検査します。レイアウトとタイポグラフィの階層を60〜80%少ないトークンで返します。
figma_inspect_node
IDまたは名前で特定のノードを検査し、完全なデザインコンテキスト、CSS、オートレイアウトルール、タイポグラフィを返します。
figma_export_asset
任意のFigmaノード/レイヤーをPNG、JPG、SVGに直接エクスポートします。
outputPath: 指定すると(例:src/assets/logo.png)、ディスクに直接保存し、コンテキストウィンドウを大きなbase64文字列で埋める代わりに最小限のJSONメタデータを返します!
figma_status
ライブブリッジ接続ステータス、接続されているFigmaタブ、アクティブなファイル名、レイテンシ統計を確認します。
figma_write
サンドボックス化されたVM内でJavaScript描画コマンドを実行し、Figmaキャンバス上でデザインを構築または変更します。
オートレイアウト(
layoutMode、itemSpacing、padding)、タイポグラフィ、塗り、ストローク、角丸、ドロップシャドウ、コンポーネント作成をサポートします。アイコン読み込みをサポート:
figma.loadIcon("ionicons", "heart", { size: 24, fill: "#ff4757" })。画像挿入をサポート:
figma.loadImage(url, { width: 300, height: 200 })。
figma_read
高度なクエリのためのユニバーサルリーダー: get_design、scan_design、screenshot、export_svg、get_variables、get_styles、search_nodes。ファイルエクスポート用のoutputPathをサポートします。
figma_docs
figma_write用の組み込みドキュメント、デザインルール、レイアウトガイドライン、コード例を取得します。
section:"all"|"rules"|"layout"|"api"|"tokens"|"icons"
figma_rules
現在のFigmaドキュメントを監査し、AI生成を導くための一貫性ルールとトークン定義を生成します。
💻 開発とテスト
# Run server directly in debug mode
cargo run
# Build release binary
cargo build --release
# Run automated MCP test suite
./scripts/test-rust-mcp.sh
# Rebuild Figma plugin bundle (if plugin-src/ is modified)
node scripts/build-plugin.js📄 ライセンス
MIT © BuiHung1612 — 自由に使用、変更、配布できます。詳細はLICENSEを参照してください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceBidirectional MCP bridge enabling AI assistants to draw UI on Figma canvas and read designs back as structured data or code tokens via localhost, requiring Figma Desktop.5458225MIT
- FlicenseAqualityDmaintenanceConnects IDE to Figma Desktop App, enabling AI assistants to generate and manipulate layouts, shapes, and designs directly inside the Figma canvas.81
- FlicenseCqualityBmaintenanceLocal bridge enabling AI agents to inspect and edit the currently open Figma Desktop file through the Figma Plugin API.291
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to read and write a user's Figma file through the Figma Plugin API, offline and privately, without API tokens or rate limits.43MIT
Related MCP Connectors
The Figma MCP server brings Figma design context directly into your AI workflow.
Connect AI coding agents to Anima Playground, Figma, and your design system.
UI design from prompts, screenshots, and URLs for AI coding agents and theme tokens.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BuiHung1612/figma-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server