@mp3wizard/figma-console-mcp 1.27.2 β 1.29.1
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/README.md +21 -12
- package/dist/apps/design-system-dashboard/mcp-app.html +78 -78
- package/dist/apps/token-browser/mcp-app.html +60 -59
- package/dist/cloudflare/core/design-system-tools.js +1 -1
- package/dist/cloudflare/core/figma-api.js +19 -0
- package/dist/cloudflare/core/library-tools.js +580 -0
- package/dist/cloudflare/core/tokens/alias-resolver.js +37 -0
- package/dist/cloudflare/core/tokens/formatters/json.js +185 -5
- package/dist/cloudflare/core/tokens/formatters/scss.js +251 -3
- package/dist/cloudflare/core/tokens/formatters/stubs.js +6 -4
- package/dist/cloudflare/core/tokens/formatters/style-dictionary-v3.js +206 -3
- package/dist/cloudflare/core/tokens/formatters/tailwind-v3.js +236 -3
- package/dist/cloudflare/core/tokens/formatters/tailwind-v4.js +329 -3
- package/dist/cloudflare/core/tokens/formatters/tokens-studio.js +249 -3
- package/dist/cloudflare/core/tokens/formatters/ts-module.js +197 -3
- package/dist/cloudflare/core/tokens/index.js +1 -1
- package/dist/cloudflare/core/tokens/parsers/stubs.js +13 -6
- package/dist/cloudflare/core/tokens-tools.js +12 -2
- package/dist/cloudflare/index.js +15 -7
- package/dist/core/design-system-tools.d.ts +50 -0
- package/dist/core/design-system-tools.d.ts.map +1 -1
- package/dist/core/design-system-tools.js +1 -1
- package/dist/core/design-system-tools.js.map +1 -1
- package/dist/core/figma-api.d.ts +15 -0
- package/dist/core/figma-api.d.ts.map +1 -1
- package/dist/core/figma-api.js +19 -0
- package/dist/core/figma-api.js.map +1 -1
- package/dist/core/library-tools.d.ts +17 -0
- package/dist/core/library-tools.d.ts.map +1 -0
- package/dist/core/library-tools.js +581 -0
- package/dist/core/library-tools.js.map +1 -0
- package/dist/core/tokens/alias-resolver.d.ts +15 -0
- package/dist/core/tokens/alias-resolver.d.ts.map +1 -1
- package/dist/core/tokens/alias-resolver.js +37 -0
- package/dist/core/tokens/alias-resolver.js.map +1 -1
- package/dist/core/tokens/formatters/json.d.ts +34 -2
- package/dist/core/tokens/formatters/json.d.ts.map +1 -1
- package/dist/core/tokens/formatters/json.js +185 -5
- package/dist/core/tokens/formatters/json.js.map +1 -1
- package/dist/core/tokens/formatters/scss.d.ts +23 -1
- package/dist/core/tokens/formatters/scss.d.ts.map +1 -1
- package/dist/core/tokens/formatters/scss.js +251 -3
- package/dist/core/tokens/formatters/scss.js.map +1 -1
- package/dist/core/tokens/formatters/stubs.d.ts +3 -3
- package/dist/core/tokens/formatters/stubs.d.ts.map +1 -1
- package/dist/core/tokens/formatters/stubs.js +6 -4
- package/dist/core/tokens/formatters/stubs.js.map +1 -1
- package/dist/core/tokens/formatters/style-dictionary-v3.d.ts +42 -1
- package/dist/core/tokens/formatters/style-dictionary-v3.d.ts.map +1 -1
- package/dist/core/tokens/formatters/style-dictionary-v3.js +206 -3
- package/dist/core/tokens/formatters/style-dictionary-v3.js.map +1 -1
- package/dist/core/tokens/formatters/tailwind-v3.d.ts +34 -1
- package/dist/core/tokens/formatters/tailwind-v3.d.ts.map +1 -1
- package/dist/core/tokens/formatters/tailwind-v3.js +236 -3
- package/dist/core/tokens/formatters/tailwind-v3.js.map +1 -1
- package/dist/core/tokens/formatters/tailwind-v4.d.ts +38 -1
- package/dist/core/tokens/formatters/tailwind-v4.d.ts.map +1 -1
- package/dist/core/tokens/formatters/tailwind-v4.js +329 -3
- package/dist/core/tokens/formatters/tailwind-v4.js.map +1 -1
- package/dist/core/tokens/formatters/tokens-studio.d.ts +41 -1
- package/dist/core/tokens/formatters/tokens-studio.d.ts.map +1 -1
- package/dist/core/tokens/formatters/tokens-studio.js +249 -3
- package/dist/core/tokens/formatters/tokens-studio.js.map +1 -1
- package/dist/core/tokens/formatters/ts-module.d.ts +32 -1
- package/dist/core/tokens/formatters/ts-module.d.ts.map +1 -1
- package/dist/core/tokens/formatters/ts-module.js +197 -3
- package/dist/core/tokens/formatters/ts-module.js.map +1 -1
- package/dist/core/tokens/index.d.ts +1 -1
- package/dist/core/tokens/index.d.ts.map +1 -1
- package/dist/core/tokens/index.js +1 -1
- package/dist/core/tokens/index.js.map +1 -1
- package/dist/core/tokens/parsers/stubs.d.ts +9 -5
- package/dist/core/tokens/parsers/stubs.d.ts.map +1 -1
- package/dist/core/tokens/parsers/stubs.js +13 -6
- package/dist/core/tokens/parsers/stubs.js.map +1 -1
- package/dist/core/tokens-tools.d.ts.map +1 -1
- package/dist/core/tokens-tools.js +12 -2
- package/dist/core/tokens-tools.js.map +1 -1
- package/dist/local.d.ts.map +1 -1
- package/dist/local.js +6 -0
- package/dist/local.js.map +1 -1
- package/figma-desktop-bridge/code.js +1 -1
- package/package.json +18 -3
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
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**, **debugging**, and **bidirectional token sync**.
|
|
10
10
|
|
|
11
|
-
> **π
|
|
11
|
+
> **π Shared Library Inspection (v1.29.0):** Three new tools fill the gap between "I see a component key in search results" and "I can actually use it." `figma_get_library_component_by_key` resolves any component key to full property definitions + variant keys + visual specs β without needing the source library file's URL. `figma_get_library_variables` lists every variable from your subscribed libraries (no Enterprise plan required β uses the Plugin API path that works on Pro and Org). `figma_import_library_variable` brings a library token into the current file so it can be bound to nodes alongside the file's own variables. Works on every Figma plan. 106 tools total. [See what's new β](CHANGELOG.md#1290---2026-05-22)
|
|
12
12
|
|
|
13
13
|
## What is this?
|
|
14
14
|
|
|
@@ -55,9 +55,9 @@ Figma Console MCP connects AI assistants (like Claude) to Figma, enabling:
|
|
|
55
55
|
| Real-time monitoring (console, selection) | β
| β | β |
|
|
56
56
|
| Desktop Bridge plugin | β
| β
| β |
|
|
57
57
|
| Requires Node.js | Yes | **No** | No |
|
|
58
|
-
| **Total tools available** | **
|
|
58
|
+
| **Total tools available** | **106** | **95** | **9** |
|
|
59
59
|
|
|
60
|
-
> **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
|
+
> **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 106 tools with real-time monitoring.
|
|
61
61
|
|
|
62
62
|
---
|
|
63
63
|
|
|
@@ -65,7 +65,7 @@ Figma Console MCP connects AI assistants (like Claude) to Figma, enabling:
|
|
|
65
65
|
|
|
66
66
|
**Best for:** Designers who want full AI-assisted design capabilities.
|
|
67
67
|
|
|
68
|
-
**What you get:** All
|
|
68
|
+
**What you get:** All 106 tools including design creation, variable management, and component instantiation.
|
|
69
69
|
|
|
70
70
|
#### Prerequisites
|
|
71
71
|
|
|
@@ -85,7 +85,7 @@ Figma Console MCP connects AI assistants (like Claude) to Figma, enabling:
|
|
|
85
85
|
|
|
86
86
|
**Claude Code (CLI):**
|
|
87
87
|
```bash
|
|
88
|
-
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
|
|
88
|
+
claude mcp add figma-console -s user -e FIGMA_ACCESS_TOKEN=figd_YOUR_TOKEN_HERE -e ENABLE_MCP_APPS=true -- npx -y @mp3wizard/figma-console-mcp@latest
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
**Cursor / Windsurf / Claude Desktop:**
|
|
@@ -97,7 +97,7 @@ Add to your MCP config file (see [Where to find your config file](#-where-to-fin
|
|
|
97
97
|
"mcpServers": {
|
|
98
98
|
"figma-console": {
|
|
99
99
|
"command": "npx",
|
|
100
|
-
"args": ["-y", "figma-console-mcp@latest"],
|
|
100
|
+
"args": ["-y", "@mp3wizard/figma-console-mcp@latest"],
|
|
101
101
|
"env": {
|
|
102
102
|
"FIGMA_ACCESS_TOKEN": "figd_YOUR_TOKEN_HERE",
|
|
103
103
|
"ENABLE_MCP_APPS": "true"
|
|
@@ -162,7 +162,7 @@ Create a simple frame with a blue background
|
|
|
162
162
|
|
|
163
163
|
**Best for:** Developers who want to modify source code or contribute to the project.
|
|
164
164
|
|
|
165
|
-
**What you get:** Same
|
|
165
|
+
**What you get:** Same 106 tools as NPX, plus full source code access.
|
|
166
166
|
|
|
167
167
|
#### Quick Setup
|
|
168
168
|
|
|
@@ -308,7 +308,7 @@ AI Client β Cloud MCP Server β Durable Object Relay β Desktop Bridge Plugi
|
|
|
308
308
|
| Feature | NPX (Recommended) | Cloud Mode | Local Git | Remote SSE |
|
|
309
309
|
|---------|-------------------|------------|-----------|------------|
|
|
310
310
|
| **Setup time** | ~10 minutes | ~5 minutes | ~15 minutes | ~2 minutes |
|
|
311
|
-
| **Total tools** | **
|
|
311
|
+
| **Total tools** | **106** | **95** | **106** | **9** (read-only) |
|
|
312
312
|
| **Design creation** | β
| β
| β
| β |
|
|
313
313
|
| **Variable management** | β
| β
| β
| β |
|
|
314
314
|
| **Component instantiation** | β
| β
| β
| β |
|
|
@@ -323,7 +323,7 @@ AI Client β Cloud MCP Server β Durable Object Relay β Desktop Bridge Plugi
|
|
|
323
323
|
| **Automatic updates** | β
(`@latest`) | β
| Manual (`git pull`) | β
|
|
|
324
324
|
| **Source code access** | β | β | β
| β |
|
|
325
325
|
|
|
326
|
-
> **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
|
|
326
|
+
> **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 106 tools.
|
|
327
327
|
|
|
328
328
|
**π [Complete Feature Comparison](docs/mode-comparison.md)**
|
|
329
329
|
|
|
@@ -401,6 +401,12 @@ When you first use design system tools:
|
|
|
401
401
|
- `figma_get_file_data` - Full file structure
|
|
402
402
|
- `figma_get_file_for_plugin` - Optimized file data
|
|
403
403
|
|
|
404
|
+
### π Shared Library Inspection
|
|
405
|
+
- `figma_get_library_component_by_key` - **Resolve any component key to full properties + variants + visual specs** β without needing the source library file's URL. Works for both COMPONENT_SET and standalone COMPONENT keys. Adaptive compression at >500KB.
|
|
406
|
+
- `figma_get_library_components` - Discover all components in a library file (requires library file URL/key)
|
|
407
|
+
- `figma_get_library_variables` - List every variable from team libraries the current file has subscribed. **Works on every Figma plan** β uses the Plugin API path, not the Enterprise-only REST endpoint. Filter by `libraryName`, `collectionName`, or `resolvedType`.
|
|
408
|
+
- `figma_import_library_variable` - Import a library variable into the current file. Returns a local `id` ready to pass to `figma_set_fills` / `figma_update_variable` / any variable-binding tool.
|
|
409
|
+
|
|
404
410
|
### βοΈ Cloud Relay
|
|
405
411
|
- `figma_pair_plugin` - Generate a pairing code to connect a Desktop Bridge plugin via the cloud relay
|
|
406
412
|
|
|
@@ -663,7 +669,7 @@ The **Figma Desktop Bridge** plugin is the recommended way to connect Figma to t
|
|
|
663
669
|
- The MCP server communicates via **WebSocket** through the Desktop Bridge plugin
|
|
664
670
|
- The server tries port 9223 first, then automatically falls back through ports 9224β9232 if needed
|
|
665
671
|
- The plugin scans all ports in the range and connects to every active server it finds
|
|
666
|
-
- All
|
|
672
|
+
- All 106 tools work through the WebSocket transport
|
|
667
673
|
|
|
668
674
|
**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).
|
|
669
675
|
|
|
@@ -802,9 +808,12 @@ The architecture supports adding new apps with minimal boilerplate β each app
|
|
|
802
808
|
|
|
803
809
|
## π€οΈ Roadmap
|
|
804
810
|
|
|
805
|
-
**Current Status:** v1.
|
|
811
|
+
**Current Status:** v1.29.0 (Stable) - Production-ready with shared-library inspection (key-based component resolution + library variable read/import without Enterprise plan), 10-format token export pipeline (DTCG, CSS, Tailwind v4, Tailwind v3, SCSS, TS module, JSON flat/nested, Style Dictionary v3, Tokens Studio), bidirectional Figmaβcode token sync, version history & time-series awareness, FigJam + Slides support, Cloud Write Relay, Design System Kit, WebSocket-only connectivity, smart multi-file tracking, **106 tools** (Local) / **95 tools** (Cloud) / **9 tools** (Remote read-only), Comments API, cross-MCP identity disambiguation, and MCP Apps.
|
|
806
812
|
|
|
807
813
|
**Recent Releases:**
|
|
814
|
+
- [x] **v1.29.0** - Shared library inspection: three new tools close the gap between "I have a component key" and "I can actually use it." `figma_get_library_component_by_key` resolves any 40-char component key to full `componentPropertyDefinitions` + variants (with their published keys) + per-variant visual specs β without needing the source library file's URL. `figma_get_library_variables` lists library tokens via Plugin API (works on every Figma plan; the REST equivalent is Enterprise-only). `figma_import_library_variable` imports a library token to the current file so it can be bound to nodes. 27 new tests, 1178 total passing. Plugin re-import optional.
|
|
815
|
+
- [x] **v1.28.1** - Bug fix patch surfacing from live-fire testing of the v1.28.0 formatters against multi-tier semantic-token design systems. Fixes: Tailwind v3 emitted empty `module.exports` for alias-only sets (now resolves alias chains to literal values); TypeScript module + JSON flat + JSON nested formatters emitted `"{alias.path}"` strings as literal values (now resolves); Tailwind v4 namespace-prefix doubling (`--color-theme-color-X` is now `--color-theme-X`). Adds `resolveAliasChain` public helper. 1151 tests still passing.
|
|
816
|
+
- [x] **v1.28.0** - Full formatter coverage for `figma_export_tokens`. Seven new output formats: Tailwind v4 `@theme inline`, Tailwind v3 config, SCSS variables, TypeScript module, JSON flat/nested, Style Dictionary v3, Tokens Studio multi-file. Combined with DTCG + CSS variables, ships **10 fully-implemented output formats** with zero third-party build-tool dependencies. Tool description updated, docs/tools.md table all-green. 22 new Jest tests, 1151 total passing.
|
|
808
817
|
- [x] **v1.27.1** - Documentation patch. No code behavior changes. Sweeps stale "Phase 1 ships with DTCG only" claims across tool descriptions, error messages, and internal comments after CSS variables formatter and the apply phase shipped during the v1.27.0 dev cycle. Refreshes README banner + capability bullets + roadmap. Adds `Phase 3.5: Stale-Content Audit` to the release runbook so future releases get a strict pre-publish grep sweep across banners, tool descriptions, error messages, source comments, and tool-count consistency.
|
|
809
818
|
- [x] **v1.27.0** - Bidirectional token sync: `figma_export_tokens` + `figma_import_tokens` replace Style Dictionary and Tokens Studio's export pipeline. Canonical DTCG JSON + CSS custom properties. Diff-aware merge with round-trip ID preservation via `$extensions["figma-console-mcp"]`. Apply phase pushes hex-value edits back to Figma via the plugin bridge. Verified end-to-end against 713-token + 280-token design systems.
|
|
810
819
|
- [x] **v1.26.0** - Internal cleanup + cross-MCP identity: Local-mode CDP/Puppeteer transport removed entirely (WebSocket-only). `figma_diagnose` tool for designer-readable health checks. Every response tagged `_mcp: "figma-console-mcp"`; errors prefixed `[figma-console-mcp]` so attribution is unambiguous when running multiple Figma MCPs. Plugin status pill now reads `Local Β· ready` / `Cloud Β· ready` / `Local + Cloud Β· ready`. Net diff: β7,299 lines, plugin re-import optional.
|
|
@@ -821,7 +830,7 @@ The architecture supports adding new apps with minimal boilerplate β each app
|
|
|
821
830
|
- [x] **v1.7.0** - MCP Apps (Token Browser, Design System Dashboard), batch variable operations, design-code parity tools.
|
|
822
831
|
|
|
823
832
|
**Coming Next:**
|
|
824
|
-
- [ ] **Token sync
|
|
833
|
+
- [ ] **Token sync β parsers + import-side apply expansion** - Parsers for non-DTCG input (Tokens Studio, CSS vars, Tailwind v4, Tailwind v3 config, SCSS, Style Dictionary v3, JSON flat/nested). Plus `toCreate` apply orchestration, `toDelete` for `replace` strategy, alias-target updates, and cross-library variable resolution via `getVariableByIdAsync` so cross-library aliases render as real `var(--target)` references instead of comments.
|
|
825
834
|
- [ ] **Component template library** - Common UI pattern generation
|
|
826
835
|
- [ ] **Visual regression testing** - Screenshot diff capabilities
|
|
827
836
|
- [ ] **Design linting** - Automated compliance and accessibility checks
|