figma-mcp-console 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -4
- package/bin.js +8 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Figma MCP Console
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/figma-mcp-console)
|
|
4
|
+
[](https://modelcontextprotocol.io/)
|
|
5
|
+
[](https://github.com/hoangann2000/figma-mcp-console/blob/main/LICENSE)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
> **Let your AI assistant design in Figma — no API token, no rate limits.**
|
|
8
|
+
> Works with Claude CLI · Claude Desktop · Codex · VS Code · Cursor · Antigravity · any MCP client.
|
|
9
|
+
|
|
10
|
+
## ✨ What can it do?
|
|
11
|
+
|
|
12
|
+
- 🖥️ **Figma → Code** — paste a link to a Figma frame, and the AI implements that exact screen in your codebase, exporting the design's icons and images into your project
|
|
13
|
+
- 🎨 **Requirement → Figma** — paste a requirement, and the AI draws the screen in Figma, then screenshots its own work and fixes what's off
|
|
14
|
+
- 🔁 **Token sync** — pull design tokens into your theme config, or build a design system in Figma from your code
|
|
15
|
+
|
|
16
|
+
> 💡 No REST API, no access token, no rate limits — it drives a plugin **inside Figma Desktop**, and everything stays on your machine.
|
|
17
|
+
|
|
18
|
+
## ⚡ Quick start
|
|
19
|
+
|
|
20
|
+
**1.** Add to your MCP client config (Claude CLI shown — [all clients here](https://github.com/hoangann2000/figma-mcp-console#step-1--add-the-server-to-your-ai-tool)):
|
|
6
21
|
|
|
7
22
|
```json
|
|
8
23
|
{
|
|
@@ -15,4 +30,17 @@ This package is a thin launcher: on first run it downloads the prebuilt server b
|
|
|
15
30
|
}
|
|
16
31
|
```
|
|
17
32
|
|
|
18
|
-
|
|
33
|
+
**2.** Download **[plugin.zip](https://github.com/hoangann2000/figma-mcp-console/releases/latest)**, unzip, and in **Figma Desktop**: *Plugins → Development → Import plugin from manifest…* → `manifest.json`. Run the plugin and keep its window open.
|
|
34
|
+
|
|
35
|
+
**3.** Ask your AI:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
Implement this Figma page in our project: <paste Figma link>
|
|
39
|
+
Export its icons as SVG into public/icons and use them in the code.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
📖 Full guide, example prompts and troubleshooting: **[github.com/hoangann2000/figma-mcp-console](https://github.com/hoangann2000/figma-mcp-console)**
|
|
43
|
+
|
|
44
|
+
## 📄 License
|
|
45
|
+
|
|
46
|
+
MIT © [Hoang Le Thien An](https://github.com/hoangann2000)
|
package/bin.js
CHANGED
|
@@ -16,6 +16,11 @@ const path = require("path");
|
|
|
16
16
|
const pkg = require("./package.json");
|
|
17
17
|
const REPO = "hoangann2000/figma-mcp-console"; // must match the GitHub repo
|
|
18
18
|
|
|
19
|
+
// The GitHub release tag to download the server binary from. Decoupled from
|
|
20
|
+
// pkg.version so npm-only updates (README, wrapper fixes) don't require a new
|
|
21
|
+
// GitHub release. Bump this ONLY when a new vX.Y.Z release exists on GitHub.
|
|
22
|
+
const BINARY_VERSION = "0.1.0";
|
|
23
|
+
|
|
19
24
|
const GOOS = { darwin: "darwin", linux: "linux", win32: "windows" }[process.platform];
|
|
20
25
|
const GOARCH = { x64: "amd64", arm64: "arm64" }[process.arch];
|
|
21
26
|
|
|
@@ -29,8 +34,8 @@ if (GOOS === "windows" && GOARCH === "arm64") fail("windows/arm64 builds are not
|
|
|
29
34
|
|
|
30
35
|
const exe = GOOS === "windows" ? ".exe" : "";
|
|
31
36
|
const asset = `figma-mcp_${GOOS}_${GOARCH}${exe}`;
|
|
32
|
-
const url = `https://github.com/${REPO}/releases/download/v${
|
|
33
|
-
const cacheDir = path.join(os.homedir(), ".figma-mcp-console",
|
|
37
|
+
const url = `https://github.com/${REPO}/releases/download/v${BINARY_VERSION}/${asset}`;
|
|
38
|
+
const cacheDir = path.join(os.homedir(), ".figma-mcp-console", BINARY_VERSION);
|
|
34
39
|
const binPath = path.join(cacheDir, `figma-mcp${exe}`);
|
|
35
40
|
|
|
36
41
|
function download(from, dest, redirects, done) {
|
|
@@ -62,7 +67,7 @@ function run() {
|
|
|
62
67
|
if (fs.existsSync(binPath)) {
|
|
63
68
|
run();
|
|
64
69
|
} else {
|
|
65
|
-
process.stderr.write(`figma-mcp-console: downloading ${asset} v${
|
|
70
|
+
process.stderr.write(`figma-mcp-console: downloading ${asset} v${BINARY_VERSION}...\n`);
|
|
66
71
|
fs.mkdirSync(cacheDir, { recursive: true });
|
|
67
72
|
// Download to a temp name, then rename, so a concurrently started client
|
|
68
73
|
// never executes a half-written binary.
|
package/package.json
CHANGED