localhost-figma-mcp 1.5.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 +19 -0
- package/README.md +77 -0
- package/dist/THIRD_PARTY_LICENSES.txt +306 -0
- package/dist/figma-plugin/code.js +455 -0
- package/dist/figma-plugin/manifest.json +23 -0
- package/dist/figma-plugin/ui.html +961 -0
- package/dist/server.js +36966 -0
- package/dist/status.js +16 -0
- package/package.json +51 -0
package/dist/status.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/shared/protocol.ts
|
|
4
|
+
var PORT = 38470;
|
|
5
|
+
var BRIDGE_URL = `http://localhost:${PORT}`;
|
|
6
|
+
|
|
7
|
+
// src/hooks/status.ts
|
|
8
|
+
var files = [];
|
|
9
|
+
try {
|
|
10
|
+
const res = await fetch(`http://127.0.0.1:${PORT}/status`, { signal: AbortSignal.timeout(800) });
|
|
11
|
+
({ files } = await res.json());
|
|
12
|
+
} catch {
|
|
13
|
+
}
|
|
14
|
+
console.log(
|
|
15
|
+
files.length ? `Figma bridge: connected to ${files.map((f) => `"${f.name}"`).join(", ")}.` : "Figma bridge: plugin not connected yet. Before using figma_* tools, the user must run Plugins > Development > Localhost MCP Bridge in Figma Desktop."
|
|
16
|
+
);
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "localhost-figma-mcp",
|
|
3
|
+
"version": "1.5.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Local-only Figma bridge: full Figma Plugin API access from Claude over MCP. No telemetry.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"figma",
|
|
8
|
+
"figma-plugin",
|
|
9
|
+
"mcp",
|
|
10
|
+
"model-context-protocol",
|
|
11
|
+
"claude"
|
|
12
|
+
],
|
|
13
|
+
"author": "paulocapa55@gmail.com",
|
|
14
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
15
|
+
"bin": {
|
|
16
|
+
"localhost-figma-mcp": "dist/server.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=20"
|
|
23
|
+
},
|
|
24
|
+
"packageManager": "pnpm@10.15.1",
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "node scripts/build.ts",
|
|
27
|
+
"typecheck": "tsc -p . && tsc -p src/plugin && tsc -p src/ui",
|
|
28
|
+
"lint": "biome check .",
|
|
29
|
+
"format": "biome check --write .",
|
|
30
|
+
"test": "pnpm build && node --test test/",
|
|
31
|
+
"check": "pnpm typecheck && pnpm lint && pnpm test",
|
|
32
|
+
"test:setup": "playwright install chromium",
|
|
33
|
+
"prepublishOnly": "pnpm check"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@biomejs/biome": "^2.5.14",
|
|
37
|
+
"@figma/plugin-typings": "^1.139.0",
|
|
38
|
+
"@fontsource-variable/inter": "^5.3.0",
|
|
39
|
+
"@modelcontextprotocol/sdk": "^1.30.1",
|
|
40
|
+
"@types/node": "^26.6.3",
|
|
41
|
+
"esbuild": "^0.28.2",
|
|
42
|
+
"playwright": "^1.63.0",
|
|
43
|
+
"typescript": "^7.0.2",
|
|
44
|
+
"zod": "^4.6.5"
|
|
45
|
+
},
|
|
46
|
+
"pnpm": {
|
|
47
|
+
"onlyBuiltDependencies": [
|
|
48
|
+
"esbuild"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
}
|