figma-console-mcp 1.35.0 β†’ 1.37.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.
Files changed (49) hide show
  1. package/README.md +15 -9
  2. package/dist/apps/design-system-dashboard/mcp-app.html +12 -12
  3. package/dist/apps/design-system-dashboard/scoring/accessibility.d.ts.map +1 -1
  4. package/dist/apps/design-system-dashboard/scoring/accessibility.js +17 -11
  5. package/dist/apps/design-system-dashboard/scoring/accessibility.js.map +1 -1
  6. package/dist/apps/design-system-dashboard/scoring/component-metadata.d.ts.map +1 -1
  7. package/dist/apps/design-system-dashboard/scoring/component-metadata.js +11 -2
  8. package/dist/apps/design-system-dashboard/scoring/component-metadata.js.map +1 -1
  9. package/dist/apps/design-system-dashboard/scoring/consistency.d.ts.map +1 -1
  10. package/dist/apps/design-system-dashboard/scoring/consistency.js +9 -3
  11. package/dist/apps/design-system-dashboard/scoring/consistency.js.map +1 -1
  12. package/dist/apps/design-system-dashboard/scoring/coverage.d.ts.map +1 -1
  13. package/dist/apps/design-system-dashboard/scoring/coverage.js +4 -1
  14. package/dist/apps/design-system-dashboard/scoring/coverage.js.map +1 -1
  15. package/dist/apps/design-system-dashboard/scoring/naming-semantics.d.ts.map +1 -1
  16. package/dist/apps/design-system-dashboard/scoring/naming-semantics.js +11 -2
  17. package/dist/apps/design-system-dashboard/scoring/naming-semantics.js.map +1 -1
  18. package/dist/apps/design-system-dashboard/scoring/remediation.d.ts +22 -0
  19. package/dist/apps/design-system-dashboard/scoring/remediation.d.ts.map +1 -0
  20. package/dist/apps/design-system-dashboard/scoring/remediation.js +169 -0
  21. package/dist/apps/design-system-dashboard/scoring/remediation.js.map +1 -0
  22. package/dist/apps/design-system-dashboard/scoring/types.d.ts +7 -0
  23. package/dist/apps/design-system-dashboard/scoring/types.d.ts.map +1 -1
  24. package/dist/apps/design-system-dashboard/scoring/types.js.map +1 -1
  25. package/dist/apps/design-system-dashboard/server.d.ts +21 -1
  26. package/dist/apps/design-system-dashboard/server.d.ts.map +1 -1
  27. package/dist/apps/design-system-dashboard/server.js +188 -1
  28. package/dist/apps/design-system-dashboard/server.js.map +1 -1
  29. package/dist/apps/token-browser/mcp-app.html +12 -12
  30. package/dist/cloudflare/apps/design-system-dashboard/scoring/accessibility.js +17 -11
  31. package/dist/cloudflare/apps/design-system-dashboard/scoring/component-metadata.js +11 -2
  32. package/dist/cloudflare/apps/design-system-dashboard/scoring/consistency.js +9 -3
  33. package/dist/cloudflare/apps/design-system-dashboard/scoring/coverage.js +4 -1
  34. package/dist/cloudflare/apps/design-system-dashboard/scoring/naming-semantics.js +11 -2
  35. package/dist/cloudflare/apps/design-system-dashboard/scoring/remediation.js +168 -0
  36. package/dist/cloudflare/apps/design-system-dashboard/server.js +188 -1
  37. package/dist/cloudflare/core/tokens-tools.js +1 -1
  38. package/dist/cloudflare/core/websocket-server.js +60 -7
  39. package/dist/cloudflare/index.js +7 -7
  40. package/dist/core/tokens-tools.js +1 -1
  41. package/dist/core/websocket-server.d.ts +23 -1
  42. package/dist/core/websocket-server.d.ts.map +1 -1
  43. package/dist/core/websocket-server.js +60 -7
  44. package/dist/core/websocket-server.js.map +1 -1
  45. package/dist/local.d.ts +2 -0
  46. package/dist/local.d.ts.map +1 -1
  47. package/dist/local.js +361 -172
  48. package/dist/local.js.map +1 -1
  49. package/package.json +1 -1
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
- > **πŸ†• Figma Slots Support (v1.35.0):** Create, inspect, populate, and reset Figma Slots (GA at Config 2026) programmatically β€” `figma_create_slot` adds slots to components (variants included), `figma_append_to_slot` populates instance slots with cloned or new content, plus `figma_get_slots`, `figma_reset_slot`, and `figma_add_slot_property`. Live-validated against the GA Plugin API; closes the most-requested issue [#29](https://github.com/southleft/figma-console-mcp/issues/29), based on community PR [#77](https://github.com/southleft/figma-console-mcp/pull/77). **Plugin re-import required** (`code.js` + `ui.html` changed). [See what's new β†’](CHANGELOG.md#1350---2026-07-09)
11
+ > **πŸ†• Design-System Health Audit for Every Client (v1.37.0):** new `figma_audit_design_system_report` tool runs the Design System Dashboard's deterministic scoring engine β€” naming, tokens, component metadata, accessibility, consistency, coverage β€” and returns the scored report as data, so **any** MCP client (Claude Code, headless agents, CI) can audit without MCP Apps support or `ENABLE_MCP_APPS`. Live-first data (fileKey-verified per-page bridge crawl, REST published fallback β€” the source is disclosed), 5-minute cache, chunked per-category drill-down, and every finding states whether this MCP can auto-fix it. Server-only release β€” **no plugin re-import needed**. [See what's new β†’](CHANGELOG.md#1370---2026-07-22)
12
12
 
13
13
  ## What is this?
14
14
 
@@ -24,6 +24,7 @@ Figma Console MCP connects AI assistants (like Claude) to Figma, enabling:
24
24
  - **πŸ“Œ FigJam boards** - Create stickies, flowcharts, tables, and code blocks on collaborative boards
25
25
  - **🎞️ Slides presentations** - Build and manage Figma Slides decks programmatically
26
26
  - **β™Ώ Accessibility scanning** - 14 WCAG design checks with conformance level tagging, component scorecards, axe-core code scanning, design-to-code parity
27
+ - **πŸ“‹ Design-system health audits** - Lighthouse-style scored audit across naming, tokens, component metadata, accessibility, consistency, and coverage β€” available as a plain tool for any MCP client (with per-finding auto-fix guidance) and as a visual dashboard app
27
28
  - **πŸ›‘ Cross-MCP identity** - Every tool response carries `_mcp: "figma-console-mcp"` and errors are prefixed `[figma-console-mcp]` so attribution stays unambiguous in agents running multiple Figma MCPs
28
29
  - **☁️ Cloud Write Relay** - Web AI clients (Claude.ai, v0, Replit) can design in Figma via cloud pairing
29
30
  - **πŸ”„ Four ways to connect** - Remote SSE, Cloud Mode, NPX, or Local Git
@@ -55,9 +56,9 @@ Figma Console MCP connects AI assistants (like Claude) to Figma, enabling:
55
56
  | Real-time monitoring (console, selection) | βœ… | ❌ | ❌ |
56
57
  | Desktop Bridge plugin | βœ… | βœ… | ❌ |
57
58
  | Requires Node.js | Yes | **No** | No |
58
- | **Total tools available** | **112** | **101** | **9** |
59
+ | **Total tools available** | **113** | **101** | **9** |
59
60
 
60
- > **Bottom line:** Remote SSE is **read-only** with 9 tools. **Cloud Mode** unlocks write access (101 tools) from web AI clients without Node.js. NPX/Local Git gives the full 112 tools with real-time monitoring.
61
+ > **Bottom line:** Remote SSE is **read-only** with 9 tools. **Cloud Mode** unlocks write access (101 tools) from web AI clients without Node.js. NPX/Local Git gives the full 113 tools with real-time monitoring.
61
62
 
62
63
  ---
63
64
 
@@ -65,7 +66,7 @@ Figma Console MCP connects AI assistants (like Claude) to Figma, enabling:
65
66
 
66
67
  **Best for:** Designers who want full AI-assisted design capabilities.
67
68
 
68
- **What you get:** All 112 tools including design creation, variable management, and component instantiation.
69
+ **What you get:** All 113 tools including design creation, variable management, and component instantiation.
69
70
 
70
71
  #### Prerequisites
71
72
 
@@ -162,7 +163,7 @@ Create a simple frame with a blue background
162
163
 
163
164
  **Best for:** Developers who want to modify source code or contribute to the project.
164
165
 
165
- **What you get:** Same 112 tools as NPX, plus full source code access.
166
+ **What you get:** Same 113 tools as NPX, plus full source code access.
166
167
 
167
168
  #### Quick Setup
168
169
 
@@ -308,7 +309,7 @@ AI Client β†’ Cloud MCP Server β†’ Durable Object Relay β†’ Desktop Bridge Plugi
308
309
  | Feature | NPX (Recommended) | Cloud Mode | Local Git | Remote SSE |
309
310
  |---------|-------------------|------------|-----------|------------|
310
311
  | **Setup time** | ~10 minutes | ~5 minutes | ~15 minutes | ~2 minutes |
311
- | **Total tools** | **112** | **101** | **112** | **9** (read-only) |
312
+ | **Total tools** | **113** | **101** | **113** | **9** (read-only) |
312
313
  | **Design creation** | βœ… | βœ… | βœ… | ❌ |
313
314
  | **Variable management** | βœ… | βœ… | βœ… | ❌ |
314
315
  | **Component instantiation** | βœ… | βœ… | βœ… | ❌ |
@@ -323,7 +324,7 @@ AI Client β†’ Cloud MCP Server β†’ Durable Object Relay β†’ Desktop Bridge Plugi
323
324
  | **Automatic updates** | βœ… (`@latest`) | βœ… | Manual (`git pull`) | βœ… |
324
325
  | **Source code access** | ❌ | ❌ | βœ… | ❌ |
325
326
 
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 112 tools.
327
+ > **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 113 tools.
327
328
 
328
329
  **πŸ“– [Complete Feature Comparison](docs/mode-comparison.md)**
329
330
 
@@ -400,6 +401,7 @@ When you first use design system tools:
400
401
  - `figma_get_styles` - Color, text, effect styles
401
402
  - `figma_get_file_data` - Full file structure
402
403
  - `figma_get_file_for_plugin` - Optimized file data
404
+ - `figma_audit_design_system_report` - **Scored health audit for any MCP client** β€” six-category report (naming, tokens, metadata, accessibility, consistency, coverage) with per-finding remediation ("can this MCP fix it?"), chunked per-category drill-down, live-first data with disclosed source, 5-minute cache
403
405
 
404
406
  ### πŸ“š Shared Library Inspection
405
407
  - `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.
@@ -680,7 +682,7 @@ The **Figma Desktop Bridge** plugin is the recommended way to connect Figma to t
680
682
  - The MCP server communicates via **WebSocket** through the Desktop Bridge plugin
681
683
  - The server tries port 9223 first, then automatically falls back through ports 9224–9232 if needed
682
684
  - The plugin scans all ports in the range and connects to every active server it finds
683
- - All 112 tools work through the WebSocket transport
685
+ - All 113 tools work through the WebSocket transport
684
686
 
685
687
  **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).
686
688
 
@@ -763,6 +765,8 @@ A Lighthouse-style health scorecard that audits your design system across six ca
763
765
  - Refresh button to re-run the audit without consuming AI context
764
766
  - Pure scoring engine with no external dependencies β€” all analysis runs locally
765
767
 
768
+ **No MCP Apps support? Same audit, plain tool:** `figma_audit_design_system_report` runs the identical scoring engine and returns the report as data β€” summary by default, per-category drill-down via `category`, full JSON via `format: "full"` β€” with a remediation section stating which findings this MCP can fix (`design`), which need a design decision first (`design-assisted`), and which need human design work (`manual`). Works in every MCP client with no `ENABLE_MCP_APPS` flag; results cache for 5 minutes (`forceRefresh` to re-crawl).
769
+
766
770
  **Enabling MCP Apps:**
767
771
 
768
772
  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:
@@ -819,9 +823,11 @@ The architecture supports adding new apps with minimal boilerplate β€” each app
819
823
 
820
824
  ## πŸ›€οΈ Roadmap
821
825
 
822
- **Current Status:** v1.35.0 (Stable) - Production-ready. Latest: Figma Slots write support β€” create, inspect, populate, and reset Slots (GA at Config 2026) via 5 new tools (`figma_create_slot`, `figma_get_slots`, `figma_append_to_slot`, `figma_reset_slot`, `figma_add_slot_property`), live-validated against the GA Plugin API and based on community PR #77. On top of v1.34.0's Bidirectional Token Sync v2 + DTCG 2025.10 β€” `figma_import_tokens` applies the complete diff plan (creates missing collections/variables, applies renames, writes real `VARIABLE_ALIAS` references, and deletes only under explicit `replace`), `figma_export_tokens` speaks the DTCG 2025.10 dialect on request (legacy default byte-identical), variable scopes/codeSyntax round-trip via `$extensions`, `figma_setup_design_tokens` accepts alias values via DTCG brace references, and `figma_create_component_set` builds a full variant set from an axes matrix in one call. On top of the v1.33.x line: version-handshake fix (re-import banner only fires when plugin files actually changed), security dependency sweep, and the v1.33.0 connection UX overhaul (honest status pill derived from live connection state, `/health` auto-discovery with self-healing reconnect) + a 33-fix full-codebase audit (lossless DTCG multi-mode round-trips, cross-collection alias resolution, branch-URL correctness across REST tools, cache-poisoning and CSWSH fixes, bridge-first screenshots). Built on WCAG-accurate accessibility auditing (line height below 1.5Γ— is no longer mis-flagged as a failure; readability hints decoupled from conformance checks and scoped to multi-line text; code-side WCAG 1.4.12 check), a self-healing Desktop Bridge connection (zombie-process reaper + auto-reconnect watchdog β€” fixes the recurring "not connected until restart" bug), native variable binding on fills/strokes + typography control in the write tools, 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, **112 tools** (Local) / **101 tools** (Cloud) / **9 tools** (Remote read-only), Comments API, cross-MCP identity disambiguation, and MCP Apps.
826
+ **Current Status:** v1.37.0 (Stable) - Production-ready. Latest: Design-system health audit for every client β€” `figma_audit_design_system_report` runs the dashboard's deterministic six-category scoring engine and returns the report as data with per-finding remediation, live-first fileKey-verified data (source disclosed), chunked per-category drill-down, and a 5-minute cache (server-only, no plugin re-import). On top of v1.36.0's target lock for multi-file parallel work β€” β€” `figma_navigate` takes a `lock: true` flag that pins the active file so an AI agent can work in one file while you work in another without commands routing to the wrong file. On top of v1.35.0's Figma Slots write support β€” create, inspect, populate, and reset Slots (GA at Config 2026) via 5 new tools (`figma_create_slot`, `figma_get_slots`, `figma_append_to_slot`, `figma_reset_slot`, `figma_add_slot_property`), live-validated against the GA Plugin API and based on community PR #77. On top of v1.34.0's Bidirectional Token Sync v2 + DTCG 2025.10 β€” `figma_import_tokens` applies the complete diff plan (creates missing collections/variables, applies renames, writes real `VARIABLE_ALIAS` references, and deletes only under explicit `replace`), `figma_export_tokens` speaks the DTCG 2025.10 dialect on request (legacy default byte-identical), variable scopes/codeSyntax round-trip via `$extensions`, `figma_setup_design_tokens` accepts alias values via DTCG brace references, and `figma_create_component_set` builds a full variant set from an axes matrix in one call. On top of the v1.33.x line: version-handshake fix (re-import banner only fires when plugin files actually changed), security dependency sweep, and the v1.33.0 connection UX overhaul (honest status pill derived from live connection state, `/health` auto-discovery with self-healing reconnect) + a 33-fix full-codebase audit (lossless DTCG multi-mode round-trips, cross-collection alias resolution, branch-URL correctness across REST tools, cache-poisoning and CSWSH fixes, bridge-first screenshots). Built on WCAG-accurate accessibility auditing (line height below 1.5Γ— is no longer mis-flagged as a failure; readability hints decoupled from conformance checks and scoped to multi-line text; code-side WCAG 1.4.12 check), a self-healing Desktop Bridge connection (zombie-process reaper + auto-reconnect watchdog β€” fixes the recurring "not connected until restart" bug), native variable binding on fills/strokes + typography control in the write tools, 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, **113 tools** (Local) / **101 tools** (Cloud) / **9 tools** (Remote read-only), Comments API, cross-MCP identity disambiguation, and MCP Apps.
823
827
 
824
828
  **Recent Releases:**
829
+ - [x] **v1.37.0** - Design-system health audit for every MCP client. New `figma_audit_design_system_report` runs the Design System Dashboard's deterministic scoring engine (naming, token architecture, component metadata, accessibility, consistency, coverage) and returns the scored report as data β€” no MCP Apps support or `ENABLE_MCP_APPS` needed (the previous registration gated everything, making the audit unreachable outside Claude Desktop). Component data is now live-first: a fileKey-verified per-page bridge crawl (30s/page, failures isolated per page) with REST published-library fallback, and the chosen source is disclosed in the report (`bridge-live` / `rest-published` / `none`) so stale-publish scores can't masquerade as live ones. Output is token-safe by design: bounded summary, per-category chunked drill-down, clamped full JSON, 5-minute raw-data cache. Every finding carries a remediation verdict β€” auto-fixable by this MCP's write tools, fixable after a design decision, or manual β€” with the exact tools named. Scoring accuracy pass: variant components no longer poison PascalCase/casing checks, Title Case accepted, component-set names count toward core-component coverage, `color/content/*` recognized in contrast pairing, state synonyms (`active`β‰ˆ`pressed` etc.), and `.`/`_`-prefixed internals excluded. Server-only β€” no plugin re-import needed.
830
+ - [x] **v1.36.0** - Target lock for multi-file parallel work. `figma_navigate` gains a `lock: true` flag that pins the active file β€” new connections, reconnects, and the user's own selection/page changes in other files no longer move the command target, so an agent can safely write to one file while the user works in another. Auto-releases when the pinned file disconnects or navigates away; `figma_list_open_files` reports a `targetLocked` flag for pre-write guards. Server-only β€” no plugin re-import needed.
825
831
  - [x] **v1.35.0** - Figma Slots write support, closing [#29](https://github.com/southleft/figma-console-mcp/issues/29) (the tracker's most-requested feature) via community PR [#77](https://github.com/southleft/figma-console-mcp/pull/77) by @simonesalvucci, updated to the GA API. Five new tools: `figma_create_slot` (slot + auto-linked SLOT property; variants inside component sets supported β€” the beta restriction was lifted at GA), `figma_get_slots`, `figma_append_to_slot` (clone or create content into instance slots; snaps clones to the slot origin), `figma_reset_slot`, and `figma_add_slot_property` (retrofit an existing frame as a slot). Hardened by live validation: VARIANT `defaultValue` passthrough restored (Figma requires non-empty), destructive-path reorder in the append handler (content validated before `clearExisting` empties anything), relay whitelist fix for `slot` payloads. **Plugin re-import required** (`code.js` + `ui.html` changed).
826
832
  - [x] **v1.34.0** - Bidirectional Token Sync v2 + DTCG 2025.10. `figma_import_tokens` now applies the *complete* diff plan: missing collections and variables are created (with modes, inferred/recorded types, and values set in dependency order β€” aliases in a second pass), token-path renames route to the update phase by round-trip variable ID (no more create+delete pairs that would permanently destroy the original under `replace`), reference values write real `{ type: "VARIABLE_ALIAS", id }` payloads via a four-tier resolver, and deletes are strictly gated behind `strategy: "replace"`. `figma_export_tokens` gains `dtcgDialect: "2025"` (object-form colors from full-precision floats, object dimensions) while the legacy default stays byte-identical; import accepts both dialects unconditionally with dialect-insensitive diff normalization. Variable `scopes` + `codeSyntax` round-trip through `$extensions["figma-console-mcp"]`. `figma_setup_design_tokens` accepts DTCG brace references (`"{color.blue.600}"`) that resolve to real aliases, including forward references. New tool `figma_create_component_set` builds a variant set from an axes matrix (or combines existing components) with `Prop=Value` naming, optional auto-arranged grid, and variant keys in the response β€” with count-scaled timeouts and rollback on failure. **Plugin re-import required** (`code.js` + `ui.html` changed β€” the component-set handler and relay). 183 tests across the token/write-tools suites.
827
833
  - [x] **v1.33.2** - Version-handshake false-positive fix. The v1.33.0 handshake compared the plugin's reported version against the server's *package* version, so server-only releases (like the v1.33.1 dependency sweep) flagged every up-to-date plugin as stale and pushed the re-import banner for files that hadn't changed. The server now compares against the `PLUGIN_VERSION` embedded in the `figma-desktop-bridge/code.js` it ships β€” exactly what a re-import would install β€” and `PLUGIN_VERSION` itself now means "last release in which plugin files changed" (release tooling bumps it only when `figma-desktop-bridge/` actually changed since the last tag). `figma_get_status` gains `transport.websocket.bundledPluginVersion`; `figma_diagnose` blames the right version. No new tools, **no plugin re-import required** (one-time exception: if you re-imported at v1.33.1, the banner appears once more β€” clear it with one final re-import). 1245 tests passing (9 new).