@iflow-mcp/artemsvit-figma-mcp-pro 3.49.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,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Custom Figma MCP Server
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,126 @@
1
+ [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/artemsvit-figma-mcp-pro-badge.png)](https://mseep.ai/app/artemsvit-figma-mcp-pro)
2
+
3
+ # Figma MCP PRO
4
+
5
+ [![smithery badge](https://smithery.ai/badge/@artemsvit/figma-mcp-pro)](https://smithery.ai/server/@artemsvit/figma-mcp-pro)
6
+
7
+ Professional Model Context Protocol (MCP) server for AI-optimized Figma design analysis. Clean 5-step workflow for comprehensive design-to-code conversion with smart comment processing and asset downloads.
8
+
9
+ ## 🚀 Key Features
10
+
11
+ - **5-Step Workflow**: Framework selection → Design data → Comments → Assets → Reference analysis
12
+ - **AI-Optimized**: Structured data specifically formatted for AI code generation
13
+ - **10 Framework Support**: React, Vue, Angular, Svelte, HTML/CSS/JS, SwiftUI, UIKit, Electron, Tauri, NW.js
14
+ - **Smart Comments**: Coordinate-based matching of designer comments to UI elements
15
+ - **Asset Downloads**: Batch download with original Figma export settings
16
+ - **CSS Generation**: Automatic CSS from Figma properties (padding, margins, borders, effects)
17
+
18
+ ## 📦 Installation
19
+
20
+ ### Installing via Smithery
21
+
22
+ To install figma-mcp-pro for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@artemsvit/figma-mcp-pro):
23
+
24
+ ```bash
25
+ npx -y @smithery/cli install @artemsvit/figma-mcp-pro --client claude
26
+ ```
27
+
28
+ ### Manual Installation
29
+ ```bash
30
+ npm install -g figma-mcp-pro
31
+ ```
32
+
33
+ ## ⚙️ Quick Setup
34
+
35
+ ### 1. Get Your Figma API Key
36
+ Get your API token from [Figma Account Settings](https://www.figma.com/settings) → Personal access tokens
37
+
38
+ ### 2. Copy & Paste MCP Configuration
39
+ **📋 Use the copy button on the code block below**, then replace `your-api-key-here` with your actual API key:
40
+
41
+ ```json
42
+ {
43
+ "mcpServers": {
44
+ "Figma MCP PRO": {
45
+ "command": "npx",
46
+ "args": ["figma-mcp-pro@latest", "--figma-api-key", "your-api-key-here"],
47
+ "env": {
48
+ "DEBUG": "true"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ ```
54
+
55
+ **Configuration File Locations:**
56
+ - **Claude Desktop**: `claude_desktop_config.json`
57
+ - **Claude Code (VS Code)**: VS Code MCP settings
58
+ - **Cursor, Windsurf, TRAE**: Application MCP configuration settings
59
+
60
+ ## 📝 Tool Reference
61
+
62
+ ### Core Tools
63
+
64
+ #### `show_frameworks`
65
+ Shows available frameworks. Call first to choose target framework.
66
+
67
+ #### `get_figma_data`
68
+ Extracts AI-optimized design data with framework-specific processing.
69
+ - **Input**: Figma URL + framework
70
+ - **Output**: Design structure, CSS properties, layout data
71
+
72
+ #### `process_design_comments`
73
+ Matches designer comments to design elements with AI implementation prompts.
74
+ - **Input**: Figma URL + framework
75
+ - **Output**: Comment-to-element mapping with actionable instructions
76
+
77
+ #### `download_design_assets`
78
+ Downloads export-ready assets with original Figma settings + reference image.
79
+ - **Input**: Figma URL + local path
80
+ - **Output**: Asset files + reference.png for visual context
81
+
82
+ #### `check_reference`
83
+ Analyzes reference.png for design understanding and development guidance.
84
+ - **Input**: Assets folder path + framework
85
+ - **Output**: Design analysis and framework-specific development recommendations
86
+
87
+ ## 🎯 What You Get
88
+
89
+ ### Design Data
90
+ - **Layout**: Padding, margins, gaps, auto-layout properties
91
+ - **Styling**: Colors, borders, shadows, effects, typography
92
+ - **Structure**: Component hierarchy, semantic roles
93
+ - **Responsive**: Flexible sizing, constraints, breakpoints
94
+
95
+ ### Smart Comments
96
+ - **Coordinate Matching**: Comments linked to specific design elements
97
+ - **AI Instructions**: "Add hover animation to Button component"
98
+ - **Implementation Context**: Element details + positioning
99
+
100
+ ### Asset Downloads
101
+ - **Export Settings**: Respects Figma's configured export settings
102
+ - **Original Names**: Uses actual node names as filenames
103
+ - **Visual Reference**: reference.png shows complete design context
104
+ - **Multiple Formats**: SVG, PNG, JPG, PDF support
105
+
106
+ ## 🌟 Framework Optimizations
107
+
108
+ - **React**: TypeScript, Hooks, Custom Hooks, Performance optimization
109
+ - **Vue**: Composition API, TypeScript, Pinia stores, Composables
110
+ - **Angular**: Standalone components, Signals, Modern templates, TypeScript
111
+ - **Svelte**: Svelte 5 runes, TypeScript, SvelteKit, Stores
112
+ - **HTML/CSS/JS**: Design tokens, Modern CSS, Accessibility-first
113
+ - **SwiftUI**: State management, MVVM, Accessibility, Modern patterns
114
+ - **UIKit**: Modern concurrency, SwiftUI interop, Auto Layout
115
+ - **Electron**: Security hardening, IPC patterns, Native integration
116
+ - **Tauri**: Rust commands, Event system, Security, WebView
117
+ - **NW.js**: Unified context, Node.js integration, Chromium APIs
118
+
119
+ ## 📄 License
120
+
121
+ MIT License
122
+
123
+ ## 🆘 Support
124
+
125
+ - **Issues**: [GitHub Issues](https://github.com/artemsvit/Figma-MCP-Pro/issues)
126
+ - **NPM**: [figma-mcp-pro](https://www.npmjs.com/package/figma-mcp-pro)
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { fileURLToPath, pathToFileURL } from 'url';
4
+ import { dirname, join } from 'path';
5
+ import { platform } from 'os';
6
+
7
+ /**
8
+ * Universal cross-platform ES module importer
9
+ * Fixes Windows ESM URL scheme issues while maintaining compatibility
10
+ * with macOS, Linux, and Windows
11
+ */
12
+ function universalImport(modulePath) {
13
+ // On Windows, absolute paths must be converted to file:// URLs for ES modules
14
+ // On macOS and Linux, this conversion is also safe and recommended
15
+ try {
16
+ const fileUrl = pathToFileURL(modulePath).href;
17
+ return import(fileUrl);
18
+ } catch (error) {
19
+ // Fallback: try direct import (for edge cases)
20
+ console.error(`[Universal Import] Primary import failed, trying fallback: ${error.message}`);
21
+ return import(modulePath);
22
+ }
23
+ }
24
+
25
+ // Universal __dirname equivalent for ES modules
26
+ const __filename = fileURLToPath(import.meta.url);
27
+ const __dirname = dirname(__filename);
28
+
29
+ // Cross-platform entry point resolution
30
+ const entryPoint = join(__dirname, '../dist/index.js');
31
+
32
+ console.error(`[Figma MCP Pro] Starting on ${platform()} platform`);
33
+ console.error(`[Figma MCP Pro] Entry point: ${entryPoint}`);
34
+
35
+ // Universal ES module import that works on all platforms
36
+ universalImport(entryPoint)
37
+ .catch(error => {
38
+ console.error(`[Figma MCP Pro] Failed to start:`, error);
39
+ console.error(`[Figma MCP Pro] Platform: ${platform()}`);
40
+ console.error(`[Figma MCP Pro] Node version: ${process.version}`);
41
+ console.error(`[Figma MCP Pro] Entry point: ${entryPoint}`);
42
+ process.exit(1);
43
+ });