This guide covers the recommended workflow for converting Moda designs to production code using the MCP server and an AI coding agent.Documentation Index
Fetch the complete documentation index at: https://docs.moda.app/llms.txt
Use this file to discover all available pages before exploring further.
The basic workflow
Writing effective prompts
The quality of generated code depends heavily on your prompt. Be specific about:Framework and language
Component structure
Responsive behavior
Multi-page designs
For slide decks or multi-page canvases, the agent can work through pages sequentially:list_moda_canvas_pages to discover the pages, then fetch each one with get_moda_canvas.
Generating theme files
If you already have a component library and just need design tokens:get_moda_canvas_tokens to extract colors, fonts, and spacing.
Tips for better results
Name your layers
The MCP server’s transformer uses layer names to determine semantic meaning. A layer namedcta-button produces a Button tag; an unnamed rectangle might be interpreted as a Box.
See Naming Layers for the full keyword reference.
Use design variables
Colors and values defined as Moda variables appear in the design tokens output with their names, making it easier for the agent to create meaningful CSS custom properties or theme tokens.Keep designs clean
- Remove hidden layers you don’t need — they won’t appear in the output, but keeping your canvas tidy helps
- Use Moda’s auto-layout (flex) features for consistent spacing — the transformer detects flex layouts and outputs them as
display: flexwithgap - Group related elements — groups become semantic containers in the output
Use exports for complex layouts
When the pseudo-HTML alone doesn’t capture the visual intent, the agent can export a visual reference withexport_canvas (use png format for design-to-code). This is especially useful for:
- Overlapping elements
- Complex gradients
- Precise visual spacing that the structured data doesn’t capture