home / mcp / figma to flutter mcp server
An MCP server that provides the coding agents Figma's design token to write Flutter code.
Configuration
View docs{
"mcpServers": {
"mhmzdev-figma-flutter-mcp": {
"url": "http://localhost:3333/mcp",
"headers": {
"FIGMA_API_KEY": "YOUR_API_KEY"
}
}
}
}You can run a dedicated MCP server that connects to Figma data and helps you generate Flutter UI guidance and assets. This server extracts design structure, styling, and content from Figma and provides guidance for building Flutter apps, including theme setup and widget organization, without emitting raw Flutter code. Itโs useful for rapid prototyping and maintaining design-to-code alignment across your Flutter project.
Set up MCP clients to connect to the Figma Flutter MCP server. You can run the server locally and access it over HTTP or use the stdio integration for real-time prompts from your development environment. The server assists you by extracting design data, suggesting Flutter widgets, and guiding screen structure, while exporting assets when available.
Prerequisites determine your setup. You need Node.js installed (version 16+ recommended), a Figma API access token, and your preferred MCP client (Cursor or another MCP-enabled IDE). Follow these concrete steps to get started locally.
# Clone the MCP repository for the Figma to Flutter flow
git clone <your-repo-url> figma-flutter-mcp
cd figma-flutter-mcp
# Install dependencies
npm install
# Create environment file with your Figma API key
echo "FIGMA_API_KEY=your-figma-api-key-here" > .env
# Start the HTTP server for local testing
npm run dev1) AI Coding Agent Assistance: Set up agent-specific rules in your IDE (for Cursor, Claude, Gemini, etc.) to tailor how the MCP output translates into Flutter guidance. This helps the agent respect your projectโs theming, typography, and structure.
2) Theme and Typography: Create dedicated frames or components in Figma that define your theme colors and typography. Use these as references so the MCP can consistently apply them in guidance.
3) Widget and Screen Guidance: If you have COMPONENTS in Figma, prompt the MCP to generate Flutter widget guidance and break complex UIs into smaller parts for readability. If you donโt have COMPONENTS, prompt the MCP to treat the frames as widgets.
4) Assets: When you have images in your designs, the MCP exports image assets automatically. SVG handling may require separate extraction steps if assets arenโt structured optimally in Figma.
Environment variables: The server uses a Figma API key for access. Keep this secret and load it into your environment as FIGMA_API_KEY.
Local testing: You can run the server over HTTP for quick experiments and connect your MCP client to http://localhost:3333/mcp.
Rate limits: Figma API calls may be rate-limited. Implement retries with backoff and reduce request frequency during heavy usage.
Design quality: Better design structure (auto layouts, consistent frame usage) yields more accurate AI guidance and clearer widget suggestions.
If you encounter errors about tool calls or API key setup, ensure you are using the latest MCP version and that your API key is correctly set in the environment or in the CLI flags.
Extracts layout, styling, dimensions, colors, and text content from Figma nodes for analysis.
Analyzes screen structure, sections, and navigation to guide Scaffold layout and app structure.
Exports image assets automatically and manages asset placement for the Flutter project.
Provides guidance for exporting and using SVG assets when possible, with caveats.
Generates widget-level guidance and prompts for breaking screens into reusable parts.