Data Protection
- MCP runs locally (localhost only)
- No external network access required
- Design data processed on your machine
- Consider company policies for AI tool usage
Ta treść nie jest jeszcze dostępna w Twoim języku.
Transform your design-to-code workflow by connecting design tools directly to your AI coding environment. This guide focuses on Figma’s MCP server, the most mature design tool integration available today.
Before MCP, developers relied on static screenshots or manual inspection of designs, leading to:
With MCP integration, your AI assistant gains direct access to:
Figma Desktop App (not web version)
Development Environment
Open Figma desktop application and ensure you’re logged in with Dev Mode access
Navigate to Figma menu → Preferences
Enable “Dev Mode MCP Server”
http://127.0.0.1:3845/sse
Open Settings → Tools & Integrations → MCP
Find Figma in the server list
Click “Add to Cursor”
http://127.0.0.1:3845/sse
Confirm installation
Create or edit ~/.cursor/mcp.json
:
{ "mcpServers": { "figma": { "url": "http://127.0.0.1:3845/sse" } }}
# Add Figma MCP serverclaude mcp add figma-dev http://127.0.0.1:3845/sse
# Verify connectionclaude mcp list
# Check available toolsclaude mcp get figma-dev
For team sharing, use project scope:
claude mcp add -s project figma-dev http://127.0.0.1:3845/sse
This creates .mcp.json
in your project root for version control.
The Figma MCP server provides these core tools:
Tool | Purpose | Example Usage |
---|---|---|
get_code | Generate code from selected design | ”Generate React component for this frame” |
get_variable_defs | Extract design tokens/variables | ”Get all color tokens from this design” |
get_code_connect_map | Map designs to code components | ”Show component mappings” |
get_image | Capture design screenshots | ”Show me a preview of this design” |
// Example prompt to AI with Figma frame selected:"Generate a React component for the current Figma selection using Tailwind CSS"
// AI will use get_code tool to fetch design data and generate:export const Button = ({ children, variant = 'primary', size = 'md' }) => { const baseStyles = 'inline-flex items-center justify-center rounded-md font-medium transition-colors' const variants = { primary: 'bg-blue-600 text-white hover:bg-blue-700', secondary: 'bg-gray-200 text-gray-900 hover:bg-gray-300' } const sizes = { sm: 'px-3 py-1.5 text-sm', md: 'px-4 py-2 text-base', lg: 'px-6 py-3 text-lg' }
return ( <button className={`${baseStyles} ${variants[variant]} ${sizes[size]}`}> {children} </button> )}
Customize output by specifying your stack:
// Vue 3 Composition API"Generate Vue 3 component with Composition API for this design"
// React Native"Create React Native component using styled-components"
// SwiftUI"Generate SwiftUI view for this iOS design"
// Plain HTML/CSS"Generate semantic HTML with CSS Grid for this layout"
Extract and apply design system tokens:
"Extract all design tokens from this file and create a theme configuration"
Example output:
// theme.js - Generated from Figma variablesexport const theme = { colors: { primary: { 50: '#eff6ff', 500: '#3b82f6', 900: '#1e3a8a' }, gray: { 50: '#f9fafb', 500: '#6b7280', 900: '#111827' } }, spacing: { xs: '0.5rem', // 8px sm: '1rem', // 16px md: '1.5rem', // 24px lg: '2rem', // 32px xl: '3rem' // 48px }, typography: { fontFamily: { sans: ['Inter', 'system-ui', 'sans-serif'], mono: ['JetBrains Mono', 'monospace'] }, fontSize: { xs: '0.75rem', sm: '0.875rem', base: '1rem', lg: '1.125rem', xl: '1.25rem' } }}
If your team uses Figma’s Code Connect:
"Show me the code mapping for this component""Update the Button component to match its Figma counterpart""Ensure this implementation uses our design system components"
"Analyze this component against our design system and fix any inconsistencies""Update all spacing to match Figma's auto-layout values""Apply the correct design tokens from our component library"
When to use: Actively working in Figma alongside your IDE
Benefits:
When to use: Working from tickets or documentation
Benefits:
Create powerful multi-tool workflows:
// Using Figma + GitHub MCP"Create a new branch, implement this Figma design as a React component,and open a PR with a screenshot comparison"
// Using Figma + Database MCP"Generate the UI component for this design and create matchingdatabase models based on the form fields"
// Using Figma + Browser MCP"Implement this component and test it in the browser to ensureit matches the Figma design"
For large or complex designs:
Break down into sections
"First, analyze this design and identify the main components""Generate the header section with navigation""Now implement the hero section with proper responsive behavior"
Use screenshots for context
"Get a screenshot of the entire page design""Focus on the card component in the center"
Iterate on specific details
"The spacing doesn't match - check the exact values from Figma""Update the hover states to match the design prototype"
Issue | Solution |
---|---|
”No tools available” or red indicator | Ensure Figma desktop is running with MCP enabled |
”Connection refused” errors | Restart Figma and re-enable MCP server |
Incorrect code generation | Be more specific about framework/styling preferences |
Missing design tokens | Ensure variables are properly defined in Figma |
Performance issues | Break large designs into smaller sections |
# Check server statusclaude mcp list
# View detailed logsclaude --mcp-debug
# Test specific toolecho "Test Figma connection" | claude
Data Protection
Access Control
Selective Querying
Batch Operations
"Generate all card variations at once""Extract the complete color palette in one request"
Context Management
Standardize Configuration
.mcp.json
Establish Workflows
Knowledge Sharing
While Figma leads in MCP integration, other tools are developing support:
Sketch
Community MCP servers available for basic export functionality. Limited compared to Figma but useful for teams using Sketch.
Adobe XD
No official MCP yet. Some community efforts exist for design token extraction via plugins.
Framer
Exploring MCP integration. Currently better suited for direct code export than MCP workflows.
Penpot
Open-source alternative with growing interest in MCP support. Watch for community developments.
The design tool MCP ecosystem is rapidly evolving: