Figma to Flutter MCP Server is a tool that helps you leverage Figma design data in your AI coding assistant to implement Flutter UI more efficiently. It provides a communication bridge between Figma's rich design data and your coding environment, making it easier to translate designs into Flutter code.
You'll need a Figma access token to use this server:
To configure the MCP server in Cursor:
{
"mcpServers": {
"Figma Flutter MCP": {
"command": "npx",
"args": ["-y", "figma-flutter-mcp", "--figma-api-key=YOUR-API-KEY", "--stdio"]
}
}
}
{
"mcpServers": {
"Figma Flutter MCP": {
"command": "cmd",
"args": ["/c", "npx", "-y", "figma-flutter-mcp", "--figma-api-key=YOUR-API-KEY", "--stdio"]
}
}
}
Note: Make sure to replace YOUR-API-KEY with your actual Figma API key.
For local development and testing:
# Clone the repository
git clone https://github.com/mhmzdev/figma-flutter-mcp
cd figma-flutter-mcp
npm install
# Create .env file with your Figma API key
echo "FIGMA_API_KEY=your-figma-api-key-here" > .env
# Start HTTP server for local testing
npm run dev
Then configure your MCP client with:
{
"mcpServers": {
"local-figma-flutter": {
"url": "http://localhost:3333/mcp"
}
}
}
The Figma Flutter MCP can help you with several design-to-code tasks:
Place theme colors and typography samples in dedicated Figma frames, then use:
Setup flutter theme from <figma_link> including Colors and Typography.
Where <figma_link> is the URL of your frame (select the frame and press CMD/Ctrl + L to copy the link).
For best results, use Figma Components:
Create this widget in flutter from figma COMPONENT link: <figma_link>, use named constructors for variants and break the files in smaller parts for code readability.
If you don't have components, you can use regular frames and instruct the AI to treat them as widgets.
For complete screens:
Design this intro screen from the figma link <figma_link>, ensure the code is readable by having smaller files.
This will export image assets to the assets/ directory and update pubspec.yaml accordingly.
For individual assets:
Export this image asset from figma link: <figma_link>
For SVG assets:
Export this as an SVG asset from Figma link: <figma_link>
If SVG exports aren't working properly when generating screens:
Create custom instruction files for your AI coding agents:
.cursor/rules/fluttering.mdcCLAUDE.mdGEMINI.mdThe server extracts component data and screen structure but doesn't generate complete Flutter code files directly - it provides guidance that your AI coding assistant uses to create the code.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "Figma-Flutter-MCP" '{"command":"npx","args":["-y","figma-flutter-mcp","--figma-api-key=YOUR-API-KEY","--stdio"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"Figma Flutter MCP": {
"command": "npx",
"args": [
"-y",
"figma-flutter-mcp",
"--figma-api-key=YOUR-API-KEY",
"--stdio"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"Figma Flutter MCP": {
"command": "npx",
"args": [
"-y",
"figma-flutter-mcp",
"--figma-api-key=YOUR-API-KEY",
"--stdio"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect