@vietthai/figma-remote-mcp-go 0.0.0-stage → 0.2.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 ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 vkhanhqui
4
+ Copyright (c) 2026 vietthai104
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,334 @@
1
- # Temporary Holding Version
1
+ # figma-remote-mcp-go
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Figma MCP with Remote Agent Support
4
+ <p>
5
+ <a href="https://www.npmjs.com/package/@vietthai/figma-remote-mcp-go"><img src="https://img.shields.io/npm/v/@vietthai/figma-remote-mcp-go?color=blue" alt="npm version" /></a>
6
+ <a href="https://registry.modelcontextprotocol.io/?q=figma-remote-mcp-go"><img src="https://img.shields.io/badge/MCP-Registry-purple" alt="MCP Registry" /></a>
7
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
8
+ <a href="https://github.com/vietthai104/figma-remote-mcp-go-main/stargazers"><img src="https://img.shields.io/github/stars/vietthai104/figma-remote-mcp-go-main?style=social" alt="GitHub stars" /></a>
9
+ </p>
10
+
11
+ Open-source Figma MCP server with full read/write access via plugin — **remote agent support with auth tokens**, no REST API, no rate limits. Turn text into designs and designs into real code. Works with Cursor, Claude, GitHub Copilot, and any MCP-compatible AI tool.
12
+
13
+ **Highlights**
14
+ - No Figma API token required
15
+ - No rate limits — free plan friendly
16
+ - **Read and Write** live Figma data via plugin bridge — 73 tools total
17
+ - Full design automation — styles, variables, components, prototypes, and content
18
+ - Design strategies included — read_design_strategy, design_strategy, and more prompts built in
19
+
20
+ **Styles, Variables, Components, Prototypes, and Content**
21
+
22
+ https://github.com/user-attachments/assets/eae41471-fc72-4574-8261-4f42c38b8c99
23
+
24
+ **Text to Design, Design to Code**
25
+
26
+ https://github.com/user-attachments/assets/17bda971-0e83-4f18-8758-8ac2b8dcba62
27
+
28
+ ---
29
+
30
+ ## Why this exists
31
+
32
+ Most Figma MCP servers rely on the **Figma REST API**.
33
+
34
+ That sounds fine… until you hit this:
35
+
36
+ | Plan | Limit |
37
+ |------|-------|
38
+ | Starter / View / Collab | **6 tool calls/month** |
39
+ | Pro / Org (Dev seat) | 200 tool calls/day |
40
+ | Enterprise | 600 tool calls/day |
41
+
42
+ If you're experimenting with AI tools, you'll burn through that in minutes.
43
+
44
+ I didn't have enough money to pay for higher limits.
45
+ So I built something that **doesn't use the API at all**.
46
+
47
+ ---
48
+
49
+ ## Installation & Setup
50
+
51
+ Install via `npx` — no build step required. Watch the setup video or follow the steps below.
52
+
53
+ [![Watch the video](https://img.youtube.com/vi/DjqyU0GKv9k/sddefault.jpg)](https://youtu.be/DjqyU0GKv9k)
54
+
55
+ ### 1. Configure your AI tool
56
+
57
+ Choose one of the two modes below based on how you want to run the server:
58
+
59
+ #### Mode A: Standalone Mode (IDE runs the Leader)
60
+ If you don't run a separate Leader server in a terminal, configure it without `FIGMA_MCP_LEADER_URL`. The IDE will spawn the process, which will run as a **Leader** and bind to port `1994` (default). You then connect the Figma Desktop plugin directly to `127.0.0.1:1994`.
61
+
62
+ **Cursor / VS Code (`.vscode/mcp.json`):**
63
+ ```json
64
+ {
65
+ "servers": {
66
+ "figma-remote-mcp-go": {
67
+ "type": "stdio",
68
+ "command": "npx",
69
+ "args": [
70
+ "-y",
71
+ "@vietthai/figma-remote-mcp-go"
72
+ ]
73
+ }
74
+ }
75
+ }
76
+ ```
77
+
78
+ **Claude Desktop / Other MCP clients (`.mcp.json`):**
79
+ ```json
80
+ {
81
+ "mcpServers": {
82
+ "figma-remote-mcp-go": {
83
+ "command": "npx",
84
+ "args": ["-y", "@vietthai/figma-remote-mcp-go"]
85
+ }
86
+ }
87
+ }
88
+ ```
89
+
90
+ #### Mode B: Follower Mode (Separate Leader Process — Recommended)
91
+ If you run a separate Leader process in a terminal (e.g., `npx @vietthai/figma-remote-mcp-go` to keep the Figma plugin connected when the IDE restarts), you **must** configure the IDE's MCP client as a **Follower** by setting the `FIGMA_MCP_LEADER_URL` environment variable. This prevents port conflicts on port `1994`.
92
+
93
+ **Cursor / VS Code (`.vscode/mcp.json`):**
94
+ ```json
95
+ {
96
+ "servers": {
97
+ "figma-remote-mcp-go": {
98
+ "type": "stdio",
99
+ "command": "npx",
100
+ "args": [
101
+ "-y",
102
+ "@vietthai/figma-remote-mcp-go"
103
+ ],
104
+ "env": {
105
+ "FIGMA_MCP_LEADER_URL": "http://127.0.0.1:1994"
106
+ }
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ **Claude Desktop / Other MCP clients (`.mcp.json`):**
113
+ ```json
114
+ {
115
+ "mcpServers": {
116
+ "figma-remote-mcp-go": {
117
+ "command": "npx",
118
+ "args": ["-y", "@vietthai/figma-remote-mcp-go"],
119
+ "env": {
120
+ "FIGMA_MCP_LEADER_URL": "http://127.0.0.1:1994"
121
+ }
122
+ }
123
+ }
124
+ }
125
+ ```
126
+
127
+ **Claude Code CLI:**
128
+ ```bash
129
+ claude mcp add -s project figma-remote-mcp-go -- npx -y @vietthai/figma-remote-mcp-go@latest
130
+ # Note: Edit ~/.claude/mcp_servers.json to add FIGMA_MCP_LEADER_URL if using Follower mode
131
+ ```
132
+
133
+ **Codex CLI:**
134
+ ```bash
135
+ codex mcp add figma-remote-mcp-go -- npx -y @vietthai/figma-remote-mcp-go@latest
136
+ ```
137
+
138
+ ### 2. Install the Figma plugin
139
+
140
+ 1. In Figma Desktop: **Plugins → Development → Import plugin from manifest**
141
+ 2. Select `manifest.json` from the [plugin.zip](https://github.com/vietthai104/figma-remote-mcp-go-main/releases)
142
+ 3. Run the plugin inside any Figma file
143
+
144
+ ---
145
+
146
+ ## Available Tools
147
+
148
+ ### Write — Create
149
+
150
+ | Tool | Description |
151
+ |------|-------------|
152
+ | `create_frame` | Create a frame with optional auto-layout, fill, and parent |
153
+ | `create_rectangle` | Create a rectangle with optional fill and corner radius |
154
+ | `create_ellipse` | Create an ellipse or circle |
155
+ | `create_text` | Create a text node (font loaded automatically) |
156
+ | `import_image` | Decode base64 image and place it as a rectangle fill |
157
+ | `create_component` | Convert an existing FRAME node into a reusable component |
158
+ | `create_section` | Create a Figma Section node to organise frames on a page |
159
+
160
+ ### Write — Modify
161
+
162
+ | Tool | Description |
163
+ |------|-------------|
164
+ | `set_text` | Update text content of an existing TEXT node |
165
+ | `set_fills` | Set solid fill color (hex) on a node |
166
+ | `set_strokes` | Set solid stroke color and weight on a node |
167
+ | `set_opacity` | Set opacity of one or more nodes (0 = transparent, 1 = opaque) |
168
+ | `set_corner_radius` | Set corner radius — uniform or per-corner |
169
+ | `set_auto_layout` | Set or update auto-layout (flex) properties on a frame |
170
+ | `set_visible` | Show or hide one or more nodes |
171
+ | `lock_nodes` | Lock one or more nodes to prevent accidental edits |
172
+ | `unlock_nodes` | Unlock one or more nodes |
173
+ | `rotate_nodes` | Set absolute rotation in degrees on one or more nodes |
174
+ | `reorder_nodes` | Change z-order: `bringToFront`, `sendToBack`, `bringForward`, `sendBackward` |
175
+ | `set_blend_mode` | Set blend mode (MULTIPLY, SCREEN, OVERLAY, …) on one or more nodes |
176
+ | `set_constraints` | Set responsive constraints `{ horizontal, vertical }` on one or more nodes |
177
+ | `move_nodes` | Move nodes to an absolute x/y position |
178
+ | `resize_nodes` | Resize nodes by width and/or height |
179
+ | `rename_node` | Rename a node |
180
+ | `clone_node` | Clone a node, optionally repositioning or reparenting |
181
+ | `reparent_nodes` | Move nodes to a different parent frame, group, or section |
182
+ | `batch_rename_nodes` | Bulk rename nodes via find/replace, regex, or prefix/suffix |
183
+ | `find_replace_text` | Find and replace text across all TEXT nodes in a subtree or page; supports regex |
184
+
185
+ ### Write — Delete
186
+
187
+ | Tool | Description |
188
+ |------|-------------|
189
+ | `delete_nodes` | Delete one or more nodes permanently |
190
+
191
+ ### Write — Prototype
192
+
193
+ | Tool | Description |
194
+ |------|-------------|
195
+ | `set_reactions` | Set prototype reactions (triggers + actions) on a node; mode `replace` or `append` |
196
+ | `remove_reactions` | Remove all or specific reactions by zero-based index from a node |
197
+
198
+ ### Write — Styles
199
+
200
+ | Tool | Description |
201
+ |------|-------------|
202
+ | `set_effects` | Apply drop shadow / blur effects directly on a node (no style required) |
203
+ | `create_paint_style` | Create a named paint style with a solid color |
204
+ | `create_text_style` | Create a named text style with font, size, and spacing |
205
+ | `create_effect_style` | Create a named effect style (drop shadow, inner shadow, blur) |
206
+ | `create_grid_style` | Create a named layout grid style (columns, rows, or grid) |
207
+ | `update_paint_style` | Rename or recolor an existing paint style |
208
+ | `apply_style_to_node` | Apply an existing local style to a node, linking it to that style |
209
+ | `delete_style` | Delete any style (paint, text, effect, or grid) by ID |
210
+
211
+ ### Write — Variables
212
+
213
+ | Tool | Description |
214
+ |------|-------------|
215
+ | `create_variable_collection` | Create a new local variable collection with an optional initial mode |
216
+ | `add_variable_mode` | Add a new mode to an existing collection (e.g. Light/Dark) |
217
+ | `create_variable` | Create a variable (COLOR/FLOAT/STRING/BOOLEAN) in a collection |
218
+ | `set_variable_value` | Set a variable's value for a specific mode |
219
+ | `bind_variable_to_node` | Bind a variable to a node property — supports `fillColor`, `strokeColor`, `visible`, `opacity`, `rotation`, `width`, `height`, corner radii, spacing, and more |
220
+ | `delete_variable` | Delete a variable or an entire collection |
221
+
222
+ ### Write — Pages
223
+
224
+ | Tool | Description |
225
+ |------|-------------|
226
+ | `add_page` | Add a new page to the document (optional name and index) |
227
+ | `delete_page` | Delete a page by ID or name (cannot delete the only page) |
228
+ | `rename_page` | Rename a page by ID or current name |
229
+
230
+ ### Write — Components & Navigation
231
+
232
+ | Tool | Description |
233
+ |------|-------------|
234
+ | `navigate_to_page` | Switch the active Figma page by ID or name |
235
+ | `group_nodes` | Group two or more nodes into a GROUP |
236
+ | `ungroup_nodes` | Ungroup GROUP nodes, moving children to the parent |
237
+ | `swap_component` | Swap the main component of an INSTANCE node |
238
+ | `detach_instance` | Detach component instances, converting them to plain frames |
239
+
240
+ ### Read — Document & Selection
241
+
242
+ | Tool | Description |
243
+ |------|-------------|
244
+ | `get_document` | Full current page tree |
245
+ | `get_metadata` | File name, pages, current page |
246
+ | `get_pages` | All pages (IDs + names) — lightweight, no tree loading |
247
+ | `get_selection` | Currently selected nodes |
248
+ | `get_node` | Single node by ID (optional `depth`) |
249
+ | `get_nodes_info` | Multiple nodes by ID (optional `depth`) |
250
+ | `get_design_context` | Depth-limited tree with `detail` level (`minimal`/`compact`/`full`); target = `nodeId` > selection > current page |
251
+ | `search_nodes` | Find nodes by name substring and/or type within a subtree |
252
+ | `scan_text_nodes` | All text nodes in a subtree |
253
+ | `scan_nodes_by_types` | Nodes matching given type list |
254
+ | `get_viewport` | Current viewport center, zoom, and visible bounds |
255
+
256
+ #### Node output format
257
+
258
+ `get_document`, `get_node`, `get_nodes_info`, `get_selection` and `get_design_context` share one node format:
259
+
260
+ ```json
261
+ {
262
+ "id": "640:44", "name": "Data", "type": "FRAME",
263
+ "bounds": {"x": 421, "y": 8.5, "width": 373, "height": 36},
264
+ "layout": {"mode": "HORIZONTAL", "padding": [6, 12, 6, 12],
265
+ "align": "SPACE_BETWEEN", "counterAlign": "CENTER", "sizing": ["FIXED", "HUG"]},
266
+ "styles": {"cornerRadius": 6, "fills": "s1", "strokes": "s2"},
267
+ "childCount": 2
268
+ }
269
+ ```
270
+
271
+ - `bounds.x/y` are relative to the parent.
272
+ - Default values are omitted: no empty `styles`/`children`, `visible` only when `false`, `opacity` only when ≠ 1, no `textAlignHorizontal: LEFT`. `fontWeight` only appears when `fontStyle` is `mixed`.
273
+ - `layout.mode` is present only on auto-layout containers (`mode`, `gap`, `padding` `[top,right,bottom,left]`, `align`, `counterAlign`, `wrap`…). Children of auto-layout frames get `layout.sizing` (`[horizontal, vertical]`, e.g. `FILL`/`HUG`) and `positioning: "ABSOLUTE"` when applicable.
274
+ - SOLID paints are hex strings (`#rrggbb` / `#rrggbbaa`). A SOLID paint bound to a color variable becomes `{"type":"SOLID","color":"#ffffff","variable":"Color/Background/Surface"}` (variable ID if the name can't be resolved). Other paints are objects, e.g. `{"type":"IMAGE","scaleMode":"FILL"}`, `{"type":"GRADIENT_LINEAR","stops":["#2606a6","#9a0ab1","#ff003d"],"positions":[0,0.36,1],"angle":90}`. `positions` only appear when stops are not evenly spaced; `angle` uses CSS `linear-gradient` degrees (0 = to top, 90 = to right) computed from the real node size; radial/angular/diamond gradients get `center: [x, y]` (fractions of the node) when off-centre. Hidden paints are dropped.
275
+ - Nodes with visible strokes get `strokeWeight` (a number, or `[top,right,bottom,left]` when the sides differ), `strokeAlign` (`INSIDE` / `CENTER` / `OUTSIDE`) and `dashPattern` when dashed.
276
+ - Figma reports `fontName`/`fontSize` as mixed as soon as one character range differs. The values shared by every range are still reported (e.g. `fontFamily: "Inter"`); only what really differs is `"mixed"`, and full detail adds `styles.textSegments`, e.g. `[{"characters":"Price: ","fontStyle":"Regular"},{"characters":"$99","fontStyle":"Bold"}]` (only the differing properties). `get_fonts` counts each font of such a node.
277
+ - Fills/strokes used more than once are replaced by keys (`"s1"`) into a top-level `globalVars.styles` map.
278
+ - When a `depth` limit cuts the tree, the deepest nodes report `childCount` instead of `children`.
279
+ - `get_selection` and `get_nodes_info` return `{"nodes": [...], "globalVars"?: {...}}`. `get_design_context` returns `{fileName, currentPage, target, selectionCount, context: [...], globalVars?, componentDefs?}`, where `target` is `node` / `selection` / `page`. With `dedupe_components`, instance `overrides[].fills` use the same paint format.
280
+
281
+ ### Read — Styles & Variables
282
+
283
+ | Tool | Description |
284
+ |------|-------------|
285
+ | `get_styles` | Paint, text, effect, and grid styles |
286
+ | `get_variable_defs` | Variable collections and values |
287
+ | `get_local_components` | All components + component sets with variant properties |
288
+ | `get_annotations` | Dev-mode annotations |
289
+ | `get_fonts` | All fonts used on the current page, sorted by frequency |
290
+ | `get_reactions` | Prototype/interaction reactions on a node |
291
+
292
+ ### Export
293
+
294
+ | Tool | Description |
295
+ |------|-------------|
296
+ | `get_screenshot` | Base64 image export of any node |
297
+ | `save_screenshots` | Export images to disk (server-side, no API call) |
298
+ | `export_frames_to_pdf` | Export multiple frames as a single multi-page PDF file saved to disk |
299
+ | `export_tokens` | Export design tokens (variables + paint styles) as JSON or CSS |
300
+
301
+ ### MCP Prompts
302
+
303
+ | Prompt | Description |
304
+ |--------|-------------|
305
+ | `read_design_strategy` | Best practices for reading Figma designs |
306
+ | `design_strategy` | Best practices for creating and modifying designs |
307
+ | `text_replacement_strategy` | Chunked approach for replacing text across a design |
308
+ | `annotation_conversion_strategy` | Convert manual annotations to native Figma annotations |
309
+ | `swap_overrides_instances` | Transfer overrides between component instances |
310
+ | `reaction_to_connector_strategy` | Map prototype reactions into interaction flow diagrams |
311
+
312
+ ---
313
+
314
+ ## Related Projects
315
+
316
+ - [magic-spells/figma-mcp-bridge](https://github.com/magic-spells/figma-mcp-bridge)
317
+ - [grab/cursor-talk-to-figma-mcp](https://github.com/grab/cursor-talk-to-figma-mcp)
318
+ - [gethopp/figma-mcp-bridge](https://github.com/gethopp/figma-mcp-bridge)
319
+
320
+ ---
321
+
322
+ ## Contributing
323
+
324
+ Issues and PRs are welcome.
325
+
326
+ ## Star History
327
+
328
+ <a href="https://www.star-history.com/?repos=vietthai104%2Ffigma-remote-mcp-go-main&type=date&legend=top-left">
329
+ <picture>
330
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=vietthai104/figma-remote-mcp-go-main&type=date&theme=dark&legend=top-left" />
331
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=vietthai104/figma-remote-mcp-go-main&type=date&legend=top-left" />
332
+ <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=vietthai104/figma-remote-mcp-go-main&type=date&legend=top-left" />
333
+ </picture>
334
+ </a>
Binary file
Binary file
Binary file
Binary file
package/bin/run.js ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const { spawnSync } = require('node:child_process');
5
+ const { existsSync } = require('node:fs');
6
+ const path = require('node:path');
7
+
8
+ const PLATFORM_MAP = { darwin: 'darwin', linux: 'linux', win32: 'windows' };
9
+ const ARCH_MAP = { x64: 'amd64', arm64: 'arm64' };
10
+
11
+ const goos = PLATFORM_MAP[process.platform];
12
+ const goarch = ARCH_MAP[process.arch];
13
+
14
+ if (!goos || !goarch) {
15
+ process.stderr.write(`[figma-mcp-go] Unsupported platform: ${process.platform}/${process.arch}\n`);
16
+ process.exit(1);
17
+ }
18
+
19
+ const binaryName = process.platform === 'win32' ? 'figma-mcp-go.exe' : 'figma-mcp-go';
20
+ const binaryPath = path.join(__dirname, `${goos}-${goarch}`, binaryName);
21
+
22
+ if (!existsSync(binaryPath)) {
23
+ process.stderr.write(
24
+ '[figma-mcp-go] Binary not found. Try reinstalling: npm install @vietthai/figma-remote-mcp-go\n'
25
+ );
26
+ process.exit(1);
27
+ }
28
+
29
+ const result = spawnSync(binaryPath, process.argv.slice(2), { stdio: 'inherit' });
30
+ process.exit(result.status ?? 1);
package/package.json CHANGED
@@ -1,6 +1,37 @@
1
- {
2
- "name": "@vietthai/figma-remote-mcp-go",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
1
+ {
2
+ "name": "@vietthai/figma-remote-mcp-go",
3
+ "version": "0.2.0",
4
+ "description": "Figma MCP server with remote agent support — auth tokens, .env config, no API key, no rate limits",
5
+ "mcpName": "io.github.vietthai104/figma-remote-mcp-go-main",
6
+ "bin": {
7
+ "figma-mcp-go": "bin/run.js"
8
+ },
9
+ "files": [
10
+ "bin/run.js",
11
+ "bin/darwin-amd64/",
12
+ "bin/darwin-arm64/",
13
+ "bin/linux-amd64/",
14
+ "bin/linux-arm64/",
15
+ "bin/windows-amd64/",
16
+ "bin/windows-arm64/"
17
+ ],
18
+ "keywords": [
19
+ "figma",
20
+ "mcp",
21
+ "model-context-protocol",
22
+ "ai",
23
+ "design"
24
+ ],
25
+ "license": "MIT",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/vietthai104/figma-remote-mcp-go-main.git"
29
+ },
30
+ "homepage": "https://github.com/vietthai104/figma-remote-mcp-go-main#readme",
31
+ "bugs": {
32
+ "url": "https://github.com/vietthai104/figma-remote-mcp-go-main/issues"
33
+ },
34
+ "engines": {
35
+ "node": ">=18.0.0"
36
+ }
6
37
  }