Skip to content
Back to search

figma-flutter-mcp

An MCP server that provides the coding agents Figma's design token to write Flutter code.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/mhmzdev--figma-flutter-mcp/badge.svg)](/listings/mhmzdev--figma-flutter-mcp)

HTML

<a href="/listings/mhmzdev--figma-flutter-mcp"><img src="/api/listings/mhmzdev--figma-flutter-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Prerequisites

- Node.js 18+ - Figma API Key (Access Token) - Cursor AI IDE with MCP support - Flutter SDK

For quick local testing, you can run the server via HTTP instead of stdio:

# Clone and setup
git clone <your-repo-url> 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 add this to your MCP client configuration:

{
  "mcpServers": {
    "local-figma-flutter": {
      "url": "http://localhost:3333/mcp"
    }
  }
}

See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed instructions.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 257 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align="center">
  2. <img src="docs/images/figma-flutter-mcp.png" alt="Theme Setup Example" style="max-width: 100%; height: auto;">
  3. <br>
  4. <h1>Figma to Flutter MCP Server</h1>
  5. <p>
  6. 🌐 Available in:
  7. <a href="README.ko.md">한국어 (Korean)</a> |
  8. <a href="README.ja.md">日本語 (Japanese)</a> |
  9. <a href="README.zh-cn.md">简体中文 (Simplified Chinese)</a> |
  10. <a href="README.zh-tw.md">繁體中文 (Traditional Chinese)</a>
  11. </p>
  12. <h3>Utilize Figma's rich data in your coding agent.<br/>Implement designs in Flutter way!</h3>
  13. <a href="https://npmcharts.com/compare/figma-flutter-mcp?interval=30">
  14. <img alt="weekly downloads" src="https://img.shields.io/npm/dm/figma-flutter-mcp.svg">
  15. </a>
  16. <a href="https://github.com/mhmzdev/figma-flutter-mcp/blob/main/LICENSE">
  17. <img alt="MIT License" src="https://img.shields.io/github/license/mhmzdev/figma-flutter-mcp" />
  18. </a>
  19. <a href="https://twitter.com/mhmzdev">
  20. <img alt="Twitter" src="https://img.shields.io/twitter/url?url=https%3A%2F%2Fx.com%2Fmhmzdev&label=%40mhmzdev" />
  21. </a>
  22. </div>
  23. <br>
  24. Use [Cursor](https://cursor.sh) or other AI-powered tools to access Figma's rich files, data, components and much more using [MCP server](https://modelcontextprotocol.io/).
  25. ## 📋 Table of Contents
  26. - [🦋 Observable Flutter #70](#-observable-flutter-70)
  27. - [🎥 Short Video Demo](#-short-video-demo)
  28. - [📝 Getting Started](#-getting-started)
  29. - [📚 How it works](#-how-it-works--details-here)
  30. - [🛠️ Usage](#-usage)
  31. - [🔑 Figma API Key](#-figma-api-key)
  32. - [🏹 MCP in Cursor](#-mcp-in-cursor)
  33. - [🚀 Quick Start for Local Testing](#-quick-start-for-local-testing)
  34. - [🧱 Basic Workflow](#-basic-workflow)
  35. - [🤖 AI Coding Agent Assistance](#-ai-coding-agent-assistance)
  36. - [⚠️ If SVG assets don’t work with screen generation](#-if-svg-assets-dont-work-with-screen-generation)
  37. - [⚠️ Disclaimers](#-disclaimers)
  38. - [🙌🏼 Acknowledgments](#-acknowledgments)
  39. - [🧱 Other framworks](#-other-framworks)
  40. - [🔑 License](#-license)
  41. - [🙋‍♂️ Author](#-author)
  42. - [Muhammad Hamza](#muhammad-hamza)
  43. ## 🦋 Observable Flutter #70
  44. Featured on Observable Flutter with enhanced explanation and demo:
  45. <a href="https://www.youtube.com/live/d7qrvytOxSA?si=ESY8hPJpQm_OY4Ye">
  46. <img src="https://i.ytimg.com/vi/d7qrvytOxSA/hq720.jpg?sqp=-oaymwEnCNAFEJQDSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&rs=AOn4CLAtjlrlbNDcV_MQ-_MHJN3KAgwpKw" alt="Observable Flutter Figma to Flutter MCP" style="max-width: 100%; height: 300px;">
  47. </a>
  48. ## 🎥 Short Video Demo
  49. Showcased almost all the features of Figma Flutter MCP with real figma design.
  50. - English: https://youtu.be/lJlfOfpl2sI
  51. - Urdu/Hindi: https://youtu.be/mepPWpIZ61M
  52. ## 📝 [Getting Started](docs/getting-started.md)
  53. You may explore the detailed [getting started](docs/getting-started.md) docs or the [demo video](https://youtu.be/lJlfOfpl2sI) as quick-start. As its a First Release hence there's a lot of room for improvements so you can checkout the [issues](https://github.com/mhmzdev/figma-flutter-mcp/issues) to see what else there's to work or to improve.
  54. ## 📚 How it works | [Details Here](docs/figma-flutter-mcp.md)
  55. 1. [Components/Widgets](src/extractors/components/)
  56. - ✅ Extract Figma node data: Layout, styling, dimensions, colors, text content, etc.
  57. - ✅ Analyze structure: Child elements, nested components, visual importance
  58. - ✅ Provide guidance: Suggest Flutter widgets and implementation patterns
  59. - ❌ NOT generating actual Flutter code files
  60. 2. [Screens](src/extractors/screens/)
  61. - ✅ Extract screen metadata: Device type, orientation, dimensions
  62. - ✅ Identify sections: Header, footer, navigation, content areas
  63. - ✅ Analyze navigation: Tab bars, app bars, drawers, navigation elements
  64. - ✅ Provide Scaffold guidance: Suggest Flutter screen structure
  65. - ❌ NOT generating actual Flutter screen
  66. Since its just helping AI write Flutter code so it means the better your prompt will be the better results you'll get.
  67. ## 🛠️ Usage
  68. Following steps shows a minimal usage and setup instructions:
  69. ### 🔑 Figma API Key
  70. You will need to create a Figma access token to use this server. Instructions on how to create a Figma API access token can be found [here](https://help.figma.com/hc/en-us/articles/8085703771159-Manage-personal-access-tokens).
  71. ### 🏹 MCP in Cursor
  72. Once you've the FIGMA API KEY, you can setup the MCP in cursor as follows:
  73. 1. Press CMD + Shift + P (Ctrl on Windows)
  74. 2. Type "Open MCP Settings"
  75. 3. Click on "Add new MCP"
  76. 4. Paste the below json object
  77. #### MacOS/Linux
  78. ```
  79. {
  80. "mcpServers": {
  81. "Figma Flutter MCP": {
  82. "command": "npx",
  83. "args": ["-y", "figma-flutter-mcp", "--figma-api-key=YOUR-API-KEY", "--stdio"]
  84. }
  85. }
  86. }
  87. ```
  88. #### Windows
  89. ```
  90. {
  91. "mcpServers": {
  92. "Figma Flutter MCP": {
  93. "command": "cmd",
  94. "args": ["/c", "npx", "-y", "figma-flutter-mcp", "--figma-api-key=YOUR-API-KEY", "--stdio"]
  95. }
  96. }
  97. }
  98. ```
  99. > NOTE: If you've installed this MCP as `npm` package make sure to keep it updated to latest version. Sometimes, it caches the old version and keep showing you error like "Not being able to use tool call" or "Figma API key setup is not working" etc.
  100. ### 🚀 Quick Start for Local Testing
  101. #### Prerequisites
  102. - Node.js 18+
  103. - Figma API Key (Access Token)
  104. - Cursor AI IDE with MCP support
  105. - Flutter SDK
  106. For quick local testing, you can run the server via HTTP instead of stdio:
  107. ```bash
  108. # Clone and setup
  109. git clone <your-repo-url> figma-flutter-mcp
  110. cd figma-flutter-mcp
  111. npm install
  112. # Create .env file with your Figma API key
  113. echo "FIGMA_API_KEY=your-figma-api-key-here" > .env
  114. # Start HTTP server for local testing
  115. npm run dev
  116. ```
  117. Then add this to your MCP client configuration:
  118. ```json
  119. {
  120. "mcpServers": {
  121. "local-figma-flutter": {
  122. "url": "http://localhost:3333/mcp"
  123. }
  124. }
  125. }
  126. ```
  127. See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed instructions.
  128. ## 🧱 Basic Workflow
  129. ### 🤖 AI Coding Agent Assistance
  130. For better results you can setup some instructions in following files as per your AI Coding Agent:
  131. - Cursor: `.cursor/rules/fluttering.mdc`
  132. - Claude: `CLAUDE.md`
  133. - Gemini CLI: `GEMINI.md`
  134. This way your AI agent will use the MCP's output and ensure the flutter code is as per your project requirements and structure. You can checkout an example of [cursor rules](docs/cursor_rules_example.md) that I used for testing this out.
  135. 1. **Setup Theme & Typography**: The most efficient way, put two frames in Figma with Theme colors and Typography samples on it. For instance:
  136. ![Theme Setup Example](docs/images/theme-frame.png)
  137. ![Typography Setup Example](docs/images/text-style-frame.png)
  138. - Figma Desktop: Select the frame and press CMD + L or Ctrl + L
  139. - Figma Web: Select the frame and copy the URL
  140. > 💡 HINT: The valid URL will contain a FILE ID and NODE ID params
  141. ```
  142. "Setup flutter theme from <figma_link> including Colors and Typography.
  143. ```
  144. 2. **Widget Generation**: The most efficient way, use COMPONENTS in figma. For example:
  145. ![Button](docs/images/button.png)
  146. This one has 2 variants with enabled and disabled states.
  147. ```
  148. "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."
  149. ```
  150. If you **do not** have COMPONENTS in figma, you can use FRAME just prompt the AI that you want this to be a widget and it will handle the rest.
  151. 3. **Full Screen Generation**: If there are any IMAGE ASSETS (.png, .jpeg, .jpg etc.) available, it will export them and put them in `assets/` along with `pubspec.yaml`
  152. <img src="docs/images/screen.png" alt="Screen" height="500" width="auto">
  153. ```
  154. "Design this intro screen from the figma link <figma_link>, ensure the code is readable by having smaller files."
  155. ```
  156. 4. **Assets Export**:
  157. - Image Assets: Will work automatically when generating screens
  158. ```
  159. "Export this image asset from figma link: <figma_link>
  160. ```
  161. - SVG Assets: Will NOT work automatically if they are scrambled or are ungrouped, explained below.
  162. ```
  163. "Export this as an SVG asset from Figma link: <figma_link>"
  164. ```
  165. #### ⚠️ If SVG assets don’t work with screen generation
  166. * In Figma vectors include icons and pen-tool shapes, so bulk exports may grab unintended nodes;
  167. * Recommend exporting SVGs **separately** i.e. to take them out an an independent FRAME or GROUP
  168. * Here's how the separation of SVGs looks like:
  169. <img src="docs/images/svgs_clean.gif" alt="Screen" height="500" width="auto">
  170. <br>
  171. * Here's an example of identifying a GOOD vs BAD svg while exporting them:
  172. <br>
  173. <img src="docs/images/svg.gif" alt="Screen" height="500" width="auto">
  174. ## ⚠️ Disclaimers
  175. - **Use Case**: At this stage, its highly recommend to NOT use it to develop scalable apps rather try and play it with MVPs, smaller and explanatory tasks.
  176. - **Figma Design**: Since we're using Figma's API to fetch the node and its details, so the better design you have the more better it will interpret for the AI to consume i.e. auto layouts, frame usage over group usage, consistently aligned across the board.
  177. - **Rate limiting**: Heavy usage may trigger Figma rate limits (e.g., HTTP 429). The server includes retry with backoff, but it does not bypass Figma limits. If you encounter rate limits, wait a few minutes and reduce the request volume.
  178. ## 🙌🏼 Acknowledgments
  179. I came across [Figma Context MCP](https://github.com/GLips/Figma-Context-MCP) by [Graham Lipsman](https://x.com/glipsman) that sparks this motivation for me to develop Figma to Flutter explicitly having features like:
  180. - Assets exports
  181. - Colors and Theme setups
  182. - Widget tree and full screen building
  183. Others coming soon...
  184. ## 🧱 Other framworks
  185. If you want to develop this for React, Angular, React Native, Vue or any other framework. I've added a detailed doc [Figma Framework MCP](docs/figma-framework-mcp.md) that you can explore and get started. Meanwhile I'll maintain a list here if someone's already doing this for framework specific Figma's MCP servers.
  186. - ...
  187. - ...
  188. ## 🔑 License
  189. This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details
  190. ## 🙋‍♂️ Author
  191. #### Muhammad Hamza
  192. [![LinkedIn Link](https://img.shields.io/badge/Connect-Hamza-blue.svg?logo=linkedin&longCache=true&style=social&label=Connect
  193. )](https://www.linkedin.com/in/mhmzdev)
  194. You can also follow my GitHub Profile to stay updated about my latest projects:
  195. [![GitHub Follow](https://img.shields.io/badge/Connect-Hamza-blue.svg?logo=Github&longCache=true&style=social&label=Follow)](https://github.com/mhmzdev)
  196. If you liked the repo then kindly support it by giving it a star ⭐!
  197. Copyright (c) 2025 MUHAMMAD HAMZA
  198. ---
  199. **Built with ❤️ for designers and developers who want to bridge the gap between design and code.**

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.