figma-rust-mcp 3.2.1 → 3.2.5

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,6 +8,7 @@ Enables AI agents (Google Antigravity, Claude Code, Cursor, Windsurf, VS Code, Z
8
8
 
9
9
  ## ⚡ Highlights
10
10
 
11
+ - **State & Screen Variant Aggregation (`Context-Preserving Deduplication`)**: Automatically groups frames/sections containing multiple screen states (Default, Typing, Success, Error, Disabled) or repeated list items into a single Base Template + Diffs. Cuts LLM token consumption by **80–90%** while preserving 100% of typography, autolayout, tokens, and button styling.
11
12
  - **Pure Rust Native Performance**: Starts in `< 1ms`, uses `~3MB RAM`, zero GC pauses.
12
13
  - **In-Memory Deep Indexing (`figma_index`)**: Queries layers, components, styles, and tokens in `< 1ms` without slow canvas roundtrips.
13
14
  - **Binary IPC & Chunk Streaming**: Powered by **MessagePack** (`rmp-serde`) and progressive subtree chunking for instant transfers of massive design files.
@@ -61,7 +62,7 @@ Enables AI agents (Google Antigravity, Claude Code, Cursor, Windsurf, VS Code, Z
61
62
 
62
63
  ```bash
63
64
  # Launch interactive MCP server
64
- npx figma-rust-mcp
65
+ npx -y figma-rust-mcp@latest
65
66
  ```
66
67
  *(Automatically downloads precompiled native binary for macOS Apple Silicon/Intel, Linux, or Windows).*
67
68
 
@@ -72,7 +73,7 @@ npx figma-rust-mcp
72
73
  Create the permanent Thin Loader folder in your home directory:
73
74
 
74
75
  ```bash
75
- npx figma-rust-mcp --setup-plugin
76
+ npx -y figma-rust-mcp@latest --setup-plugin
76
77
  ```
77
78
 
78
79
  1. Open **Figma Desktop**.
@@ -89,19 +90,19 @@ Run `figma-rust-mcp` seamlessly in the background across all your AI editors wit
89
90
 
90
91
  ```bash
91
92
  # Install and start background service (macOS LaunchAgent, Linux systemd, Windows Task)
92
- npx figma-rust-mcp --install-service
93
+ npx -y figma-rust-mcp@latest --install-service
93
94
 
94
95
  # Check live background service status & bridge health
95
- npx figma-rust-mcp --service-status
96
+ npx -y figma-rust-mcp@latest --service-status
96
97
 
97
98
  # One-command upgrade to latest version & auto-restart background service
98
- npx figma-rust-mcp --upgrade
99
+ npx -y figma-rust-mcp@latest --upgrade
99
100
 
100
101
  # Add convenient 'figma-mcp' alias to your shell profile (~/.zshrc, ~/.bashrc)
101
- npx figma-rust-mcp --alias
102
+ npx -y figma-rust-mcp@latest --alias
102
103
 
103
104
  # Stop and remove background service
104
- npx figma-rust-mcp --uninstall-service
105
+ npx -y figma-rust-mcp@latest --uninstall-service
105
106
  ```
106
107
 
107
108
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "figma-rust-mcp",
3
- "version": "3.2.1",
3
+ "version": "3.2.5",
4
4
  "description": "Claude Code to Figma — Bidirectional MCP bridge. AI draws UI on Figma canvas, reads designs back. Works with Claude, Cursor, VS Code, Windsurf, Antigravity. No API key needed.",
5
5
  "mcpName": "io.github.BuiHung1612/figma-mcp",
6
6
  "type": "module",
@@ -13,21 +13,11 @@
13
13
  "http://localhost:38453",
14
14
  "http://localhost:38454",
15
15
  "http://localhost:38455",
16
- "http://127.0.0.1:38451",
17
- "http://127.0.0.1:38452",
18
- "http://127.0.0.1:38453",
19
- "http://127.0.0.1:38454",
20
- "http://127.0.0.1:38455",
21
16
  "ws://localhost:38451",
22
17
  "ws://localhost:38452",
23
18
  "ws://localhost:38453",
24
19
  "ws://localhost:38454",
25
- "ws://localhost:38455",
26
- "ws://127.0.0.1:38451",
27
- "ws://127.0.0.1:38452",
28
- "ws://127.0.0.1:38453",
29
- "ws://127.0.0.1:38454",
30
- "ws://127.0.0.1:38455"
20
+ "ws://localhost:38455"
31
21
  ],
32
22
  "reasoning": "Thin loader connecting dynamically to the local figma-mcp Rust engine on ports 38451-38455."
33
23
  }
package/plugin/ui.html CHANGED
@@ -125,7 +125,7 @@
125
125
  <div class="title">Connecting to figma-mcp</div>
126
126
  <div id="status" class="status-text">Scanning local ports (38451-38455)...</div>
127
127
  <div class="badge">
128
- <span>●</span> <span id="port-label">127.0.0.1:38451</span>
128
+ <span>●</span> <span id="port-label">localhost:38451</span>
129
129
  </div>
130
130
  <div class="hint-box">
131
131
  Ensure the local Rust server is running:
@@ -141,7 +141,7 @@
141
141
  const controller = new AbortController();
142
142
  const timeoutId = setTimeout(() => controller.abort(), 800);
143
143
  try {
144
- const res = await fetch(`http://127.0.0.1:${port}/plugin/version`, {
144
+ const res = await fetch(`http://localhost:${port}/plugin/version`, {
145
145
  signal: controller.signal,
146
146
  cache: "no-store"
147
147
  });
@@ -162,7 +162,7 @@
162
162
 
163
163
  try {
164
164
  // 1. Fetch main thread code
165
- const codeRes = await fetch(`http://127.0.0.1:${port}/plugin/code.js?t=${Date.now()}`);
165
+ const codeRes = await fetch(`http://localhost:${port}/plugin/code.js?t=${Date.now()}`);
166
166
  if (!codeRes.ok) throw new Error("Failed to load plugin code: " + codeRes.status);
167
167
  const codeText = await codeRes.text();
168
168
 
@@ -170,7 +170,7 @@
170
170
  parent.postMessage({ pluginMessage: { type: "EVAL_MAIN_CODE", code: codeText } }, "*");
171
171
 
172
172
  // 2. Fetch full UI HTML
173
- const uiRes = await fetch(`http://127.0.0.1:${port}/plugin/ui.html?t=${Date.now()}`);
173
+ const uiRes = await fetch(`http://localhost:${port}/plugin/ui.html?t=${Date.now()}`);
174
174
  if (!uiRes.ok) throw new Error("Failed to load plugin UI: " + uiRes.status);
175
175
  const uiHtml = await uiRes.text();
176
176
 
@@ -191,7 +191,7 @@
191
191
  const portEl = document.getElementById("port-label");
192
192
 
193
193
  for (const port of PORTS) {
194
- if (portEl) portEl.textContent = `127.0.0.1:${port}`;
194
+ if (portEl) portEl.textContent = `localhost:${port}`;
195
195
  const result = await checkPort(port);
196
196
  if (result.ok) {
197
197
  await bootstrapFromPort(port);