figma-console-mcp 1.41.5 β 1.42.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/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **Your design system as an API.** A design-system-focused Model Context Protocol server for Figma. It works in both directions (Figma β code), **writes to Figma**, and runs **deterministic checks** for design-code parity, accessibility, and design-system health. It hands the AI exact tokens, variants, bindings, and states as structured data rather than prescribing a framework or house style, so generated code follows your team's own stack and conventions.
|
|
10
10
|
|
|
11
|
-
> **π
|
|
11
|
+
> **π Comment threads, plus security & data-safety fixes (latest v1.42.0):** `figma_get_comments` returns compact comment threads with node, thread and date filters and paging, so a busy file no longer floods the conversation (v1.42.0). Cloud Mode sign-in is hardened: each session uses only its own Figma token, authorization codes are single-use and bound to the client that asked for them, and the accessibility scanner no longer runs scripts from the HTML it checks. Two data-loss fixes: `figma_import_tokens` refuses an import that read no token files (it used to plan deleting every variable) and `replace` only deletes inside the collections you import; arranging a component set no longer deletes the other arranged sets on the page. Token export and import read variables live, so renames show up immediately. Abandoned servers exit on Windows, batch-created variables accept aliases, and the Slots tools take `fileKey`. v1.41.1βv1.41.5 make component-set analysis report real variant differences, including changes inside nested layers (an icon swap, a token on a nested vector), the variant's own background and opacity, auto-layout, gradients, corner radius, typography and swapped tokens, stop component loading from timing out on large files, and fix variable paging. Re-import the plugin for the component fixes. [See what's new β](CHANGELOG.md#1420---2026-10-27)
|
|
12
12
|
|
|
13
13
|
## What is this?
|
|
14
14
|
|
|
@@ -874,9 +874,10 @@ The two servers are complementary, and both can run in the same MCP client.
|
|
|
874
874
|
|
|
875
875
|
## π€οΈ Roadmap
|
|
876
876
|
|
|
877
|
-
**Current Status:** v1.41.5 (Stable) - Production-ready. Latest: component-set analysis reports gradient/image/paint-opacity, corner radius, typography and label text, swapped spacing tokens, nested layer geometry and vector shape changes (re-import the plugin). On top of v1.41.4's variant background/stroke and auto-layout changes. On top of v1.41.3's component-set analysis reporting changes inside nested layers (instance swaps, nested token changes, opacity on the variant itself) and no longer reports a layer hidden in every variant as a change (re-import the plugin). On top of v1.41.2's design-system summary and `figma_get_token_values` report the file's tokens (they always reported 0) (server-only). On top of v1.41.1's component-set analysis reports real variant differences (Figma's default variant, size and layer changes), component loading no longer times out on large files (throttled plugin timers), relevance-ranked component search, and `figma_get_variables` paging that works with `format: "full"` (re-import the plugin for the component fixes). On top of v1.41.0's Cloud Mode sign-in hardening (per-session tokens on `/sse`, single-use authorization codes bound to client, redirect URI and PKCE, a consent page for unrecognized destinations), a script-execution fix in the accessibility scanner, `figma_import_tokens` refusing empty imports and scoping `replace` deletes to imported collections, `figma_arrange_component_set` no longer deleting other arranged sets, live variable reads for token export/import, Windows orphan-server exit (PR #140), and `fileKey` for the Slots tools (PR #112) (server-only, no plugin re-import). On top of v1.40.9's composed colors (a color variable set to another color at an opacity, "grey/900 at 50%") export and import with the link to the primitive intact β `color-mix()` in CSS/Tailwind v4, `rgba()` in SCSS, an alpha modifier in Tokens Studio, the resolved color plus the composition in DTCG β where the export previously failed or wrote `[object Object]` (server-only, no plugin re-import). On top of v1.40.8's min/max width and height survive every way of extracting a component as JSON β the design system kit, the reconstruction format and `figma_get_file_data` now carry them, design-code parity compares them, and the reconstruction format returns real geometry again instead of 50Γ50 placeholders when the plugin is connected (server-only, no plugin re-import). On top of v1.40.7's clearer Color Tokens table in generated docs β layers revealed by a boolean property are printed once under that property, and stroke/fill rows name the nested instance they belong to (server-only, no plugin re-import). On top of v1.40.6's overrides in extended variable collections are visible (previously reported as nonexistent), and a third round of generated-doc fidelity fixes β radius tokens read per corner, boolean props compared in Design-Code Parity, source links pinned to a commit, hidden layers linked to the property that shows them (server-only, no plugin re-import). On top of v1.40.5's clean dependency audit for the npm package β Worker-only dependencies (`@cloudflare/puppeteer`, which pulled in a high-severity `extract-zip` advisory with no upstream fix, and `agents`) no longer install for npm users, so `npm install figma-console-mcp` audits at 0 vulnerabilities and is 64 MB instead of 173 MB; the server also reports its real version to MCP clients instead of `0.1.0` (server-only, no plugin re-import). On top of v1.40.4's fixes found by live-testing v1.40.3 on hard production components β tools given a `fileUrl` now read variables, descriptions and annotations from THAT file rather than whichever file is active (previously every token name could vanish, or on an id collision come from the wrong file; `figma_get_component` could return a different component), a tool result over 16 MB no longer disconnects the server, anatomy labels sizing by the layout's real axes, and the icon/typography/anatomy output stays readable on large components (server-only, no plugin re-import). On top of v1.40.3's fidelity fixes for generated component docs on harder components β hidden layers are labeled instead of documented as rendered, one-sided borders report the weight that actually renders, typography and layer structure are compared across every variant instead of read from the first, gradients/shadows/opacity are no longer silently dropped, truncated trees say so, and `SLOT` properties are listed (server-only, no plugin re-import). On top of v1.40.2's data-loss fix for `figma_export_tokens` β with a different file active in Figma than intended, an export could replace a real token file with an empty one (or with another file's tokens) and report success; exports now refuse to write when a requested collection is missing, when the export is empty, when the target was generated from a different Figma file, or when overwriting would destroy tokens the export doesn't manage, and `strategy: "merge"` β documented as preserving code-only tokens but never implemented β is now a genuinely safe default (server-only, no plugin re-import). On top of v1.40.1's accuracy fixes for generated component docs across variants β a descendant's fill (typically an icon's) could be documented as a variant's Background, Color Token headings kept only a property literally named `Variant`, spacing was read from the first variant alone, and icons were only detected by layer name β plus `figma_export_tokens` accepting a file path as `outputPath` instead of failing with a raw `EEXIST` or silently creating a directory (server-only, no plugin re-import). On top of v1.40.0's design system extraction from production codebases β seven Local-Mode `figma_ds_*` tools that scan one or more apps (framework/styling/vendor detection, usage-ranked component inventory classified vendored/wrapped/pure-vendor/bespoke, variant inference from real call sites, duplicate detection, and an architecture pass separating UI-kit specializations from the missing generic primitives), mine the de-facto styling into DTCG tokens with per-token provenance (multi-mode CSS custom properties, SCSS, Tailwind config, shadcn HSL triples, utility-class frequency mining valued from the app's own theme), scaffold the design-system package with showcase docs pages, wire a fresh Storybook workshop to the app's real theme layers and fonts, deep-extract components for porting with CSF3 story scaffolds, verify with deterministic fidelity evals, and persist porting progress across sessions β the extracted tokens import straight into Figma variables via `figma_import_tokens`. On top of v1.39.1's fix for a plugin-update banner that could never be cleared β an older server instance nagging a newer plugin to re-import, which only ever installs the same or a newer plugin. On top of v1.39.0's multi-file execution β `figma_execute_across_files` runs one script against several Desktop Bridge-connected files concurrently (four files x 2s of work in ~3s, not ~8s), and `figma_execute` takes an optional `fileKey` to target a single file without moving the active file or releasing target lock; targeting must be explicit (`fileKeys` or `allFiles: true`), so nothing fans out to files you did not name. From community PR #107 by @Wolfr. Ships with a relay fix: `handleResult()` in the plugin's ui.html rebuilt each response field by field and silently dropped `resultAnalysis` and `fileContext`, so the `resultAnalysis.warning` check that `figma_execute`'s own description tells callers to perform has never been possible (re-import `manifest.json` for those two fields; everything else works without it). On top of v1.38.2's connection-stability fix β the server's own orphan reaper was terminating healthy MCP servers because its liveness probe used an IPv4 literal while the server binds the IPv6 loopback, which turned every kill-safety gate into a rubber stamp; this was the cause of recurring "Server disconnected" errors across all MCP clients. Alongside v1.38.1's fix for the shared-library variable tools, which had silently reported zero collections since v1.29.0 and reported failed imports as successes. On top of v1.38.0's ongoing component changelogs in generated docs β `figma_generate_component_doc` takes an opt-in `history` parameter that pulls per-component **design history** from Figma version history (each version diffed and scoped to that component, so renames, added properties, and token bindings show up as rows) alongside **code history** from `git log` on the component's source files, rendered as a `## History` section with design, code, and release-note tables. Prefers labeled versions, falls back to auto-saves when a file has none, and is off by default so existing calls are unchanged (server-only, no plugin re-import). On top of v1.37.x's 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, **121 tools** (Local) / **96 tools** (Cloud) / read-only subset (Remote), Comments API, cross-MCP identity disambiguation, and MCP Apps.
|
|
877
|
+
**Current Status:** v1.42.0 (Stable) - Production-ready. Latest: `figma_get_comments` returns compact threads (root + replies, newest activity first) with `node_id`, `thread_id` and `since` filters and `limit`/`offset` paging, 30 threads by default; summary counts are per thread (server-only, PR #139). On top of v1.41.5's component-set analysis reporting gradient/image/paint-opacity, corner radius, typography and label text, swapped spacing tokens, nested layer geometry and vector shape changes (re-import the plugin). On top of v1.41.4's variant background/stroke and auto-layout changes. On top of v1.41.3's component-set analysis reporting changes inside nested layers (instance swaps, nested token changes, opacity on the variant itself) and no longer reports a layer hidden in every variant as a change (re-import the plugin). On top of v1.41.2's design-system summary and `figma_get_token_values` report the file's tokens (they always reported 0) (server-only). On top of v1.41.1's component-set analysis reports real variant differences (Figma's default variant, size and layer changes), component loading no longer times out on large files (throttled plugin timers), relevance-ranked component search, and `figma_get_variables` paging that works with `format: "full"` (re-import the plugin for the component fixes). On top of v1.41.0's Cloud Mode sign-in hardening (per-session tokens on `/sse`, single-use authorization codes bound to client, redirect URI and PKCE, a consent page for unrecognized destinations), a script-execution fix in the accessibility scanner, `figma_import_tokens` refusing empty imports and scoping `replace` deletes to imported collections, `figma_arrange_component_set` no longer deleting other arranged sets, live variable reads for token export/import, Windows orphan-server exit (PR #140), and `fileKey` for the Slots tools (PR #112) (server-only, no plugin re-import). On top of v1.40.9's composed colors (a color variable set to another color at an opacity, "grey/900 at 50%") export and import with the link to the primitive intact β `color-mix()` in CSS/Tailwind v4, `rgba()` in SCSS, an alpha modifier in Tokens Studio, the resolved color plus the composition in DTCG β where the export previously failed or wrote `[object Object]` (server-only, no plugin re-import). On top of v1.40.8's min/max width and height survive every way of extracting a component as JSON β the design system kit, the reconstruction format and `figma_get_file_data` now carry them, design-code parity compares them, and the reconstruction format returns real geometry again instead of 50Γ50 placeholders when the plugin is connected (server-only, no plugin re-import). On top of v1.40.7's clearer Color Tokens table in generated docs β layers revealed by a boolean property are printed once under that property, and stroke/fill rows name the nested instance they belong to (server-only, no plugin re-import). On top of v1.40.6's overrides in extended variable collections are visible (previously reported as nonexistent), and a third round of generated-doc fidelity fixes β radius tokens read per corner, boolean props compared in Design-Code Parity, source links pinned to a commit, hidden layers linked to the property that shows them (server-only, no plugin re-import). On top of v1.40.5's clean dependency audit for the npm package β Worker-only dependencies (`@cloudflare/puppeteer`, which pulled in a high-severity `extract-zip` advisory with no upstream fix, and `agents`) no longer install for npm users, so `npm install figma-console-mcp` audits at 0 vulnerabilities and is 64 MB instead of 173 MB; the server also reports its real version to MCP clients instead of `0.1.0` (server-only, no plugin re-import). On top of v1.40.4's fixes found by live-testing v1.40.3 on hard production components β tools given a `fileUrl` now read variables, descriptions and annotations from THAT file rather than whichever file is active (previously every token name could vanish, or on an id collision come from the wrong file; `figma_get_component` could return a different component), a tool result over 16 MB no longer disconnects the server, anatomy labels sizing by the layout's real axes, and the icon/typography/anatomy output stays readable on large components (server-only, no plugin re-import). On top of v1.40.3's fidelity fixes for generated component docs on harder components β hidden layers are labeled instead of documented as rendered, one-sided borders report the weight that actually renders, typography and layer structure are compared across every variant instead of read from the first, gradients/shadows/opacity are no longer silently dropped, truncated trees say so, and `SLOT` properties are listed (server-only, no plugin re-import). On top of v1.40.2's data-loss fix for `figma_export_tokens` β with a different file active in Figma than intended, an export could replace a real token file with an empty one (or with another file's tokens) and report success; exports now refuse to write when a requested collection is missing, when the export is empty, when the target was generated from a different Figma file, or when overwriting would destroy tokens the export doesn't manage, and `strategy: "merge"` β documented as preserving code-only tokens but never implemented β is now a genuinely safe default (server-only, no plugin re-import). On top of v1.40.1's accuracy fixes for generated component docs across variants β a descendant's fill (typically an icon's) could be documented as a variant's Background, Color Token headings kept only a property literally named `Variant`, spacing was read from the first variant alone, and icons were only detected by layer name β plus `figma_export_tokens` accepting a file path as `outputPath` instead of failing with a raw `EEXIST` or silently creating a directory (server-only, no plugin re-import). On top of v1.40.0's design system extraction from production codebases β seven Local-Mode `figma_ds_*` tools that scan one or more apps (framework/styling/vendor detection, usage-ranked component inventory classified vendored/wrapped/pure-vendor/bespoke, variant inference from real call sites, duplicate detection, and an architecture pass separating UI-kit specializations from the missing generic primitives), mine the de-facto styling into DTCG tokens with per-token provenance (multi-mode CSS custom properties, SCSS, Tailwind config, shadcn HSL triples, utility-class frequency mining valued from the app's own theme), scaffold the design-system package with showcase docs pages, wire a fresh Storybook workshop to the app's real theme layers and fonts, deep-extract components for porting with CSF3 story scaffolds, verify with deterministic fidelity evals, and persist porting progress across sessions β the extracted tokens import straight into Figma variables via `figma_import_tokens`. On top of v1.39.1's fix for a plugin-update banner that could never be cleared β an older server instance nagging a newer plugin to re-import, which only ever installs the same or a newer plugin. On top of v1.39.0's multi-file execution β `figma_execute_across_files` runs one script against several Desktop Bridge-connected files concurrently (four files x 2s of work in ~3s, not ~8s), and `figma_execute` takes an optional `fileKey` to target a single file without moving the active file or releasing target lock; targeting must be explicit (`fileKeys` or `allFiles: true`), so nothing fans out to files you did not name. From community PR #107 by @Wolfr. Ships with a relay fix: `handleResult()` in the plugin's ui.html rebuilt each response field by field and silently dropped `resultAnalysis` and `fileContext`, so the `resultAnalysis.warning` check that `figma_execute`'s own description tells callers to perform has never been possible (re-import `manifest.json` for those two fields; everything else works without it). On top of v1.38.2's connection-stability fix β the server's own orphan reaper was terminating healthy MCP servers because its liveness probe used an IPv4 literal while the server binds the IPv6 loopback, which turned every kill-safety gate into a rubber stamp; this was the cause of recurring "Server disconnected" errors across all MCP clients. Alongside v1.38.1's fix for the shared-library variable tools, which had silently reported zero collections since v1.29.0 and reported failed imports as successes. On top of v1.38.0's ongoing component changelogs in generated docs β `figma_generate_component_doc` takes an opt-in `history` parameter that pulls per-component **design history** from Figma version history (each version diffed and scoped to that component, so renames, added properties, and token bindings show up as rows) alongside **code history** from `git log` on the component's source files, rendered as a `## History` section with design, code, and release-note tables. Prefers labeled versions, falls back to auto-saves when a file has none, and is off by default so existing calls are unchanged (server-only, no plugin re-import). On top of v1.37.x's 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, **121 tools** (Local) / **96 tools** (Cloud) / read-only subset (Remote), Comments API, cross-MCP identity disambiguation, and MCP Apps.
|
|
878
878
|
|
|
879
879
|
**Recent Releases:**
|
|
880
|
+
- [x] **v1.42.0** - `figma_get_comments` compact threads with node/thread/date filters and paging, 30 threads by default (PR #139 by @OAPrilepa). Server-only.
|
|
880
881
|
- [x] **v1.41.5** - Component-set analysis diffs paints (gradients, images, opacity), corner radius, typography and label text, swapped tokens (`tokens`), nested size/position/rotation and vector shapes. Plugin re-import.
|
|
881
882
|
- [x] **v1.41.4** - Component-set analysis diffs the variant's own fill/stroke (button backgrounds) and auto-layout (`layout`). Plugin re-import.
|
|
882
883
|
- [x] **v1.41.3** - Component-set analysis diffs nested layers by path (instance swaps, nested fill/stroke tokens), variant-level opacity, and visibility in both directions; a layer hidden in every variant is no longer reported as a change. Plugin re-import.
|
|
@@ -5,7 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
7
7
|
import type { FigmaAPI } from "./figma-api.js";
|
|
8
|
+
interface CommentThread {
|
|
9
|
+
root: any;
|
|
10
|
+
replies: any[];
|
|
11
|
+
lastActivity: number;
|
|
12
|
+
}
|
|
13
|
+
/** Groups the flat REST list into threads, newest activity first. */
|
|
14
|
+
export declare function buildThreads(comments: any[]): CommentThread[];
|
|
8
15
|
export declare function registerCommentTools(server: McpServer, getFigmaAPI: () => Promise<FigmaAPI>, getCurrentUrl: () => string | null, options?: {
|
|
9
16
|
isRemoteMode?: boolean;
|
|
10
17
|
}): void;
|
|
18
|
+
export {};
|
|
11
19
|
//# sourceMappingURL=comment-tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-tools.d.ts","sourceRoot":"","sources":["../../src/core/comment-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAU/C,wBAAgB,oBAAoB,CACnC,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,EACpC,aAAa,EAAE,MAAM,MAAM,GAAG,IAAI,EAClC,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GAClC,IAAI,
|
|
1
|
+
{"version":3,"file":"comment-tools.d.ts","sourceRoot":"","sources":["../../src/core/comment-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAU/C,UAAU,aAAa;IACtB,IAAI,EAAE,GAAG,CAAC;IACV,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACrB;AAOD,qEAAqE;AACrE,wBAAgB,YAAY,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,aAAa,EAAE,CAwB7D;AA4CD,wBAAgB,oBAAoB,CACnC,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,EACpC,aAAa,EAAE,MAAM,MAAM,GAAG,IAAI,EAClC,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GAClC,IAAI,CA+bN"}
|
|
@@ -4,9 +4,81 @@
|
|
|
4
4
|
* Works in both local and Cloudflare Workers modes β no Plugin API dependency.
|
|
5
5
|
*/
|
|
6
6
|
import { z } from "zod";
|
|
7
|
-
import { extractFileKey } from "./figma-api.js";
|
|
7
|
+
import { extractFileKey, normalizeNodeId } from "./figma-api.js";
|
|
8
8
|
import { createChildLogger } from "./logger.js";
|
|
9
9
|
const logger = createChildLogger({ component: "comment-tools" });
|
|
10
|
+
function timeOf(comment) {
|
|
11
|
+
const t = Date.parse(comment?.created_at ?? "");
|
|
12
|
+
return Number.isNaN(t) ? 0 : t;
|
|
13
|
+
}
|
|
14
|
+
/** Groups the flat REST list into threads, newest activity first. */
|
|
15
|
+
export function buildThreads(comments) {
|
|
16
|
+
const byRoot = new Map();
|
|
17
|
+
for (const c of comments) {
|
|
18
|
+
if (!c.parent_id) {
|
|
19
|
+
byRoot.set(c.id, { root: c, replies: [], lastActivity: timeOf(c) });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
for (const c of comments) {
|
|
23
|
+
if (!c.parent_id)
|
|
24
|
+
continue;
|
|
25
|
+
const thread = byRoot.get(c.parent_id);
|
|
26
|
+
// A reply whose root is missing is still shown, as its own thread.
|
|
27
|
+
if (!thread) {
|
|
28
|
+
byRoot.set(c.id, { root: c, replies: [], lastActivity: timeOf(c) });
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
thread.replies.push(c);
|
|
32
|
+
thread.lastActivity = Math.max(thread.lastActivity, timeOf(c));
|
|
33
|
+
}
|
|
34
|
+
const threads = [...byRoot.values()];
|
|
35
|
+
for (const t of threads) {
|
|
36
|
+
t.replies.sort((a, b) => timeOf(a) - timeOf(b));
|
|
37
|
+
}
|
|
38
|
+
threads.sort((a, b) => b.lastActivity - a.lastActivity);
|
|
39
|
+
return threads;
|
|
40
|
+
}
|
|
41
|
+
function collectNodeIds(node, ids) {
|
|
42
|
+
if (!node)
|
|
43
|
+
return;
|
|
44
|
+
if (node.id)
|
|
45
|
+
ids.add(node.id);
|
|
46
|
+
for (const child of node.children ?? []) {
|
|
47
|
+
collectNodeIds(child, ids);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function reactionCounts(reactions) {
|
|
51
|
+
if (!reactions?.length)
|
|
52
|
+
return undefined;
|
|
53
|
+
const counts = {};
|
|
54
|
+
for (const r of reactions) {
|
|
55
|
+
counts[r.emoji] = (counts[r.emoji] ?? 0) + 1;
|
|
56
|
+
}
|
|
57
|
+
return counts;
|
|
58
|
+
}
|
|
59
|
+
function compactComment(c) {
|
|
60
|
+
const out = {
|
|
61
|
+
id: c.id,
|
|
62
|
+
author: c.user?.handle,
|
|
63
|
+
created_at: c.created_at,
|
|
64
|
+
message: c.message,
|
|
65
|
+
};
|
|
66
|
+
const reactions = reactionCounts(c.reactions);
|
|
67
|
+
if (reactions)
|
|
68
|
+
out.reactions = reactions;
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
function compactThread(t) {
|
|
72
|
+
const out = compactComment(t.root);
|
|
73
|
+
const meta = t.root.client_meta;
|
|
74
|
+
if (meta?.node_id)
|
|
75
|
+
out.node_id = meta.node_id;
|
|
76
|
+
if (t.root.resolved_at)
|
|
77
|
+
out.resolved_at = t.root.resolved_at;
|
|
78
|
+
if (t.replies.length)
|
|
79
|
+
out.replies = t.replies.map(compactComment);
|
|
80
|
+
return out;
|
|
81
|
+
}
|
|
10
82
|
// ============================================================================
|
|
11
83
|
// Tool Registration
|
|
12
84
|
// ============================================================================
|
|
@@ -14,12 +86,12 @@ export function registerCommentTools(server, getFigmaAPI, getCurrentUrl, options
|
|
|
14
86
|
// -----------------------------------------------------------------------
|
|
15
87
|
// Tool: figma_get_comments
|
|
16
88
|
// -----------------------------------------------------------------------
|
|
17
|
-
server.tool("figma_get_comments", "Get
|
|
89
|
+
server.tool("figma_get_comments", "Get comment threads on a Figma file. Returns threads (root comment + replies) sorted by latest activity, in a compact format by default (author handle, message, timestamps, pinned node, reaction counts). Narrow the result with an explicit node_id (includes comments pinned to nested nodes), thread_id or since, and page with limit/offset β files often have hundreds of comments. Use include_resolved to also see resolved threads and format='full' for raw Figma API objects.", {
|
|
18
90
|
fileUrl: z
|
|
19
91
|
.string()
|
|
20
92
|
.url()
|
|
21
93
|
.optional()
|
|
22
|
-
.describe("Figma file URL. Uses current URL if omitted."),
|
|
94
|
+
.describe("Figma file URL. Uses current URL if omitted. A node-id in the URL does not filter comments; use node_id explicitly."),
|
|
23
95
|
as_md: z
|
|
24
96
|
.boolean()
|
|
25
97
|
.optional()
|
|
@@ -29,8 +101,45 @@ export function registerCommentTools(server, getFigmaAPI, getCurrentUrl, options
|
|
|
29
101
|
.boolean()
|
|
30
102
|
.optional()
|
|
31
103
|
.default(false)
|
|
32
|
-
.describe("Include resolved (completed) comment threads. Default: false (only active
|
|
33
|
-
|
|
104
|
+
.describe("Include resolved (completed) comment threads. Default: false (only active threads unless thread_id is given)"),
|
|
105
|
+
node_id: z
|
|
106
|
+
.string()
|
|
107
|
+
.optional()
|
|
108
|
+
.describe("Only threads pinned to this node (e.g. '695:313' or '695-313') or, with include_nested, to any node inside it. Omit or pass an empty string to return threads across the file."),
|
|
109
|
+
include_nested: z
|
|
110
|
+
.boolean()
|
|
111
|
+
.optional()
|
|
112
|
+
.default(true)
|
|
113
|
+
.describe("With node_id: also match threads pinned to descendants of the node (one extra REST call). Default: true"),
|
|
114
|
+
thread_id: z
|
|
115
|
+
.string()
|
|
116
|
+
.optional()
|
|
117
|
+
.describe("Return only the thread containing this comment ID (root or reply), including resolved threads."),
|
|
118
|
+
since: z
|
|
119
|
+
.string()
|
|
120
|
+
.optional()
|
|
121
|
+
.describe("ISO date/time: only threads with a comment or reply created at or after it."),
|
|
122
|
+
limit: z
|
|
123
|
+
.number()
|
|
124
|
+
.int()
|
|
125
|
+
.min(1)
|
|
126
|
+
.max(200)
|
|
127
|
+
.optional()
|
|
128
|
+
.default(30)
|
|
129
|
+
.describe("Maximum threads to return. Default: 30"),
|
|
130
|
+
offset: z
|
|
131
|
+
.number()
|
|
132
|
+
.int()
|
|
133
|
+
.min(0)
|
|
134
|
+
.optional()
|
|
135
|
+
.default(0)
|
|
136
|
+
.describe("Threads to skip, for paging. Default: 0"),
|
|
137
|
+
format: z
|
|
138
|
+
.enum(["compact", "full"])
|
|
139
|
+
.optional()
|
|
140
|
+
.default("compact")
|
|
141
|
+
.describe("'compact' (default) β trimmed fields; 'full' β raw Figma API comment objects."),
|
|
142
|
+
}, async ({ fileUrl, as_md = false, include_resolved = false, node_id, include_nested = true, thread_id, since, limit = 30, offset = 0, format = "compact", }) => {
|
|
34
143
|
try {
|
|
35
144
|
const url = fileUrl || getCurrentUrl();
|
|
36
145
|
if (!url) {
|
|
@@ -62,21 +171,89 @@ export function registerCommentTools(server, getFigmaAPI, getCurrentUrl, options
|
|
|
62
171
|
isError: true,
|
|
63
172
|
};
|
|
64
173
|
}
|
|
65
|
-
|
|
174
|
+
let sinceTime;
|
|
175
|
+
if (since) {
|
|
176
|
+
sinceTime = Date.parse(since);
|
|
177
|
+
if (Number.isNaN(sinceTime)) {
|
|
178
|
+
return {
|
|
179
|
+
content: [
|
|
180
|
+
{
|
|
181
|
+
type: "text",
|
|
182
|
+
text: JSON.stringify({
|
|
183
|
+
error: "invalid_since",
|
|
184
|
+
message: `Invalid since date: ${since}`,
|
|
185
|
+
}),
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
isError: true,
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
const targetNode = node_id || undefined;
|
|
193
|
+
logger.info({ fileKey, as_md, include_resolved, targetNode, thread_id, since, limit, offset, format }, "Fetching comments");
|
|
66
194
|
const api = await getFigmaAPI();
|
|
67
195
|
const response = await api.getComments(fileKey, { as_md });
|
|
68
196
|
const allComments = response.comments || [];
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
?
|
|
72
|
-
:
|
|
197
|
+
const threads = buildThreads(allComments);
|
|
198
|
+
let selected = include_resolved || thread_id
|
|
199
|
+
? threads
|
|
200
|
+
: threads.filter((t) => !t.root.resolved_at);
|
|
201
|
+
let nodeIds;
|
|
202
|
+
if (targetNode) {
|
|
203
|
+
const normalized = normalizeNodeId(targetNode);
|
|
204
|
+
nodeIds = new Set([normalized]);
|
|
205
|
+
if (include_nested) {
|
|
206
|
+
const nodes = await api.getNodes(fileKey, [normalized]);
|
|
207
|
+
const document = nodes?.nodes?.[normalized]?.document;
|
|
208
|
+
if (!document) {
|
|
209
|
+
return {
|
|
210
|
+
content: [
|
|
211
|
+
{
|
|
212
|
+
type: "text",
|
|
213
|
+
text: JSON.stringify({
|
|
214
|
+
error: "node_not_found",
|
|
215
|
+
message: `Node ${normalized} not found in file ${fileKey}`,
|
|
216
|
+
}),
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
isError: true,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
collectNodeIds(document, nodeIds);
|
|
223
|
+
}
|
|
224
|
+
const ids = nodeIds;
|
|
225
|
+
selected = selected.filter((t) => {
|
|
226
|
+
const pinned = t.root.client_meta?.node_id;
|
|
227
|
+
return pinned !== undefined && ids.has(pinned);
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
if (thread_id) {
|
|
231
|
+
const byId = allComments.find((c) => c.id === thread_id);
|
|
232
|
+
const rootId = byId ? byId.parent_id || byId.id : thread_id;
|
|
233
|
+
selected = selected.filter((t) => t.root.id === rootId);
|
|
234
|
+
}
|
|
235
|
+
if (sinceTime !== undefined) {
|
|
236
|
+
const from = sinceTime;
|
|
237
|
+
selected = selected.filter((t) => t.lastActivity >= from);
|
|
238
|
+
}
|
|
239
|
+
const page = selected.slice(offset, offset + limit);
|
|
240
|
+
const comments = page.map((t) => format === "full"
|
|
241
|
+
? { ...t.root, replies: t.replies }
|
|
242
|
+
: compactThread(t));
|
|
73
243
|
const result = {
|
|
74
244
|
comments,
|
|
75
245
|
summary: {
|
|
76
|
-
total:
|
|
77
|
-
active:
|
|
78
|
-
resolved:
|
|
246
|
+
total: threads.length,
|
|
247
|
+
active: threads.filter((t) => !t.root.resolved_at).length,
|
|
248
|
+
resolved: threads.filter((t) => t.root.resolved_at).length,
|
|
249
|
+
comments_total: allComments.length,
|
|
250
|
+
matched: selected.length,
|
|
79
251
|
returned: comments.length,
|
|
252
|
+
offset,
|
|
253
|
+
has_more: offset + comments.length < selected.length,
|
|
254
|
+
...(targetNode
|
|
255
|
+
? { node_id: normalizeNodeId(targetNode), nested_nodes: nodeIds?.size }
|
|
256
|
+
: {}),
|
|
80
257
|
},
|
|
81
258
|
};
|
|
82
259
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-tools.js","sourceRoot":"","sources":["../../src/core/comment-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO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;oBACD,OAAO,EAAE,IAAI;iBACb,CAAC;YACH,CAAC;YAED,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,kBAAkB,CAAC,CAAC;YAEzD,MAAM,GAAG,GAAG,MAAM,WAAW,EAAE,CAAC;YAChC,MAAM,GAAG,CAAC,aAAa,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;YAE7C,OAAO;gBACN,OAAO,EAAE;oBACR;wBACC,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;4BACpB,OAAO,EAAE,IAAI;4BACb,kBAAkB,EAAE,UAAU;yBAC9B,CAAC;qBACF;iBACD;aACD,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,0BAA0B,CAAC,CAAC;YAEpD,OAAO;gBACN,OAAO,EAAE;oBACR;wBACC,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;4BACpB,KAAK,EAAE,uBAAuB;4BAC9B,OAAO,EAAE,0BAA0B,OAAO,EAAE;yBAC5C,CAAC;qBACF;iBACD;gBACD,OAAO,EAAE,IAAI;aACb,CAAC;QACH,CAAC;IACF,CAAC,CACD,CAAC;AACH,CAAC"}
|
|
@@ -36,7 +36,7 @@ const logger = createChildLogger({ component: "tokens-tools" });
|
|
|
36
36
|
* on every exported token document. Kept in sync with package.json by
|
|
37
37
|
* scripts/release.sh β see step 3 of the release flow.
|
|
38
38
|
*/
|
|
39
|
-
const MCP_VERSION = "1.
|
|
39
|
+
const MCP_VERSION = "1.42.0";
|
|
40
40
|
const EXPORT_TOOL_DESCRIPTION = `Export Figma variables to design token files in your codebase. Bidirectional with figma_import_tokens β together they replace Style Dictionary and Tokens Studio's export pipeline for the popular styling methods.
|
|
41
41
|
|
|
42
42
|
FULLY-IMPLEMENTED OUTPUT FORMATS:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "figma-console-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.42.0",
|
|
4
4
|
"description": "The most comprehensive MCP server for Figma β design tokens, variables, components, write tools, version history diff, accessibility audits, FigJam, Slides, and more. Local (WebSocket Desktop Bridge plugin) and Cloudflare Workers (paired + remote) modes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/local.js",
|