@mp3wizard/figma-console-mcp 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +816 -0
- package/dist/apps/design-system-dashboard/scoring/accessibility.d.ts +14 -0
- package/dist/apps/design-system-dashboard/scoring/accessibility.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/accessibility.js +278 -0
- package/dist/apps/design-system-dashboard/scoring/accessibility.js.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/component-metadata.d.ts +29 -0
- package/dist/apps/design-system-dashboard/scoring/component-metadata.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/component-metadata.js +358 -0
- package/dist/apps/design-system-dashboard/scoring/component-metadata.js.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/consistency.d.ts +14 -0
- package/dist/apps/design-system-dashboard/scoring/consistency.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/consistency.js +342 -0
- package/dist/apps/design-system-dashboard/scoring/consistency.js.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/coverage.d.ts +14 -0
- package/dist/apps/design-system-dashboard/scoring/coverage.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/coverage.js +231 -0
- package/dist/apps/design-system-dashboard/scoring/coverage.js.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/engine.d.ts +27 -0
- package/dist/apps/design-system-dashboard/scoring/engine.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/engine.js +93 -0
- package/dist/apps/design-system-dashboard/scoring/engine.js.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/naming-semantics.d.ts +14 -0
- package/dist/apps/design-system-dashboard/scoring/naming-semantics.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/naming-semantics.js +309 -0
- package/dist/apps/design-system-dashboard/scoring/naming-semantics.js.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/token-architecture.d.ts +14 -0
- package/dist/apps/design-system-dashboard/scoring/token-architecture.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/token-architecture.js +350 -0
- package/dist/apps/design-system-dashboard/scoring/token-architecture.js.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/types.d.ts +89 -0
- package/dist/apps/design-system-dashboard/scoring/types.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/types.js +41 -0
- package/dist/apps/design-system-dashboard/scoring/types.js.map +1 -0
- package/dist/apps/design-system-dashboard/server.d.ts +24 -0
- package/dist/apps/design-system-dashboard/server.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/server.js +160 -0
- package/dist/apps/design-system-dashboard/server.js.map +1 -0
- package/dist/apps/token-browser/server.d.ts +26 -0
- package/dist/apps/token-browser/server.d.ts.map +1 -0
- package/dist/apps/token-browser/server.js +137 -0
- package/dist/apps/token-browser/server.js.map +1 -0
- package/dist/browser/base.d.ts +58 -0
- package/dist/browser/base.d.ts.map +1 -0
- package/dist/browser/base.js +6 -0
- package/dist/browser/base.js.map +1 -0
- package/dist/browser/local.d.ts +87 -0
- package/dist/browser/local.d.ts.map +1 -0
- package/dist/browser/local.js +318 -0
- package/dist/browser/local.js.map +1 -0
- package/dist/cloudflare/apps/design-system-dashboard/scoring/accessibility.js +277 -0
- package/dist/cloudflare/apps/design-system-dashboard/scoring/component-metadata.js +357 -0
- package/dist/cloudflare/apps/design-system-dashboard/scoring/consistency.js +341 -0
- package/dist/cloudflare/apps/design-system-dashboard/scoring/coverage.js +230 -0
- package/dist/cloudflare/apps/design-system-dashboard/scoring/engine.js +92 -0
- package/dist/cloudflare/apps/design-system-dashboard/scoring/naming-semantics.js +308 -0
- package/dist/cloudflare/apps/design-system-dashboard/scoring/token-architecture.js +349 -0
- package/dist/cloudflare/apps/design-system-dashboard/scoring/types.js +40 -0
- package/dist/cloudflare/apps/design-system-dashboard/server.js +159 -0
- package/dist/cloudflare/apps/token-browser/server.js +136 -0
- package/dist/cloudflare/browser/base.js +5 -0
- package/dist/cloudflare/browser/cloudflare.js +156 -0
- package/dist/cloudflare/browser-manager.js +157 -0
- package/dist/cloudflare/core/cloud-websocket-connector.js +267 -0
- package/dist/cloudflare/core/cloud-websocket-relay.js +199 -0
- package/dist/cloudflare/core/comment-tools.js +292 -0
- package/dist/cloudflare/core/config.js +161 -0
- package/dist/cloudflare/core/console-monitor.js +427 -0
- package/dist/cloudflare/core/design-code-tools.js +2504 -0
- package/dist/cloudflare/core/design-system-manifest.js +260 -0
- package/dist/cloudflare/core/design-system-tools.js +863 -0
- package/dist/cloudflare/core/enrichment/enrichment-service.js +272 -0
- package/dist/cloudflare/core/enrichment/index.js +7 -0
- package/dist/cloudflare/core/enrichment/relationship-mapper.js +351 -0
- package/dist/cloudflare/core/enrichment/style-resolver.js +326 -0
- package/dist/cloudflare/core/figma-api.js +409 -0
- package/dist/cloudflare/core/figma-connector.js +7 -0
- package/dist/cloudflare/core/figma-desktop-connector.js +1184 -0
- package/dist/cloudflare/core/figma-reconstruction-spec.js +402 -0
- package/dist/cloudflare/core/figma-style-extractor.js +311 -0
- package/dist/cloudflare/core/figma-tools.js +2947 -0
- package/dist/cloudflare/core/logger.js +53 -0
- package/dist/cloudflare/core/port-discovery.js +282 -0
- package/dist/cloudflare/core/snippet-injector.js +96 -0
- package/dist/cloudflare/core/types/design-code.js +4 -0
- package/dist/cloudflare/core/types/enriched.js +5 -0
- package/dist/cloudflare/core/types/index.js +4 -0
- package/dist/cloudflare/core/websocket-connector.js +256 -0
- package/dist/cloudflare/core/websocket-server.js +646 -0
- package/dist/cloudflare/core/write-tools.js +2091 -0
- package/dist/cloudflare/index.js +2899 -0
- package/dist/cloudflare/test-browser.js +88 -0
- package/dist/core/comment-tools.d.ts +11 -0
- package/dist/core/comment-tools.d.ts.map +1 -0
- package/dist/core/comment-tools.js +293 -0
- package/dist/core/comment-tools.js.map +1 -0
- package/dist/core/config.d.ts +17 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +162 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/console-monitor.d.ts +82 -0
- package/dist/core/console-monitor.d.ts.map +1 -0
- package/dist/core/console-monitor.js +428 -0
- package/dist/core/console-monitor.js.map +1 -0
- package/dist/core/design-code-tools.d.ts +127 -0
- package/dist/core/design-code-tools.d.ts.map +1 -0
- package/dist/core/design-code-tools.js +2505 -0
- package/dist/core/design-code-tools.js.map +1 -0
- package/dist/core/design-system-manifest.d.ts +272 -0
- package/dist/core/design-system-manifest.d.ts.map +1 -0
- package/dist/core/design-system-manifest.js +261 -0
- package/dist/core/design-system-manifest.js.map +1 -0
- package/dist/core/design-system-tools.d.ts +17 -0
- package/dist/core/design-system-tools.d.ts.map +1 -0
- package/dist/core/design-system-tools.js +864 -0
- package/dist/core/design-system-tools.js.map +1 -0
- package/dist/core/enrichment/enrichment-service.d.ts +52 -0
- package/dist/core/enrichment/enrichment-service.d.ts.map +1 -0
- package/dist/core/enrichment/enrichment-service.js +273 -0
- package/dist/core/enrichment/enrichment-service.js.map +1 -0
- package/dist/core/enrichment/index.d.ts +8 -0
- package/dist/core/enrichment/index.d.ts.map +1 -0
- package/dist/core/enrichment/index.js +8 -0
- package/dist/core/enrichment/index.js.map +1 -0
- package/dist/core/enrichment/relationship-mapper.d.ts +106 -0
- package/dist/core/enrichment/relationship-mapper.d.ts.map +1 -0
- package/dist/core/enrichment/relationship-mapper.js +352 -0
- package/dist/core/enrichment/relationship-mapper.js.map +1 -0
- package/dist/core/enrichment/style-resolver.d.ts +80 -0
- package/dist/core/enrichment/style-resolver.d.ts.map +1 -0
- package/dist/core/enrichment/style-resolver.js +327 -0
- package/dist/core/enrichment/style-resolver.js.map +1 -0
- package/dist/core/figma-api.d.ts +201 -0
- package/dist/core/figma-api.d.ts.map +1 -0
- package/dist/core/figma-api.js +410 -0
- package/dist/core/figma-api.js.map +1 -0
- package/dist/core/figma-connector.d.ts +48 -0
- package/dist/core/figma-connector.d.ts.map +1 -0
- package/dist/core/figma-connector.js +8 -0
- package/dist/core/figma-connector.js.map +1 -0
- package/dist/core/figma-desktop-connector.d.ts +265 -0
- package/dist/core/figma-desktop-connector.d.ts.map +1 -0
- package/dist/core/figma-desktop-connector.js +1184 -0
- package/dist/core/figma-desktop-connector.js.map +1 -0
- package/dist/core/figma-reconstruction-spec.d.ts +166 -0
- package/dist/core/figma-reconstruction-spec.d.ts.map +1 -0
- package/dist/core/figma-reconstruction-spec.js +403 -0
- package/dist/core/figma-reconstruction-spec.js.map +1 -0
- package/dist/core/figma-style-extractor.d.ts +76 -0
- package/dist/core/figma-style-extractor.d.ts.map +1 -0
- package/dist/core/figma-style-extractor.js +312 -0
- package/dist/core/figma-style-extractor.js.map +1 -0
- package/dist/core/figma-tools.d.ts +23 -0
- package/dist/core/figma-tools.d.ts.map +1 -0
- package/dist/core/figma-tools.js +2948 -0
- package/dist/core/figma-tools.js.map +1 -0
- package/dist/core/logger.d.ts +22 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +54 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/port-discovery.d.ts +110 -0
- package/dist/core/port-discovery.d.ts.map +1 -0
- package/dist/core/port-discovery.js +283 -0
- package/dist/core/port-discovery.js.map +1 -0
- package/dist/core/snippet-injector.d.ts +24 -0
- package/dist/core/snippet-injector.d.ts.map +1 -0
- package/dist/core/snippet-injector.js +97 -0
- package/dist/core/snippet-injector.js.map +1 -0
- package/dist/core/types/design-code.d.ts +262 -0
- package/dist/core/types/design-code.d.ts.map +1 -0
- package/dist/core/types/design-code.js +5 -0
- package/dist/core/types/design-code.js.map +1 -0
- package/dist/core/types/enriched.d.ts +213 -0
- package/dist/core/types/enriched.d.ts.map +1 -0
- package/dist/core/types/enriched.js +6 -0
- package/dist/core/types/enriched.js.map +1 -0
- package/dist/core/types/index.d.ts +112 -0
- package/dist/core/types/index.d.ts.map +1 -0
- package/dist/core/types/index.js +5 -0
- package/dist/core/types/index.js.map +1 -0
- package/dist/core/websocket-connector.d.ts +55 -0
- package/dist/core/websocket-connector.d.ts.map +1 -0
- package/dist/core/websocket-connector.js +257 -0
- package/dist/core/websocket-connector.js.map +1 -0
- package/dist/core/websocket-server.d.ts +191 -0
- package/dist/core/websocket-server.d.ts.map +1 -0
- package/dist/core/websocket-server.js +647 -0
- package/dist/core/websocket-server.js.map +1 -0
- package/dist/core/write-tools.d.ts +7 -0
- package/dist/core/write-tools.d.ts.map +1 -0
- package/dist/core/write-tools.js +2092 -0
- package/dist/core/write-tools.js.map +1 -0
- package/dist/local.d.ts +84 -0
- package/dist/local.d.ts.map +1 -0
- package/dist/local.js +5039 -0
- package/dist/local.js.map +1 -0
- package/figma-desktop-bridge/README.md +313 -0
- package/figma-desktop-bridge/code.js +2818 -0
- package/figma-desktop-bridge/manifest.json +67 -0
- package/figma-desktop-bridge/ui.html +1236 -0
- package/package.json +87 -0
package/README.md
ADDED
|
@@ -0,0 +1,816 @@
|
|
|
1
|
+
# Figma Console MCP Server
|
|
2
|
+
|
|
3
|
+
[](https://modelcontextprotocol.io/)
|
|
4
|
+
[](https://www.npmjs.com/package/figma-console-mcp)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://docs.figma-console-mcp.southleft.com)
|
|
7
|
+
[](https://github.com/sponsors/southleft)
|
|
8
|
+
|
|
9
|
+
> **Your design system as an API.** Model Context Protocol server that bridges design and development—giving AI assistants complete access to Figma for **extraction**, **creation**, and **debugging**.
|
|
10
|
+
|
|
11
|
+
> **🆕 Cross-File Library Components — Use Published Design Systems Across Files:** AI assistants can now discover and instantiate components from published shared libraries into your working file. Search your design system by URL, browse components with full variant detail, and place them — no manual copy-paste needed. [See changelog →](CHANGELOG.md)
|
|
12
|
+
|
|
13
|
+
## What is this?
|
|
14
|
+
|
|
15
|
+
Figma Console MCP connects AI assistants (like Claude) to Figma, enabling:
|
|
16
|
+
|
|
17
|
+
- **🐛 Plugin debugging** - Capture console logs, errors, and stack traces
|
|
18
|
+
- **📸 Visual debugging** - Take screenshots for context
|
|
19
|
+
- **🎨 Design system extraction** - Pull variables, components, and styles
|
|
20
|
+
- **✏️ Design creation** - Create UI components, frames, and layouts directly in Figma
|
|
21
|
+
- **🔧 Variable management** - Create, update, rename, and delete design tokens
|
|
22
|
+
- **⚡ Real-time monitoring** - Watch logs as plugins execute
|
|
23
|
+
- **☁️ Cloud Write Relay** - Web AI clients (Claude.ai, v0, Replit) can design in Figma via cloud pairing
|
|
24
|
+
- **🔄 Four ways to connect** - Remote SSE, Cloud Mode, NPX, or Local Git
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## ⚡ Quick Start
|
|
29
|
+
|
|
30
|
+
### Choose Your Setup
|
|
31
|
+
|
|
32
|
+
**First, decide what you want to do:**
|
|
33
|
+
|
|
34
|
+
| I want to... | Setup Method | Time |
|
|
35
|
+
|--------------|--------------|------|
|
|
36
|
+
| **Create and modify designs with AI** | [NPX Setup](#-npx-setup-recommended) (Recommended) | ~10 min |
|
|
37
|
+
| **Design from the web** (Claude.ai, v0, Replit, Lovable) | [Cloud Mode](#-cloud-mode-web-ai-clients) | ~5 min |
|
|
38
|
+
| **Contribute to the project** | [Local Git Setup](#for-contributors-local-git-mode) | ~15 min |
|
|
39
|
+
| **Just explore my design data** (read-only) | [Remote SSE](#-remote-sse-read-only-exploration) | ~2 min |
|
|
40
|
+
|
|
41
|
+
### ⚠️ Important: Capability Differences
|
|
42
|
+
|
|
43
|
+
| Capability | NPX / Local Git | Cloud Mode | Remote SSE |
|
|
44
|
+
|------------|-----------------|------------|------------|
|
|
45
|
+
| Read design data | ✅ | ✅ | ✅ |
|
|
46
|
+
| **Create components & frames** | ✅ | ✅ | ❌ |
|
|
47
|
+
| **Edit existing designs** | ✅ | ✅ | ❌ |
|
|
48
|
+
| **Manage design tokens/variables** | ✅ | ✅ | ❌ |
|
|
49
|
+
| Real-time monitoring (console, selection) | ✅ | ❌ | ❌ |
|
|
50
|
+
| Desktop Bridge plugin | ✅ | ✅ | ❌ |
|
|
51
|
+
| Requires Node.js | Yes | **No** | No |
|
|
52
|
+
| **Total tools available** | **59+** | **43** | **22** |
|
|
53
|
+
|
|
54
|
+
> **Bottom line:** Remote SSE is **read-only** with ~38% of the tools. **Cloud Mode** unlocks write access from web AI clients without Node.js. NPX/Local Git gives the full 60+ tools with real-time monitoring.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### 🚀 NPX Setup (Recommended)
|
|
59
|
+
|
|
60
|
+
**Best for:** Designers who want full AI-assisted design capabilities.
|
|
61
|
+
|
|
62
|
+
**What you get:** All 60+ tools including design creation, variable management, and component instantiation.
|
|
63
|
+
|
|
64
|
+
#### Prerequisites
|
|
65
|
+
|
|
66
|
+
- [ ] **Node.js 18+** — Check with `node --version` ([Download](https://nodejs.org))
|
|
67
|
+
- [ ] **Figma Desktop** installed (not just the web app)
|
|
68
|
+
- [ ] **An MCP client** (Claude Code, Cursor, Windsurf, Claude Desktop, etc.)
|
|
69
|
+
|
|
70
|
+
#### Step 1: Get Your Figma Token
|
|
71
|
+
|
|
72
|
+
1. Go to [Manage personal access tokens](https://help.figma.com/hc/en-us/articles/8085703771159-Manage-personal-access-tokens) in Figma Help
|
|
73
|
+
2. Follow the steps to **create a new personal access token**
|
|
74
|
+
3. Enter description: `Figma Console MCP`
|
|
75
|
+
4. **Copy the token** — you won't see it again! (starts with `figd_`)
|
|
76
|
+
|
|
77
|
+
#### Step 2: Configure Your MCP Client
|
|
78
|
+
|
|
79
|
+
**Claude Code (CLI):**
|
|
80
|
+
```bash
|
|
81
|
+
claude mcp add figma-console -s user -e FIGMA_ACCESS_TOKEN=figd_YOUR_TOKEN_HERE -e ENABLE_MCP_APPS=true -- npx -y figma-console-mcp@latest
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Cursor / Windsurf / Claude Desktop:**
|
|
85
|
+
|
|
86
|
+
Add to your MCP config file (see [Where to find your config file](#-where-to-find-your-config-file) below):
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"mcpServers": {
|
|
91
|
+
"figma-console": {
|
|
92
|
+
"command": "npx",
|
|
93
|
+
"args": ["-y", "figma-console-mcp@latest"],
|
|
94
|
+
"env": {
|
|
95
|
+
"FIGMA_ACCESS_TOKEN": "figd_YOUR_TOKEN_HERE",
|
|
96
|
+
"ENABLE_MCP_APPS": "true"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
#### 📂 Where to Find Your Config File
|
|
104
|
+
|
|
105
|
+
If you're not sure where to put the JSON configuration above, here's where each app stores its MCP config:
|
|
106
|
+
|
|
107
|
+
| App | macOS | Windows |
|
|
108
|
+
|-----|-------|---------|
|
|
109
|
+
| **Claude Desktop** | `~/Library/Application Support/Claude/claude_desktop_config.json` | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
110
|
+
| **Claude Code (CLI)** | `~/.claude.json` | `%USERPROFILE%\.claude.json` |
|
|
111
|
+
| **Cursor** | `~/.cursor/mcp.json` | `%USERPROFILE%\.cursor\mcp.json` |
|
|
112
|
+
| **Windsurf** | `~/.codeium/windsurf/mcp_config.json` | `%USERPROFILE%\.codeium\windsurf\mcp_config.json` |
|
|
113
|
+
|
|
114
|
+
> **Tip for designers:** The `~` symbol means your **home folder**. On macOS, that's `/Users/YourName/`. On Windows, it's `C:\Users\YourName\`. You can open these files in any text editor — even TextEdit or Notepad.
|
|
115
|
+
>
|
|
116
|
+
> **Can't find the file?** If it doesn't exist yet, create it. The app will pick it up on its next restart. Make sure the entire file is valid JSON (watch for missing commas or brackets).
|
|
117
|
+
>
|
|
118
|
+
> **Claude Code users:** You can skip manual editing entirely. Just run the `claude mcp add` command above and it handles everything for you.
|
|
119
|
+
|
|
120
|
+
#### Step 3: Connect to Figma Desktop
|
|
121
|
+
|
|
122
|
+
**Desktop Bridge Plugin:**
|
|
123
|
+
1. Open Figma Desktop normally (no special flags needed)
|
|
124
|
+
2. Go to **Plugins → Development → Import plugin from manifest...**
|
|
125
|
+
3. Select `figma-desktop-bridge/manifest.json` from the figma-console-mcp directory
|
|
126
|
+
- **NPX users:** Run `npx figma-console-mcp@latest --print-path` to find the directory
|
|
127
|
+
4. Run the plugin in your Figma file — it auto-connects via WebSocket (scans ports 9223–9232)
|
|
128
|
+
|
|
129
|
+
> One-time setup. The plugin persists in your Development plugins list across sessions.
|
|
130
|
+
|
|
131
|
+
#### Step 4: Restart Your MCP Client
|
|
132
|
+
|
|
133
|
+
Restart your MCP client to load the new configuration.
|
|
134
|
+
|
|
135
|
+
#### Step 5: Test It!
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
Check Figma status
|
|
139
|
+
```
|
|
140
|
+
→ Should show connection status with active WebSocket transport
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
Create a simple frame with a blue background
|
|
144
|
+
```
|
|
145
|
+
→ Should create a frame in Figma (confirms write access!)
|
|
146
|
+
|
|
147
|
+
**📖 [Complete Setup Guide](docs/setup.md)**
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
### For Contributors: Local Git Mode
|
|
152
|
+
|
|
153
|
+
**Best for:** Developers who want to modify source code or contribute to the project.
|
|
154
|
+
|
|
155
|
+
**What you get:** Same 60+ tools as NPX, plus full source code access.
|
|
156
|
+
|
|
157
|
+
#### Quick Setup
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Clone and build
|
|
161
|
+
git clone https://github.com/southleft/figma-console-mcp.git
|
|
162
|
+
cd figma-console-mcp
|
|
163
|
+
npm install
|
|
164
|
+
npm run build:local
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
#### Configure Your MCP Client
|
|
168
|
+
|
|
169
|
+
Add to your config file (see [Where to find your config file](#-where-to-find-your-config-file)):
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{
|
|
173
|
+
"mcpServers": {
|
|
174
|
+
"figma-console": {
|
|
175
|
+
"command": "node",
|
|
176
|
+
"args": ["/absolute/path/to/figma-console-mcp/dist/local.js"],
|
|
177
|
+
"env": {
|
|
178
|
+
"FIGMA_ACCESS_TOKEN": "figd_YOUR_TOKEN_HERE",
|
|
179
|
+
"ENABLE_MCP_APPS": "true"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Then follow [NPX Steps 3-5](#step-3-connect-to-figma-desktop) above.
|
|
187
|
+
|
|
188
|
+
**📖 [Complete Setup Guide](docs/setup.md)**
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
### 📡 Remote SSE (Read-Only Exploration)
|
|
193
|
+
|
|
194
|
+
**Best for:** Quickly evaluating the tool or read-only design data extraction.
|
|
195
|
+
|
|
196
|
+
**What you get:** 22 read-only tools — view data, take screenshots, read logs, design-code parity. **Cannot create or modify designs.**
|
|
197
|
+
|
|
198
|
+
#### Claude Desktop (UI Method)
|
|
199
|
+
|
|
200
|
+
1. Open Claude Desktop → **Settings** → **Connectors**
|
|
201
|
+
2. Click **"Add Custom Connector"**
|
|
202
|
+
3. Enter:
|
|
203
|
+
- **Name:** `Figma Console (Read-Only)`
|
|
204
|
+
- **URL:** `https://figma-console-mcp.southleft.com/sse`
|
|
205
|
+
4. Click **"Add"** — Done! ✅
|
|
206
|
+
|
|
207
|
+
OAuth authentication happens automatically when you first use design system tools.
|
|
208
|
+
|
|
209
|
+
#### Claude Code
|
|
210
|
+
|
|
211
|
+
> **⚠️ Known Issue:** Claude Code's native `--transport sse` has a [bug](https://github.com/anthropics/claude-code/issues/2466). Use `mcp-remote` instead:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
claude mcp add figma-console -s user -- npx -y mcp-remote@latest https://figma-console-mcp.southleft.com/sse
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**💡 Tip:** For full capabilities, use [NPX Setup](#-npx-setup-recommended) instead of Remote SSE.
|
|
218
|
+
|
|
219
|
+
#### Other Clients (Cursor, Windsurf, etc.)
|
|
220
|
+
|
|
221
|
+
```json
|
|
222
|
+
{
|
|
223
|
+
"mcpServers": {
|
|
224
|
+
"figma-console": {
|
|
225
|
+
"command": "npx",
|
|
226
|
+
"args": ["-y", "mcp-remote", "https://figma-console-mcp.southleft.com/sse"]
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
#### Upgrading to Full Capabilities
|
|
233
|
+
|
|
234
|
+
Ready for design creation? Follow the [NPX Setup](#-npx-setup-recommended) guide above, or try [Cloud Mode](#-cloud-mode-web-ai-clients) if you don't want to install Node.js.
|
|
235
|
+
|
|
236
|
+
**📖 [Complete Setup Guide](docs/setup.md)**
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
### ☁️ Cloud Mode (Web AI Clients)
|
|
241
|
+
|
|
242
|
+
**Best for:** Using Claude.ai, v0, Replit, or Lovable to create and modify Figma designs — no Node.js required.
|
|
243
|
+
|
|
244
|
+
**What you get:** 43 tools including full write access — design creation, variable management, component instantiation, and all REST API tools. Only real-time monitoring (console logs, selection tracking, document changes) requires Local Mode.
|
|
245
|
+
|
|
246
|
+
#### Prerequisites
|
|
247
|
+
|
|
248
|
+
- [ ] **Figma Personal Access Token** — [Create one here](https://help.figma.com/hc/en-us/articles/8085703771159-Manage-personal-access-tokens) (starts with `figd_`)
|
|
249
|
+
- [ ] **Figma Desktop** with the Desktop Bridge plugin installed (see [Desktop Bridge setup](#step-3-connect-to-figma-desktop))
|
|
250
|
+
- [ ] **A web AI client** that supports MCP (Claude.ai, Lovable, v0, Replit, etc.)
|
|
251
|
+
|
|
252
|
+
#### Step 1: Add the MCP Connector
|
|
253
|
+
|
|
254
|
+
Add this endpoint to your AI platform's MCP settings:
|
|
255
|
+
|
|
256
|
+
**URL:** `https://figma-console-mcp.southleft.com/mcp`
|
|
257
|
+
**Auth:** Your Figma PAT as Bearer token
|
|
258
|
+
|
|
259
|
+
In **Claude.ai**: Settings → Connectors → Add Custom Connector → paste the URL above.
|
|
260
|
+
In **Lovable/v0/Replit**: Look for "Add MCP Server" or "Integrations" in settings → paste the URL and add your token.
|
|
261
|
+
|
|
262
|
+
#### Step 2: Pair the Plugin
|
|
263
|
+
|
|
264
|
+
1. **Open the Desktop Bridge plugin** in Figma Desktop (Plugins → Development → Figma Desktop Bridge)
|
|
265
|
+
2. **Tell your AI assistant:**
|
|
266
|
+
```
|
|
267
|
+
Connect to my Figma plugin
|
|
268
|
+
```
|
|
269
|
+
3. **The AI gives you a 6-character pairing code** (expires in 5 minutes)
|
|
270
|
+
4. **In the plugin:** Toggle "Cloud Mode" → enter the code → click Connect
|
|
271
|
+
5. **You're paired!** Full write access is now available
|
|
272
|
+
|
|
273
|
+
#### What You Can Do
|
|
274
|
+
|
|
275
|
+
Once paired, use natural language to design:
|
|
276
|
+
```
|
|
277
|
+
Create a card component with a header image, title, description, and action button
|
|
278
|
+
Set up a color token collection with Light and Dark modes
|
|
279
|
+
Add a "High Contrast" mode to my existing token collection
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
#### How It Works
|
|
283
|
+
|
|
284
|
+
Your AI client sends write commands through the cloud MCP server, which relays them via WebSocket to the Desktop Bridge plugin running in your Figma Desktop. The plugin executes the commands using the Figma Plugin API and returns results back through the same path.
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
AI Client → Cloud MCP Server → Durable Object Relay → Desktop Bridge Plugin → Figma
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
> **Variables on any plan:** Cloud Mode uses the Plugin API (not the Enterprise REST API), so variable management works on Free, Pro, and Organization plans.
|
|
291
|
+
|
|
292
|
+
**📖 [Complete Setup Guide](docs/setup.md)**
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## 📊 Installation Method Comparison
|
|
297
|
+
|
|
298
|
+
| Feature | NPX (Recommended) | Cloud Mode | Local Git | Remote SSE |
|
|
299
|
+
|---------|-------------------|------------|-----------|------------|
|
|
300
|
+
| **Setup time** | ~10 minutes | ~5 minutes | ~15 minutes | ~2 minutes |
|
|
301
|
+
| **Total tools** | **59+** | **43** | **59+** | **22** (read-only) |
|
|
302
|
+
| **Design creation** | ✅ | ✅ | ✅ | ❌ |
|
|
303
|
+
| **Variable management** | ✅ | ✅ | ✅ | ❌ |
|
|
304
|
+
| **Component instantiation** | ✅ | ✅ | ✅ | ❌ |
|
|
305
|
+
| **Real-time monitoring** | ✅ | ❌ | ✅ | ❌ |
|
|
306
|
+
| **Desktop Bridge plugin** | ✅ | ✅ | ✅ | ❌ |
|
|
307
|
+
| **Variables (no Enterprise)** | ✅ | ✅ | ✅ | ❌ |
|
|
308
|
+
| **Console logs** | ✅ (zero latency) | ❌ | ✅ (zero latency) | ✅ |
|
|
309
|
+
| **Read design data** | ✅ | ✅ | ✅ | ✅ |
|
|
310
|
+
| **Requires Node.js** | Yes | **No** | Yes | No |
|
|
311
|
+
| **Authentication** | PAT (manual) | OAuth (automatic) | PAT (manual) | OAuth (automatic) |
|
|
312
|
+
| **Automatic updates** | ✅ (`@latest`) | ✅ | Manual (`git pull`) | ✅ |
|
|
313
|
+
| **Source code access** | ❌ | ❌ | ✅ | ❌ |
|
|
314
|
+
|
|
315
|
+
> **Key insight:** Remote SSE is read-only. Cloud Mode adds write access for web AI clients without Node.js. NPX/Local Git give the full 60+ tools.
|
|
316
|
+
|
|
317
|
+
**📖 [Complete Feature Comparison](docs/mode-comparison.md)**
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## 🎯 Test Your Connection
|
|
322
|
+
|
|
323
|
+
After setup, try these prompts:
|
|
324
|
+
|
|
325
|
+
**Basic test (all modes):**
|
|
326
|
+
```
|
|
327
|
+
Navigate to https://www.figma.com and check status
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
**Design system test (requires auth):**
|
|
331
|
+
```
|
|
332
|
+
Get design variables from [your Figma file URL]
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
**Cloud Mode test:**
|
|
336
|
+
```
|
|
337
|
+
Connect to my Figma plugin
|
|
338
|
+
```
|
|
339
|
+
→ Follow the pairing flow, then try: "Create a simple blue rectangle"
|
|
340
|
+
|
|
341
|
+
**Plugin test (Local Mode only):**
|
|
342
|
+
```
|
|
343
|
+
Show me the primary font for [your theme name]
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
## 🔐 Authentication
|
|
349
|
+
|
|
350
|
+
### Remote Mode - OAuth (Automatic)
|
|
351
|
+
|
|
352
|
+
When you first use design system tools:
|
|
353
|
+
1. Browser opens automatically to Figma authorization page
|
|
354
|
+
2. Click "Allow" to authorize (one-time)
|
|
355
|
+
3. Token stored securely and refreshed automatically
|
|
356
|
+
4. Works with Free, Pro, and Enterprise Figma plans
|
|
357
|
+
|
|
358
|
+
### Local Mode - Personal Access Token (Manual)
|
|
359
|
+
|
|
360
|
+
1. Visit https://help.figma.com/hc/en-us/articles/8085703771159-Manage-personal-access-tokens
|
|
361
|
+
2. Generate token
|
|
362
|
+
3. Add to MCP config as `FIGMA_ACCESS_TOKEN` environment variable
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## 🛠️ Available Tools
|
|
367
|
+
|
|
368
|
+
### Navigation & Status
|
|
369
|
+
- `figma_navigate` - Open Figma URLs
|
|
370
|
+
- `figma_get_status` - Check connection status
|
|
371
|
+
|
|
372
|
+
### Console Debugging
|
|
373
|
+
- `figma_get_console_logs` - Retrieve console logs
|
|
374
|
+
- `figma_watch_console` - Real-time log streaming
|
|
375
|
+
- `figma_clear_console` - Clear log buffer
|
|
376
|
+
- `figma_reload_plugin` - Reload current page
|
|
377
|
+
|
|
378
|
+
### Visual Debugging
|
|
379
|
+
- `figma_take_screenshot` - Capture UI screenshots
|
|
380
|
+
|
|
381
|
+
### Design System Extraction
|
|
382
|
+
- `figma_get_design_system_kit` - **Full design system in one call** — tokens, components, styles, visual specs
|
|
383
|
+
- `figma_get_variables` - Extract design tokens/variables
|
|
384
|
+
- `figma_get_component` - Get component data (metadata or reconstruction spec)
|
|
385
|
+
- `figma_get_component_for_development` - Component + image
|
|
386
|
+
- `figma_get_component_image` - Just the image
|
|
387
|
+
- `figma_get_styles` - Color, text, effect styles
|
|
388
|
+
- `figma_get_file_data` - Full file structure
|
|
389
|
+
- `figma_get_file_for_plugin` - Optimized file data
|
|
390
|
+
|
|
391
|
+
### ☁️ Cloud Relay
|
|
392
|
+
- `figma_pair_plugin` - Generate a pairing code to connect a Desktop Bridge plugin via the cloud relay
|
|
393
|
+
|
|
394
|
+
### ✏️ Design Creation (Local Mode + Cloud Mode)
|
|
395
|
+
- `figma_execute` - **Power tool**: Run any Figma Plugin API code to create designs
|
|
396
|
+
- Create frames, shapes, text, components
|
|
397
|
+
- Apply auto-layout, styles, effects
|
|
398
|
+
- Build complete UI mockups programmatically
|
|
399
|
+
- `figma_arrange_component_set` - **Organize variants into professional component sets**
|
|
400
|
+
- Convert multiple component variants into a proper Figma component set
|
|
401
|
+
- Applies native purple dashed border visualization automatically
|
|
402
|
+
- Creates white container frame with title, row labels, and column headers
|
|
403
|
+
- Row labels vertically centered with each grid row
|
|
404
|
+
- Column headers horizontally centered with each column
|
|
405
|
+
- Use natural language like "arrange these variants" or "organize as component set"
|
|
406
|
+
- `figma_set_description` - **Document components with rich descriptions**
|
|
407
|
+
- Add descriptions to components, component sets, and styles
|
|
408
|
+
- Supports markdown formatting for rich documentation
|
|
409
|
+
- Descriptions appear in Dev Mode for developers
|
|
410
|
+
|
|
411
|
+
### 🔍 Design-Code Parity (All Modes)
|
|
412
|
+
- `figma_check_design_parity` - Compare Figma component specs against code implementation, producing a scored diff report with actionable fix items
|
|
413
|
+
- `figma_generate_component_doc` - Generate platform-agnostic markdown documentation by merging Figma design data with code-side info
|
|
414
|
+
|
|
415
|
+
### 🔧 Variable Management (Local Mode + Cloud Mode)
|
|
416
|
+
- `figma_create_variable_collection` - Create new variable collections with modes
|
|
417
|
+
- `figma_create_variable` - Create COLOR, FLOAT, STRING, or BOOLEAN variables
|
|
418
|
+
- `figma_update_variable` - Update variable values in specific modes
|
|
419
|
+
- `figma_rename_variable` - Rename variables while preserving values
|
|
420
|
+
- `figma_delete_variable` - Delete variables
|
|
421
|
+
- `figma_delete_variable_collection` - Delete collections and all their variables
|
|
422
|
+
- `figma_add_mode` - Add modes to collections (e.g., "Dark", "Mobile")
|
|
423
|
+
- `figma_rename_mode` - Rename existing modes
|
|
424
|
+
- `figma_batch_create_variables` - Create up to 100 variables in one call (10-50x faster)
|
|
425
|
+
- `figma_batch_update_variables` - Update up to 100 variable values in one call
|
|
426
|
+
- `figma_setup_design_tokens` - Create complete token system (collection + modes + variables) atomically
|
|
427
|
+
|
|
428
|
+
**📖 [Detailed Tool Documentation](docs/TOOLS.md)**
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
## 📖 Example Prompts
|
|
433
|
+
|
|
434
|
+
### Cloud Mode (Web AI Clients)
|
|
435
|
+
```
|
|
436
|
+
Connect to my Figma plugin so we can start designing
|
|
437
|
+
Pair with my Figma file and create a login form with email, password, and submit button
|
|
438
|
+
Set up a brand color token collection with Light and Dark modes
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
### Plugin Debugging
|
|
442
|
+
```
|
|
443
|
+
Navigate to my Figma plugin and show me any console errors
|
|
444
|
+
Watch the console for 30 seconds while I test my plugin
|
|
445
|
+
Get the last 20 console logs
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
### Design System Extraction
|
|
449
|
+
```
|
|
450
|
+
Get all design variables from https://figma.com/design/abc123
|
|
451
|
+
Extract color styles and show me the CSS exports
|
|
452
|
+
Get the Button component with a visual reference image
|
|
453
|
+
Get the Badge component in reconstruction format for programmatic creation
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
### Design Creation (Local Mode + Cloud Mode)
|
|
457
|
+
```
|
|
458
|
+
Create a success notification card with a checkmark icon and message
|
|
459
|
+
Design a button component with hover and disabled states
|
|
460
|
+
Build a navigation bar with logo, menu items, and user avatar
|
|
461
|
+
Create a modal dialog with header, content area, and action buttons
|
|
462
|
+
Arrange these button variants into a component set
|
|
463
|
+
Organize my icon variants as a proper component set with the purple border
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
### Variable Management (Local Mode + Cloud Mode)
|
|
467
|
+
```
|
|
468
|
+
Create a new color collection called "Brand Colors" with Light and Dark modes
|
|
469
|
+
Add a primary color variable with value #3B82F6 for Light and #60A5FA for Dark
|
|
470
|
+
Rename the "Default" mode to "Light Theme"
|
|
471
|
+
Add a "High Contrast" mode to the existing collection
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
### Design-Code Parity
|
|
475
|
+
```
|
|
476
|
+
Compare the Button component in Figma against our React implementation
|
|
477
|
+
Check design parity for the Card component before sign-off
|
|
478
|
+
Generate component documentation for the Dialog from our design system
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
### Visual Debugging
|
|
482
|
+
```
|
|
483
|
+
Take a screenshot of the current Figma canvas
|
|
484
|
+
Navigate to this file and capture what's on screen
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
**📖 [More Use Cases & Examples](docs/USE_CASES.md)**
|
|
488
|
+
|
|
489
|
+
---
|
|
490
|
+
|
|
491
|
+
## 🎨 AI-Assisted Design Creation
|
|
492
|
+
|
|
493
|
+
> **Requires Desktop Bridge:** This feature works with Local Mode (NPX or Local Git) and [Cloud Mode](#-cloud-mode-web-ai-clients). Remote SSE without Cloud Mode pairing is read-only and cannot create or modify designs.
|
|
494
|
+
|
|
495
|
+
One of the most powerful capabilities of this MCP server is the ability to **design complete UI components and pages directly in Figma through natural language conversation** with any MCP-compatible AI assistant like Claude Desktop or Claude Code.
|
|
496
|
+
|
|
497
|
+
### What's Possible
|
|
498
|
+
|
|
499
|
+
**Create original designs from scratch:**
|
|
500
|
+
```
|
|
501
|
+
Design a login card with email and password fields, a "Forgot password?" link,
|
|
502
|
+
and a primary Sign In button. Use 32px padding, 16px border radius, and subtle shadow.
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
**Leverage existing component libraries:**
|
|
506
|
+
```
|
|
507
|
+
Build a dashboard header using the Avatar component for the user profile,
|
|
508
|
+
Button components for actions, and Badge components for notifications.
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
**Generate complete page layouts:**
|
|
512
|
+
```
|
|
513
|
+
Create a settings page with a sidebar navigation, a main content area with form fields,
|
|
514
|
+
and a sticky footer with Save and Cancel buttons.
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
### How It Works
|
|
518
|
+
|
|
519
|
+
1. **You describe what you want** in plain English
|
|
520
|
+
2. **The AI searches your component library** using `figma_search_components` to find relevant building blocks
|
|
521
|
+
3. **Components are instantiated** with proper variants and properties via `figma_instantiate_component`
|
|
522
|
+
4. **Custom elements are created** using the full Figma Plugin API via `figma_execute`
|
|
523
|
+
5. **Visual validation** automatically captures screenshots and iterates until the design looks right
|
|
524
|
+
|
|
525
|
+
### Who Benefits
|
|
526
|
+
|
|
527
|
+
| Role | Use Case |
|
|
528
|
+
|------|----------|
|
|
529
|
+
| **Designers** | Rapidly prototype ideas without manual frame-by-frame construction. Explore variations quickly by describing changes. |
|
|
530
|
+
| **Developers** | Generate UI mockups during planning discussions. Create visual specs without switching to design tools. |
|
|
531
|
+
| **Product Managers** | Sketch out feature concepts during ideation. Communicate visual requirements directly to stakeholders. |
|
|
532
|
+
| **Design System Teams** | Test component flexibility by generating compositions. Identify gaps in component coverage. |
|
|
533
|
+
| **Agencies** | Speed up initial concept delivery. Iterate on client feedback in real-time during calls. |
|
|
534
|
+
|
|
535
|
+
### Example Workflows
|
|
536
|
+
|
|
537
|
+
**Brand New Design:**
|
|
538
|
+
> "Create a notification toast with an icon on the left, title and description text, and a dismiss button. Use our brand colors."
|
|
539
|
+
|
|
540
|
+
The AI creates custom frames, applies your design tokens, and builds the component from scratch.
|
|
541
|
+
|
|
542
|
+
**Component Composition:**
|
|
543
|
+
> "Build a user profile card using the Avatar component (large size), two Button components (Edit Profile and Settings), and a Badge for the user's status."
|
|
544
|
+
|
|
545
|
+
The AI searches your library, finds the exact components, and assembles them with proper spacing and alignment.
|
|
546
|
+
|
|
547
|
+
**Design Iteration:**
|
|
548
|
+
> "The spacing feels too tight. Increase the gap between sections to 24px and make the heading larger."
|
|
549
|
+
|
|
550
|
+
The AI modifies the existing design, takes a screenshot to verify, and continues iterating until you're satisfied.
|
|
551
|
+
|
|
552
|
+
### Visual Validation
|
|
553
|
+
|
|
554
|
+
The AI automatically follows a validation workflow after creating designs:
|
|
555
|
+
|
|
556
|
+
1. **Create** → Execute the design code
|
|
557
|
+
2. **Screenshot** → Capture the result
|
|
558
|
+
3. **Analyze** → Check alignment, spacing, and visual balance
|
|
559
|
+
4. **Iterate** → Fix any issues detected
|
|
560
|
+
5. **Verify** → Final screenshot to confirm
|
|
561
|
+
|
|
562
|
+
This ensures designs aren't just technically correct—they *look* right.
|
|
563
|
+
|
|
564
|
+
---
|
|
565
|
+
|
|
566
|
+
## 🎨 Desktop Bridge Plugin (Recommended Connection)
|
|
567
|
+
|
|
568
|
+
The **Figma Desktop Bridge** plugin is the recommended way to connect Figma to the MCP server. It communicates via WebSocket — no special Figma launch flags needed, and it persists across Figma restarts.
|
|
569
|
+
|
|
570
|
+
### Setup
|
|
571
|
+
|
|
572
|
+
1. Open Figma Desktop (normal launch — no debug flags needed)
|
|
573
|
+
2. Go to **Plugins → Development → Import plugin from manifest...**
|
|
574
|
+
3. Select `figma-desktop-bridge/manifest.json` from the figma-console-mcp directory
|
|
575
|
+
4. Run the plugin in your Figma file — it auto-connects via WebSocket (scans ports 9223–9232)
|
|
576
|
+
5. Ask your AI: "Check Figma status" to verify the connection
|
|
577
|
+
|
|
578
|
+
> **One-time import.** Once imported, the plugin stays in your Development plugins list. Just run it whenever you want to use the MCP.
|
|
579
|
+
|
|
580
|
+
**📖 [Desktop Bridge Documentation](figma-desktop-bridge/README.md)**
|
|
581
|
+
|
|
582
|
+
### Capabilities
|
|
583
|
+
|
|
584
|
+
**Read Operations:**
|
|
585
|
+
- Variables without Enterprise API
|
|
586
|
+
- Reliable component descriptions (bypasses API bugs)
|
|
587
|
+
- Multi-mode support (Light/Dark/Brand variants)
|
|
588
|
+
- Real-time selection tracking and document change monitoring
|
|
589
|
+
|
|
590
|
+
**Write Operations:**
|
|
591
|
+
- **Design Creation** - Create frames, shapes, text, components via `figma_execute`
|
|
592
|
+
- **Variable Management** - Full CRUD operations on variables and collections
|
|
593
|
+
- **Mode Management** - Add and rename modes for multi-theme support
|
|
594
|
+
|
|
595
|
+
### How the Transport Works
|
|
596
|
+
|
|
597
|
+
- The MCP server communicates via **WebSocket** through the Desktop Bridge plugin
|
|
598
|
+
- The server tries port 9223 first, then automatically falls back through ports 9224–9232 if needed
|
|
599
|
+
- The plugin scans all ports in the range and connects to every active server it finds
|
|
600
|
+
- All 60+ tools work through the WebSocket transport
|
|
601
|
+
|
|
602
|
+
**Multiple files:** The WebSocket server supports multiple simultaneous plugin connections — one per open Figma file. Each connection is tracked by file key with independent state (selection, document changes, console logs).
|
|
603
|
+
|
|
604
|
+
**Environment variables:**
|
|
605
|
+
- `FIGMA_WS_PORT` — Override the preferred WebSocket port (default: 9223). The server will fall back through a 10-port range starting from this value if the preferred port is occupied.
|
|
606
|
+
- `FIGMA_WS_HOST` — Override the WebSocket server bind address (default: `localhost`). Set to `0.0.0.0` when running inside Docker so the host machine can reach the MCP server.
|
|
607
|
+
|
|
608
|
+
**Cloud Mode:** The plugin also supports a **Cloud Mode** toggle for pairing with web AI clients (Claude.ai, v0, Replit, Lovable). Toggle "Cloud Mode" in the plugin UI, enter the 6-character pairing code from your AI assistant, and click Connect. See [Cloud Mode](#-cloud-mode-web-ai-clients) for details.
|
|
609
|
+
|
|
610
|
+
**Plugin Limitation:** In Local Mode, works with NPX or Local Git. In Cloud Mode, pairs with the remote MCP endpoint. Remote SSE without Cloud Mode pairing is read-only.
|
|
611
|
+
|
|
612
|
+
---
|
|
613
|
+
|
|
614
|
+
## 🔀 Multi-Instance Support (v1.10.0)
|
|
615
|
+
|
|
616
|
+
Figma Console MCP now supports **multiple simultaneous instances** — perfect for designers and developers who work across multiple projects or use Claude Desktop's Chat and Code tabs at the same time.
|
|
617
|
+
|
|
618
|
+
### The Problem (Before v1.10.0)
|
|
619
|
+
|
|
620
|
+
When two processes tried to start the MCP server (e.g., Claude Desktop's Chat tab and Code tab), the second one would crash with `EADDRINUSE` because both competed for port 9223.
|
|
621
|
+
|
|
622
|
+
### How It Works Now
|
|
623
|
+
|
|
624
|
+
- The server tries port **9223** first (the default)
|
|
625
|
+
- If that port is already taken, it automatically tries **9224**, then **9225**, and so on up to **9232**
|
|
626
|
+
- The Desktop Bridge plugin in Figma connects to **all** active servers simultaneously
|
|
627
|
+
- Every server instance receives real-time events (selection changes, document changes, console logs)
|
|
628
|
+
- `figma_get_status` shows which port you're on and lists other active instances
|
|
629
|
+
|
|
630
|
+
### What This Means for You
|
|
631
|
+
|
|
632
|
+
| Scenario | Before v1.10.0 | Now |
|
|
633
|
+
|----------|----------------|-----|
|
|
634
|
+
| Two Claude Desktop tabs (Chat + Code) | Second tab crashes | Both work independently |
|
|
635
|
+
| Multiple CLI terminals on different projects | Only one can run | All run simultaneously |
|
|
636
|
+
| Claude Desktop + Claude Code CLI | Port conflict | Both coexist |
|
|
637
|
+
|
|
638
|
+
### Do I Need to Do Anything?
|
|
639
|
+
|
|
640
|
+
**If you're running a single instance:** Nothing changes. You'll still use port 9223 as before.
|
|
641
|
+
|
|
642
|
+
**If you want multi-instance:** Re-import the Desktop Bridge plugin in Figma (Plugins → Development → Import plugin from manifest). This updates the plugin to scan all ports and connect to every active server.
|
|
643
|
+
|
|
644
|
+
> **Note:** The server-side update happens automatically when you update the npm package. Only the plugin needs a one-time re-import to enable multi-connection support.
|
|
645
|
+
|
|
646
|
+
---
|
|
647
|
+
|
|
648
|
+
## 🧩 MCP Apps (Experimental)
|
|
649
|
+
|
|
650
|
+
Figma Console MCP includes support for **MCP Apps** — rich interactive UI experiences that render directly inside any MCP client that supports the [MCP Apps protocol extension](https://github.com/anthropics/anthropic-cookbook/tree/main/misc/model_context_protocol/ext-apps). Built with the official [`@modelcontextprotocol/ext-apps`](https://www.npmjs.com/package/@modelcontextprotocol/ext-apps) SDK.
|
|
651
|
+
|
|
652
|
+
> **What are MCP Apps?** Traditional MCP tools return text or images to the AI. MCP Apps go further — they render interactive HTML interfaces inline in the chat, allowing users to browse, filter, and interact with data directly without consuming AI context.
|
|
653
|
+
|
|
654
|
+
### Token Browser
|
|
655
|
+
|
|
656
|
+
An interactive design token explorer.
|
|
657
|
+
|
|
658
|
+
**Usage:** Ask Claude to "browse the design tokens" or "show me the design tokens" while connected to a Figma file.
|
|
659
|
+
|
|
660
|
+
**Features:**
|
|
661
|
+
- Browse all tokens organized by collection with expandable sections
|
|
662
|
+
- Filter by type (Colors, Numbers, Strings) and search by name/description
|
|
663
|
+
- Per-collection mode columns (Light, Dark, Custom) matching Figma's Variables panel
|
|
664
|
+
- Color swatches, alias resolution, and click-to-copy on any value
|
|
665
|
+
- Works without Enterprise plan via Desktop Bridge (local mode)
|
|
666
|
+
|
|
667
|
+
### Design System Dashboard
|
|
668
|
+
|
|
669
|
+
A Lighthouse-style health scorecard that audits your design system across six categories.
|
|
670
|
+
|
|
671
|
+
**Usage:** Ask Claude to "audit the design system" or "show me design system health" while connected to a Figma file.
|
|
672
|
+
|
|
673
|
+
**Features:**
|
|
674
|
+
- Overall weighted score (0–100) with six category gauges: Naming, Tokens, Components, Accessibility, Consistency, Coverage
|
|
675
|
+
- Expandable category sections with individual findings, severity indicators, and actionable details
|
|
676
|
+
- Diagnostic locations linking findings to specific variables, components, or collections
|
|
677
|
+
- Tooltips explaining each check's purpose and scoring criteria
|
|
678
|
+
- Refresh button to re-run the audit without consuming AI context
|
|
679
|
+
- Pure scoring engine with no external dependencies — all analysis runs locally
|
|
680
|
+
|
|
681
|
+
**Enabling MCP Apps:**
|
|
682
|
+
|
|
683
|
+
MCP Apps are enabled by default in the setup configurations above (via `"ENABLE_MCP_APPS": "true"`). If you set up before v1.10.0 and don't have this in your config, add it to your `env` section:
|
|
684
|
+
|
|
685
|
+
```json
|
|
686
|
+
"env": {
|
|
687
|
+
"FIGMA_ACCESS_TOKEN": "figd_YOUR_TOKEN_HERE",
|
|
688
|
+
"ENABLE_MCP_APPS": "true"
|
|
689
|
+
}
|
|
690
|
+
```
|
|
691
|
+
|
|
692
|
+
> **Note:** MCP Apps require an MCP client with [ext-apps protocol](https://github.com/anthropics/anthropic-cookbook/tree/main/misc/model_context_protocol/ext-apps) support (e.g. Claude Desktop). This feature is experimental and the protocol may evolve.
|
|
693
|
+
|
|
694
|
+
### Future MCP Apps Roadmap
|
|
695
|
+
|
|
696
|
+
Planned MCP Apps:
|
|
697
|
+
|
|
698
|
+
- **Component Gallery** — Visual browser for searching and previewing components with variant exploration
|
|
699
|
+
- **Style Inspector** — Interactive panel for exploring color, text, and effect styles with live previews
|
|
700
|
+
- **Variable Diff Viewer** — Side-by-side comparison of token values across modes and branches
|
|
701
|
+
|
|
702
|
+
The architecture supports adding new apps with minimal boilerplate — each app is a self-contained module with its own server-side tool registration and client-side UI.
|
|
703
|
+
|
|
704
|
+
---
|
|
705
|
+
|
|
706
|
+
## 🚀 Advanced Topics
|
|
707
|
+
|
|
708
|
+
- **[Setup Guide](docs/SETUP.md)** - Complete setup guide for all MCP clients
|
|
709
|
+
- **[Self-Hosting](docs/SELF_HOSTING.md)** - Deploy your own instance on Cloudflare
|
|
710
|
+
- **[Architecture](docs/ARCHITECTURE.md)** - How it works under the hood
|
|
711
|
+
- **[OAuth Setup](docs/OAUTH_SETUP.md)** - Configure OAuth for self-hosted deployments
|
|
712
|
+
- **[Troubleshooting](docs/TROUBLESHOOTING.md)** - Common issues and solutions
|
|
713
|
+
|
|
714
|
+
---
|
|
715
|
+
|
|
716
|
+
## 🤝 vs. Figma Official MCP
|
|
717
|
+
|
|
718
|
+
**Figma Console MCP (This Project)** - Debugging & data extraction
|
|
719
|
+
- ✅ Real-time console logs from Figma plugins
|
|
720
|
+
- ✅ Screenshot capture and visual debugging
|
|
721
|
+
- ✅ Error stack traces and runtime monitoring
|
|
722
|
+
- ✅ Raw design data extraction (JSON)
|
|
723
|
+
- ✅ Works remotely or locally
|
|
724
|
+
|
|
725
|
+
**Figma Official Dev Mode MCP** - Code generation
|
|
726
|
+
- ✅ Generates React/HTML code from designs
|
|
727
|
+
- ✅ Tailwind/CSS class generation
|
|
728
|
+
- ✅ Component boilerplate scaffolding
|
|
729
|
+
|
|
730
|
+
**Use both together** for the complete workflow: generate code with Official MCP, then debug and extract data with Console MCP.
|
|
731
|
+
|
|
732
|
+
---
|
|
733
|
+
|
|
734
|
+
## 🛤️ Roadmap
|
|
735
|
+
|
|
736
|
+
**Current Status:** v1.12.0 (Stable) - Production-ready with Cloud Write Relay, Design System Kit, WebSocket-only connectivity, smart multi-file tracking, 60+ tools, Comments API, and MCP Apps
|
|
737
|
+
|
|
738
|
+
**Recent Releases:**
|
|
739
|
+
- [x] **v1.12.0** - Cloud Write Relay: web AI clients (Claude.ai, v0, Replit, Lovable) can create and modify Figma designs via cloud relay pairing — no Node.js required
|
|
740
|
+
- [x] **v1.11.2** - Screenshot fix: `figma_take_screenshot` works without explicit `nodeId` in WebSocket mode
|
|
741
|
+
- [x] **v1.11.1** - Doc generator fixes: clean markdown tables, Storybook links, property metadata filtering
|
|
742
|
+
- [x] **v1.11.0** - Complete CDP removal, improved multi-file active tracking with focus detection
|
|
743
|
+
- [x] **v1.10.0** - Multi-instance support (dynamic port fallback 9223–9232, multi-connection plugin, instance discovery)
|
|
744
|
+
- [x] **v1.9.0** - Figma Comments tools, improved port conflict detection
|
|
745
|
+
- [x] **v1.8.0** - WebSocket Bridge transport (CDP-free connectivity), real-time selection/document tracking, `figma_get_selection` + `figma_get_design_changes` tools
|
|
746
|
+
- [x] **v1.7.0** - MCP Apps (Token Browser, Design System Dashboard), batch variable operations, design-code parity tools
|
|
747
|
+
- [x] **v1.5.0** - Node manipulation tools, component property management, component set arrangement
|
|
748
|
+
- [x] **v1.3.0** - Design creation via `figma_execute`, variable CRUD operations
|
|
749
|
+
|
|
750
|
+
**Coming Next:**
|
|
751
|
+
- [ ] **Component template library** - Common UI pattern generation
|
|
752
|
+
- [ ] **Visual regression testing** - Screenshot diff capabilities
|
|
753
|
+
- [ ] **Design linting** - Automated compliance and accessibility checks
|
|
754
|
+
- [ ] **AI enhancements** - Intelligent component suggestions and auto-layout optimization
|
|
755
|
+
|
|
756
|
+
**📖 [Full Roadmap](docs/ROADMAP.md)**
|
|
757
|
+
|
|
758
|
+
---
|
|
759
|
+
|
|
760
|
+
## 🔒 Security
|
|
761
|
+
|
|
762
|
+
This repository has undergone **two security reviews** — most recently on 2026-03-18 (v1.14.0).
|
|
763
|
+
|
|
764
|
+
### What Was Reviewed
|
|
765
|
+
|
|
766
|
+
- Authentication & token handling
|
|
767
|
+
- Input validation and sanitization
|
|
768
|
+
- Rate limiting and abuse prevention
|
|
769
|
+
- Error message exposure
|
|
770
|
+
- Dependency vulnerabilities
|
|
771
|
+
- Secrets management
|
|
772
|
+
|
|
773
|
+
### Review Outcome
|
|
774
|
+
|
|
775
|
+
All identified security findings have been addressed and patched in this fork. No sensitive credentials are exposed, and error messages have been sanitized to prevent information leakage.
|
|
776
|
+
|
|
777
|
+
📄 **Latest report:** [SECURITY-REVIEW-2026-03-18.md](Security%20review%20report/SECURITY-REVIEW-2026-03-18.md)
|
|
778
|
+
📄 **Previous report:** [SECURITY-REVIEW-2026-03-16.md](Security%20review%20report/SECURITY-REVIEW-2026-03-16.md)
|
|
779
|
+
|
|
780
|
+
---
|
|
781
|
+
|
|
782
|
+
## 💻 Development
|
|
783
|
+
|
|
784
|
+
```bash
|
|
785
|
+
git clone https://github.com/southleft/figma-console-mcp.git
|
|
786
|
+
cd figma-console-mcp
|
|
787
|
+
npm install
|
|
788
|
+
|
|
789
|
+
# Local mode development
|
|
790
|
+
npm run dev:local
|
|
791
|
+
|
|
792
|
+
# Cloud mode development
|
|
793
|
+
npm run dev
|
|
794
|
+
|
|
795
|
+
# Build
|
|
796
|
+
npm run build
|
|
797
|
+
```
|
|
798
|
+
|
|
799
|
+
**📖 [Development Guide](docs/ARCHITECTURE.md)**
|
|
800
|
+
|
|
801
|
+
---
|
|
802
|
+
|
|
803
|
+
## 📄 License
|
|
804
|
+
|
|
805
|
+
MIT - See [LICENSE](LICENSE) file for details.
|
|
806
|
+
|
|
807
|
+
---
|
|
808
|
+
|
|
809
|
+
## 🔗 Links
|
|
810
|
+
|
|
811
|
+
- 📚 **[Documentation Site](https://docs.figma-console-mcp.southleft.com)** — Complete guides, tutorials, and API reference
|
|
812
|
+
- 📖 [Local Docs](docs/) — Documentation source files
|
|
813
|
+
- 🐛 [Report Issues](https://github.com/southleft/figma-console-mcp/issues)
|
|
814
|
+
- 💬 [Discussions](https://github.com/southleft/figma-console-mcp/discussions)
|
|
815
|
+
- 🌐 [Model Context Protocol](https://modelcontextprotocol.io/)
|
|
816
|
+
- 🎨 [Figma API](https://www.figma.com/developers/api)
|