Documentation Index
Fetch the complete documentation index at: https://mintlify.com/grab/cursor-talk-to-figma-mcp/llms.txt
Use this file to discover all available pages before exploring further.
Starting Your Workflow
When working with Figma designs through the MCP server, following these practices ensures efficient and error-free operations.Initial Setup
Always begin by establishing context before making any modifications:- Join a channel using
join_channelbefore any other operations - Get document overview with
get_document_infoto understand the structure - Check current selection using
get_selectionorread_my_designbefore modifications
Document Structure and Hierarchy
Planning Layout Hierarchy
Before creating elements, plan your layout structure:- Start with main container frames for each screen or section
- Create parent frames first, then add child elements
- Use
parentIdparameter to maintain proper hierarchy
Naming Conventions
Consistent naming improves collaboration and code maintenance:- Use descriptive, semantic names (e.g., “Login Screen”, “Logo Container”, “Email Input”)
- Follow a consistent pattern across your design system
- Group related elements with meaningful names
Descriptive names make it easier to identify nodes when using tools like
scan_text_nodes or scan_nodes_by_types.Element Creation
Choosing the Right Tool
Select appropriate creation tools based on your needs:create_frame- For containers, auto-layout groups, and input field backgroundscreate_rectangle- For basic shapes and visual elementscreate_text- For labels, button text, and content
Common Design Patterns
Form/Login Screen Structure
Input Fields Pattern
- Create a container frame for each input field
- Include a label text above or inside the input
- Group related inputs together (e.g., username/password)
Styling Best Practices
Color Management
Visual Hierarchy
Maintain clear visual hierarchy through:- Position: Arrange elements in logical reading order (top to bottom)
- Spacing: Use consistent spacing between elements
- Typography: Apply appropriate font sizes for different text types
- Larger for headings/welcome text
- Medium for input labels
- Standard for button text
- Smaller for helper text/links
Verification and Error Handling
Verify Changes
After creating or modifying elements:Error Handling
All MCP commands can throw exceptions. Always implement appropriate error handling in your workflows.
- Handle WebSocket disconnections gracefully
- Verify node existence before operations
- Use batch operations to minimize error points
Component Usage
Working with Components
- Use
get_local_componentsto discover available components - Create instances with
create_component_instancefor consistency - Leverage component instances instead of duplicating designs
Instance Overrides
When working with component instances:- Use
get_instance_overridesto extract customizations - Apply overrides with
set_instance_overridesfor batch updates - Preserve component relationships rather than breaking instances
Performance Optimization
Use Batch Operations
When working with multiple nodes, always prefer batch operations:set_multiple_text_contentsinstead of multipleset_text_contentcallsdelete_multiple_nodesinstead of individualdelete_nodecallsset_multiple_annotationsinstead of repeatedset_annotationcalls
Large Design Considerations
For designs with many elements:- Use chunking parameters in
scan_text_nodes - Monitor progress through WebSocket updates
- Process in logical groups to avoid timeouts (default 30s)
Auto Layout Best Practices
Setting Up Auto Layout
When creating frames with auto layout:- Set
layoutMode(HORIZONTAL, VERTICAL, or NONE) - Configure padding with
set_padding - Set alignment with
set_axis_align - Configure sizing with
set_layout_sizing - Set spacing with
set_item_spacing
When
primaryAxisAlignItems is set to SPACE_BETWEEN, the itemSpacing value is ignored as children are evenly distributed.Layout Modes
- HORIZONTAL - For rows, navigation bars, button groups
- VERTICAL - For columns, form fields, card stacks
- NONE - For free-form positioning
Selection and Focus
Managing Selection
- Use
set_focusto select and scroll to a specific node - Use
set_selectionsto select multiple nodes at once - Always verify selection before batch operations
Workflow Checklist
- Join channel before operations
- Get document info for context
- Check current selection
- Plan hierarchy before creating elements
- Use descriptive, consistent names
- Choose appropriate creation tools
- Verify changes with
get_node_info - Use batch operations when possible
- Implement error handling
- Leverage components for consistency