zapcode-figma-mcp 1.2.0 → 1.3.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 +24 -9
- package/assets/Zapcode.png +0 -0
- package/assets/icon.png +0 -0
- package/assets/llms-install.md +112 -0
- package/package.json +12 -2
package/README.md
CHANGED
|
@@ -5,10 +5,13 @@
|
|
|
5
5
|
# Zapcode Figma MCP Server
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/zapcode-figma-mcp)
|
|
8
|
+
[](https://discord.com/invite/whau8w7B)
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
Connect your Figma designs directly to AI tools like Claude Desktop, Claude Code, Cursor, and Cline. Get real-time HTML, CSS, images, and assets from selected Figma frames through the Model Context Protocol.
|
|
11
12
|
|
|
13
|
+
> **Get Started:** Visit [**https://zapcode.pages.dev/**](https://zapcode.pages.dev/) for complete documentation, tutorials, and live examples.
|
|
14
|
+
|
|
12
15
|
## Features
|
|
13
16
|
|
|
14
17
|
- **Real-time Design Context** - Fetches live data from your currently selected Figma frame
|
|
@@ -21,11 +24,13 @@ Connect your Figma designs directly to AI tools like Claude Desktop, Claude Code
|
|
|
21
24
|
## Prerequisites
|
|
22
25
|
|
|
23
26
|
1. **Node.js 16+** - [Download here](https://nodejs.org/)
|
|
24
|
-
2. **Figma Desktop
|
|
27
|
+
2. **Figma Desktop or Web** - Required for plugin
|
|
25
28
|
3. **[Zapcode Figma Plugin](https://www.figma.com/community/plugin/1454956820198178710/zapcode)** - Install from Figma Community
|
|
26
29
|
|
|
27
30
|
## Installation
|
|
28
31
|
|
|
32
|
+
> **Note**: The `--figma-port` argument specifies which port to use for communication with the Figma plugin. Default is `32896`. You can customize this port if needed (e.g., to run multiple instances or if the default port is already in use).
|
|
33
|
+
|
|
29
34
|
### Claude Desktop
|
|
30
35
|
|
|
31
36
|
Add to your `claude_desktop_config.json`:
|
|
@@ -38,7 +43,7 @@ Add to your `claude_desktop_config.json`:
|
|
|
38
43
|
"mcpServers": {
|
|
39
44
|
"zapcode-figma": {
|
|
40
45
|
"command": "npx",
|
|
41
|
-
"args": ["-y", "zapcode-figma-mcp"]
|
|
46
|
+
"args": ["-y", "zapcode-figma-mcp", "--figma-port", "61234"]
|
|
42
47
|
}
|
|
43
48
|
}
|
|
44
49
|
}
|
|
@@ -46,6 +51,8 @@ Add to your `claude_desktop_config.json`:
|
|
|
46
51
|
|
|
47
52
|
Restart Claude Desktop after making changes.
|
|
48
53
|
|
|
54
|
+
|
|
55
|
+
|
|
49
56
|
### Claude Code
|
|
50
57
|
|
|
51
58
|
Add to your `claude_code_config.json`:
|
|
@@ -58,12 +65,18 @@ Add to your `claude_code_config.json`:
|
|
|
58
65
|
"mcpServers": {
|
|
59
66
|
"zapcode-figma": {
|
|
60
67
|
"command": "npx",
|
|
61
|
-
"args": ["-y", "zapcode-figma-mcp"]
|
|
68
|
+
"args": ["-y", "zapcode-figma-mcp", "--figma-port", "61234"]
|
|
62
69
|
}
|
|
63
70
|
}
|
|
64
71
|
}
|
|
65
72
|
```
|
|
66
73
|
|
|
74
|
+
or run
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
claude mcp add --transport stdio zapcode -- npx -y zapcode-figma-mcp --figma-port 61234
|
|
78
|
+
```
|
|
79
|
+
|
|
67
80
|
### Cursor
|
|
68
81
|
|
|
69
82
|
Add to your MCP settings configuration:
|
|
@@ -73,7 +86,7 @@ Add to your MCP settings configuration:
|
|
|
73
86
|
"mcpServers": {
|
|
74
87
|
"zapcode-figma": {
|
|
75
88
|
"command": "npx",
|
|
76
|
-
"args": ["-y", "zapcode-figma-mcp"]
|
|
89
|
+
"args": ["-y", "zapcode-figma-mcp", "--figma-port", "61234"]
|
|
77
90
|
}
|
|
78
91
|
}
|
|
79
92
|
}
|
|
@@ -88,7 +101,7 @@ Add to Cline's MCP settings:
|
|
|
88
101
|
"mcpServers": {
|
|
89
102
|
"zapcode-figma": {
|
|
90
103
|
"command": "npx",
|
|
91
|
-
"args": ["-y", "zapcode-figma-mcp"]
|
|
104
|
+
"args": ["-y", "zapcode-figma-mcp", "--figma-port", "61234"]
|
|
92
105
|
}
|
|
93
106
|
}
|
|
94
107
|
}
|
|
@@ -103,7 +116,7 @@ Add to your Windsurf MCP configuration:
|
|
|
103
116
|
"mcpServers": {
|
|
104
117
|
"zapcode-figma": {
|
|
105
118
|
"command": "npx",
|
|
106
|
-
"args": ["-y", "zapcode-figma-mcp"]
|
|
119
|
+
"args": ["-y", "zapcode-figma-mcp", "--figma-port", "61234"]
|
|
107
120
|
}
|
|
108
121
|
}
|
|
109
122
|
}
|
|
@@ -118,7 +131,7 @@ Add to your Zed settings (MCP support currently in preview):
|
|
|
118
131
|
"context_servers": {
|
|
119
132
|
"zapcode-figma": {
|
|
120
133
|
"command": "npx",
|
|
121
|
-
"args": ["-y", "zapcode-figma-mcp"]
|
|
134
|
+
"args": ["-y", "zapcode-figma-mcp", "--figma-port", "61234"]
|
|
122
135
|
}
|
|
123
136
|
}
|
|
124
137
|
}
|
|
@@ -133,7 +146,7 @@ Add to Continue's configuration:
|
|
|
133
146
|
"mcpServers": {
|
|
134
147
|
"zapcode-figma": {
|
|
135
148
|
"command": "npx",
|
|
136
|
-
"args": ["-y", "zapcode-figma-mcp"]
|
|
149
|
+
"args": ["-y", "zapcode-figma-mcp", "--figma-port", "61234"]
|
|
137
150
|
}
|
|
138
151
|
}
|
|
139
152
|
}
|
|
@@ -149,7 +162,7 @@ Add to your GitHub Copilot MCP configuration:
|
|
|
149
162
|
"zapcode-figma": {
|
|
150
163
|
"type": "stdio",
|
|
151
164
|
"command": "npx",
|
|
152
|
-
"args": ["-y", "zapcode-figma-mcp"]
|
|
165
|
+
"args": ["-y", "zapcode-figma-mcp", "--figma-port", "61234"]
|
|
153
166
|
}
|
|
154
167
|
}
|
|
155
168
|
}
|
|
@@ -219,6 +232,8 @@ This server works with any MCP-compatible client, including:
|
|
|
219
232
|
|
|
220
233
|
## Links
|
|
221
234
|
|
|
235
|
+
- [ZapCode Documentation & Website](https://zapcode.pages.dev/) - Complete guides, tutorials, and examples
|
|
236
|
+
- [Join our Discord Community](https://discord.com/invite/whau8w7B) - Get help, share ideas, and connect with other users
|
|
222
237
|
- [NPM Package](https://www.npmjs.com/package/zapcode-figma-mcp)
|
|
223
238
|
- [Zapcode Figma Plugin](https://www.figma.com/community/plugin/1454956820198178710/zapcode)
|
|
224
239
|
- [Model Context Protocol](https://modelcontextprotocol.io/)
|
|
Binary file
|
package/assets/icon.png
ADDED
|
Binary file
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Setup Guide: Zapcode VS Code Extension & Figma Plugin
|
|
2
|
+
|
|
3
|
+
This guide provides instructions for setting up the Zapcode VS Code extension and its companion Figma plugin, enabling integration with AI assistants like Cline.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- Visual Studio Code installed
|
|
8
|
+
- A Figma account
|
|
9
|
+
- Your AI Assistant (e.g., Cline) installed and configured
|
|
10
|
+
|
|
11
|
+
## Installation Steps
|
|
12
|
+
|
|
13
|
+
### Step 1: Install Zapcode VS Code Extension
|
|
14
|
+
|
|
15
|
+
This extension provides the core functionality and the local MCP server.
|
|
16
|
+
|
|
17
|
+
**Method 1: Using the Command Line (Recommended for automation)**
|
|
18
|
+
|
|
19
|
+
Open your terminal or command prompt and run:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
code --install-extension zapcode.zapcode
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Method 2: Using the VS Code Marketplace UI**
|
|
26
|
+
|
|
27
|
+
1. Open VS Code
|
|
28
|
+
2. Go to the Extensions view (click the square icon on the sidebar or press Ctrl+Shift+X / Cmd+Shift+X)
|
|
29
|
+
3. Search for "Zapcode"
|
|
30
|
+
4. Find the extension published by zapcode
|
|
31
|
+
5. Click "Install"
|
|
32
|
+
|
|
33
|
+
### Step 2: Install Zapcode Figma Plugin
|
|
34
|
+
|
|
35
|
+
This plugin allows the VS Code extension (and your AI assistant via the extension) to interact with your Figma designs. Always ask User to follow below steps.
|
|
36
|
+
|
|
37
|
+
1. Go to the Figma Community page for the Zapcode plugin:
|
|
38
|
+
https://www.figma.com/community/plugin/1454956820198178710/zapcode
|
|
39
|
+
2. Click the "Install" or "Try it out" button on the Figma Community page
|
|
40
|
+
3. Authorize the plugin if prompted within Figma
|
|
41
|
+
|
|
42
|
+
### Step 3: Configure AI Assistant (Example: Cline)
|
|
43
|
+
|
|
44
|
+
You need to inform your AI assistant how to communicate with the Zapcode MCP server provided by the VS Code extension.
|
|
45
|
+
|
|
46
|
+
#### Configuration Details:
|
|
47
|
+
|
|
48
|
+
- Server Name/Title: Zapcode (or a name you prefer)
|
|
49
|
+
- Server URL: http://localhost:3001/zapcode-mcp-sse
|
|
50
|
+
- Transport Type: SSE (Server-Sent Events) - Note: This might be implicit or explicitly configurable depending on the AI assistant
|
|
51
|
+
- Timeout (Optional): 60 seconds (or adjust as needed)
|
|
52
|
+
|
|
53
|
+
#### Instructions for Cline:
|
|
54
|
+
|
|
55
|
+
1. Locate your Cline configuration file. This is typically found at `~/AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json` (This pathe depends on the operating system as well.)
|
|
56
|
+
2. Open `config.json` in a text editor
|
|
57
|
+
3. Add the following entry to the `mcpSources` array (or create the array if it doesn't exist):
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
// ... other configurations ...
|
|
62
|
+
|
|
63
|
+
"mcpServers": {
|
|
64
|
+
// ... potentially other servers ...
|
|
65
|
+
"Zapcode": {
|
|
66
|
+
"disabled": false,
|
|
67
|
+
"timeout": 60,
|
|
68
|
+
"url": "http://localhost:3001/zapcode-mcp-sse",
|
|
69
|
+
"transportType": "sse"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// ... other configurations ...
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
#### If above config doesn't work ask user to Follow below instructions.
|
|
78
|
+
|
|
79
|
+
1. Open cline's MCP servers (BUN icon on top left of cline window) > Remote Servers > Add below details:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
Server Name: Zapcode
|
|
83
|
+
Server URL : "http://localhost:3001/zapcode-mcp-sse"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Note:** Consult your specific AI assistant's documentation for the correct format and location. The Cline example (`mcpSources`) is verified for Cline.
|
|
87
|
+
|
|
88
|
+
4. Save the `config.json` file
|
|
89
|
+
5. You may need to restart your AI assistant (Cline) for the changes to take effect
|
|
90
|
+
|
|
91
|
+
### Step 4: Verify Setup
|
|
92
|
+
|
|
93
|
+
1. Ensure the Zapcode VS Code extension is running in VS Code. You might need to open a project or activate it. Check the VS Code status bar or output panels for any Zapcode status indicators
|
|
94
|
+
2. Ensure your AI assistant (Cline) is running
|
|
95
|
+
3. Check your AI assistant's status indicators or settings to confirm it has successfully connected to the "Zapcode" MCP server at http://localhost:3001/zapcode-mcp-sse
|
|
96
|
+
4. Open a Figma file where you have installed the Zapcode plugin. Run the plugin from the Figma menu (Plugins > Zapcode)
|
|
97
|
+
5. Try a command in your AI assistant that interacts with Figma (refer to Zapcode or your AI assistant's documentation for example commands)
|
|
98
|
+
|
|
99
|
+
## Conclusion
|
|
100
|
+
|
|
101
|
+
Setup is complete! You should now be able to use your AI assistant to interact with Figma via the Zapcode integration.
|
|
102
|
+
|
|
103
|
+
## Usage Instructions:
|
|
104
|
+
|
|
105
|
+
1. **Start Zapcode** - Click the "Start Zapcode" button in the bottom left status bar of VS Code.
|
|
106
|
+
2. **Check AI Assistant Connection** - Go to your AI assistant (e.g., Cline) MCP server settings and verify it shows "Connected".
|
|
107
|
+
3. **Activate Figma Plugin** - Open the Zapcode plugin in Figma and toggle the MCP button in the top left corner of the plugin window.
|
|
108
|
+
4. **Confirm Connection** - The toggle should display "✓ Connected", indicating that everything is properly linked.
|
|
109
|
+
5. **Select in Figma** - Select the frame or component you want to work with in your Figma design.
|
|
110
|
+
6. **Prompt AI Assistant** - Return to your AI assistant and enter a prompt like "Generate code from my selection on Figma".
|
|
111
|
+
7. **Approve Tool Access** - When the AI assistant requests permission to run the "get_figma_context" tool, approve it.
|
|
112
|
+
8. **Review Results** - The AI assistant will process your Figma selection and generate the appropriate code.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zapcode-figma-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "An MCP server that exposes Figma context via a plugin and saves assets, from Zapcode.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -20,9 +20,19 @@
|
|
|
20
20
|
],
|
|
21
21
|
"author": "Zapcode",
|
|
22
22
|
"license": "MIT",
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/Zapcode-FTC/Zapcode-Figma-MCP.git"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://zapcode.pages.dev/",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/Zapcode-FTC/Zapcode-Figma-MCP/issues"
|
|
30
|
+
},
|
|
31
|
+
"icon": "assets/icon.png",
|
|
23
32
|
"files": [
|
|
24
33
|
"build/",
|
|
25
|
-
"README.md"
|
|
34
|
+
"README.md",
|
|
35
|
+
"assets/"
|
|
26
36
|
],
|
|
27
37
|
"dependencies": {
|
|
28
38
|
"@modelcontextprotocol/sdk": "^1.9.0",
|