zapcode-figma-mcp 1.1.0 → 1.1.2

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.
Files changed (2) hide show
  1. package/README.md +152 -54
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,112 +1,210 @@
1
- Generated markdown
2
-
3
1
  # Zapcode Figma MCP Server
4
2
 
5
3
  [![npm version](https://img.shields.io/npm/v/zapcode-figma-mcp.svg)](https://www.npmjs.com/package/zapcode-figma-mcp)
6
- <!-- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -->
7
4
 
8
- This package provides a Model Context Protocol (MCP) server that acts as a bridge between your **Figma designs** and any **MCP-compatible AI client** (like Claude for Desktop, Open WebUI, etc.).
9
5
 
10
- When invoked by an AI model, this server connects to the Zapcode Figma plugin to retrieve real-time context from your selected Figma frame, including its HTML/CSS structure, a generated image, and any exportable SVG assets.
6
+ Connect your Figma designs directly to AI tools like Claude Desktop, Cursor, and Cline. Get real-time HTML, CSS, images, and assets from selected Figma frames through the Model Context Protocol.
11
7
 
12
- ## Features
8
+ ## Features
13
9
 
14
- - **Real-time Context**: Fetches live data directly from your currently selected frame in Figma.
15
- - **Rich Information**: Provides the LLM with rich context of the frame.
16
- - **Automatic Asset Handling**: Automatically extracts any SVG assets from the selection, saves them to your local workspace, and informs the LLM of their location.
17
- - **Easy Integration**: Runs as a simple command-line tool and can be easily configured with any MCP client.
10
+ - **Real-time Design Context** - Fetches live data from your currently selected Figma frame
11
+ - **Complete Asset Export** - Supports SVG, PNG, JPG, PDF, and all Figma asset types
12
+ - **Configurable Storage** - Save assets to custom paths or default workspace location
13
+ - **Auto-organized Assets** - Assets grouped by type (svg/, png/, jpg/, etc.)
14
+ - **Zero Configuration** - Works out of the box with npx
15
+ - **Rich Context** - Provides HTML structure, CSS styles, images, and design specifications
18
16
 
19
- ## 📋 Prerequisites
17
+ ## Prerequisites
20
18
 
21
- 1. **Node.js**: You must have Node.js (v16 or higher) installed to use `npx`. You can download it from [nodejs.org](https://nodejs.org/).
22
- 2. [**Zapcode Figma Plugin**](https://www.figma.com/community/plugin/1454956820198178710/zapcode): You must have the Zapcode plugin installed and running in your Figma desktop application.
19
+ 1. **Node.js 16+** - [Download here](https://nodejs.org/)
20
+ 2. **Figma Desktop App** - Required for plugin integration
21
+ 3. **[Zapcode Figma Plugin](https://www.figma.com/community/plugin/1454956820198178710/zapcode)** - Install from Figma Community
23
22
 
24
- ## 🚀 Installation & Usage
23
+ ## Installation
25
24
 
26
- You can run this server directly from the npm registry without a manual installation using `npx`.
25
+ ### Claude Desktop
27
26
 
28
- ## Integration with an MCP Client
27
+ Add to your `claude_desktop_config.json`:
29
28
 
30
- This is the most common use case. You configure your client to launch the server automatically. Below are examples for common clients.
29
+ **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
30
+ **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
31
31
 
32
- ### Generic MCP Client Configuration
32
+ ```json
33
+ {
34
+ "mcpServers": {
35
+ "zapcode-figma": {
36
+ "command": "npx",
37
+ "args": ["-y", "zapcode-figma-mcp"]
38
+ }
39
+ }
40
+ }
41
+ ```
42
+
43
+ Restart Claude Desktop after making changes.
33
44
 
34
- For clients that use a similar JSON configuration, the structure is the same. This server does not require any environment variables.
45
+ ### Cursor
46
+
47
+ Add to your MCP settings configuration:
35
48
 
36
49
  ```json
37
50
  {
38
51
  "mcpServers": {
39
- "zapcode-figma-mcp": {
52
+ "zapcode-figma": {
40
53
  "command": "npx",
41
- "args": ["zapcode-figma-mcp"]
54
+ "args": ["-y", "zapcode-figma-mcp"]
42
55
  }
43
56
  }
44
57
  }
45
58
  ```
46
59
 
47
- ### GitHub Copilot
60
+ ### Cline (VS Code Extension)
61
+
62
+ Add to Cline's MCP settings:
48
63
 
49
64
  ```json
50
65
  {
51
- "servers": {
52
- "Zapcode stdio mcp": {
53
- "type": "stdio",
66
+ "mcpServers": {
67
+ "zapcode-figma": {
54
68
  "command": "npx",
55
- "args": ["zapcode-figma-mcp"]
69
+ "args": ["-y", "zapcode-figma-mcp"]
56
70
  }
57
- },
58
- "inputs": []
71
+ }
59
72
  }
60
73
  ```
61
74
 
62
- ### Claude for Desktop
75
+ ### Windsurf
63
76
 
64
- Open your claude_desktop_config.json file and add the following entry to mcpServers.
65
-
66
- macOS/Linux: ~/Library/Application Support/Claude/claude_desktop_config.json
67
- Windows: %APPDATA%\Claude\claude_desktop_config.json
77
+ Add to your Windsurf MCP configuration:
68
78
 
69
79
  ```json
70
80
  {
71
81
  "mcpServers": {
72
- "zapcode-figma-mcp": {
82
+ "zapcode-figma": {
73
83
  "command": "npx",
74
- "args": ["zapcode-figma-mcp"]
84
+ "args": ["-y", "zapcode-figma-mcp"]
75
85
  }
76
86
  }
77
87
  }
78
88
  ```
79
89
 
80
- **Note:** Restart Claude for Desktop for the changes to take effect.
90
+ ### Zed Editor
81
91
 
82
- The server will start and wait for connections from both the Figma plugin and an MCP client.
92
+ Add to your Zed settings (MCP support currently in preview):
83
93
 
84
- ## 🛠️ Tool Details
94
+ ```json
95
+ {
96
+ "context_servers": {
97
+ "zapcode-figma": {
98
+ "command": "npx",
99
+ "args": ["-y", "zapcode-figma-mcp"]
100
+ }
101
+ }
102
+ }
103
+ ```
85
104
 
86
- This server exposes a single, powerful tool to the LLM.
105
+ ### Continue (VS Code/JetBrains)
87
106
 
88
- get_figma_context
107
+ Add to Continue's configuration:
108
+
109
+ ```json
110
+ {
111
+ "mcpServers": {
112
+ "zapcode-figma": {
113
+ "command": "npx",
114
+ "args": ["-y", "zapcode-figma-mcp"]
115
+ }
116
+ }
117
+ }
118
+ ```
89
119
 
90
- - **Description**: Retrieves the selected Figma frame context. Saves any provided SVG assets to the local 'assets/svg' directory.
91
- - **Input Schema**: {} (No input arguments are required).
92
- - **Output**: A combination of prompts and Figma context
120
+ ### GitHub Copilot
93
121
 
94
- ## ⚠️ Troubleshooting
122
+ Add to your GitHub Copilot MCP configuration:
95
123
 
96
- ```error
97
- Error: Figma plugin is not connected.
124
+ ```json
125
+ {
126
+ "servers": {
127
+ "zapcode-figma": {
128
+ "type": "stdio",
129
+ "command": "npx",
130
+ "args": ["-y", "zapcode-figma-mcp"]
131
+ }
132
+ }
133
+ }
98
134
  ```
99
135
 
100
- This is the most common error. It means the MCP server is running, but it cannot find the Zapcode Figma plugin to talk to.
101
- Solution: Make sure you have opened Figma and are running the Zapcode plugin on the design file you wish to query.
136
+ ## How It Works
137
+
138
+ 1. **Install Plugin** - Add Zapcode plugin to Figma Desktop
139
+ 2. **Run Plugin** - Launch Zapcode plugin from Figma
140
+ 3. **Select Frame** - Choose any frame in your Figma design
141
+ 4. **Ask AI** - Ask AI to bring you the figma context
142
+ 5. **Get Context** - Receive complete design data and assets
143
+
102
144
 
103
- ```error
104
- Port Conflict / EADDRINUSE Error
145
+ ## Troubleshooting
146
+
147
+ ### "Figma plugin is not connected"
148
+
149
+ **Cause**: MCP server cannot reach the Zapcode Figma plugin.
150
+
151
+ **Solution**:
152
+ 1. Open Figma Desktop App
153
+ 2. Open your design file
154
+ 3. Run Zapcode plugin (Plugins → Zapcode)
155
+ 4. Ensure plugin window stays open
156
+ 5. Retry connecting using toggle
157
+ 5. Try the MCP tool again
158
+
159
+ ### Assets Not Saving
160
+
161
+ **Cause**: Permission issues or invalid path.
162
+
163
+ **Solution**:
164
+ 1. Ensure the assets path exists or parent directory is writable
165
+ 2. Use absolute paths for clarity
166
+ 3. Check file permissions on the target directory
167
+
168
+ ## Asset Organization
169
+
170
+ Assets are automatically organized by type:
171
+
172
+ ```
173
+ assets/
174
+ ├── svg/
175
+ │ ├── icon_component.svg
176
+ │ └── logo.svg
177
+ ├── png/
178
+ │ ├── screenshot_1.png
179
+ │ └── image_export.png
180
+ └── jpg/
181
+ └── photo.jpg
105
182
  ```
106
183
 
107
- If you see an error that the port is already in use, it means another application is using port 3001 or 32896.
108
- Solution: You need to stop the other application.
184
+ ## Supported Clients
185
+
186
+ This server works with any MCP-compatible client, including:
187
+
188
+ - [Claude Desktop](https://modelcontextprotocol.io/clients#claude-desktop) - Anthropic's desktop application
189
+ - [Cursor](https://www.cursor.com/) - AI-first code editor
190
+ - [Cline](https://github.com/cline/cline) - Autonomous coding agent for VS Code
191
+ - [Windsurf](https://codeium.com/windsurf) - AI-powered IDE with MCP Plugin Store
192
+ - [Zed](https://zed.dev/) - High-performance code editor (MCP in preview)
193
+ - [Continue](https://continue.dev/) - Open-source IDE extension
194
+ - [GitHub Copilot](https://github.com/features/copilot) - With MCP support in VS Code
195
+
196
+
197
+ ## Links
198
+
199
+ - [NPM Package](https://www.npmjs.com/package/zapcode-figma-mcp)
200
+ - [Zapcode Figma Plugin](https://www.figma.com/community/plugin/1454956820198178710/zapcode)
201
+ - [Model Context Protocol](https://modelcontextprotocol.io/)
202
+ - [MCP Servers Collection](https://github.com/modelcontextprotocol/servers)
109
203
 
110
- ## 📄 License
204
+ ---
111
205
 
112
- This project is licensed under the MIT License. See the LICENSE.md file for details.
206
+ **Sources:**
207
+ - [Model Context Protocol Official Servers](https://github.com/modelcontextprotocol/servers)
208
+ - [GitHub MCP Server](https://github.com/github/github-mcp-server)
209
+ - [MCP Clients Directory](https://github.com/punkpeye/awesome-mcp-clients)
210
+ - [Official MCP Client Examples](https://modelcontextprotocol.io/clients)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zapcode-figma-mcp",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
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": {