Image2Flutter MCP
Converts UI screenshots into validated, editable Flutter widgets, with visual diff comparison and preview.
README
Image2Flutter MCP
<p align="center"><strong>English</strong> · <a href="docs/README.ko.md">한국어</a> · <a href="docs/README.ja.md">日本語</a> · <a href="docs/README.zh-CN.md">简体中文</a></p>
<p align="center"> <strong>Turn a screenshot into validated, editable Flutter widgets.</strong><br> MCP tools for Codex and Claude, plus a standalone CLI. </p>
<p align="center"> <a href="https://github.com/ezBuilder/image2flutter-mcp/actions/workflows/ci.yml"><img alt="CI: 21 tests passing" src="docs/assets/badge-ci.svg"></a> <a href="https://github.com/ezBuilder/image2flutter-mcp/releases/latest"><img alt="Version 1.1.0" src="docs/assets/badge-version.svg"></a> <a href="#one-command-install"><img alt="Install with one command" src="docs/assets/badge-install.svg"></a> <a href="LICENSE"><img alt="MIT License" src="docs/assets/badge-license.svg"></a> </p>
Image2Flutter reads a UI screenshot, generates real Dart widget code, creates an isolated Flutter project, runs validation, captures a browser render, and produces a visual-diff report. It never ships the whole screenshot as a fake full-screen asset in semantic mode.
Reference → generated Flutter
<table> <tr><th>Reference image</th><th>Flutter web render</th></tr> <tr> <td><img src="docs/assets/video-analysis-reference.png" alt="Reference dashboard" width="430"></td> <td><img src="docs/assets/video-analysis-flutter.png" alt="Generated Flutter dashboard" width="430"></td> </tr> </table>
Both images are 1150×1367. The output is composed from Dart widgets, custom painters, layout primitives, text, and generated visual assets—not a full-screen screenshot overlay. See sample details.
One-command install
Requires Node.js 20+. Flutter is recommended for analyze, test, preview, and visual-diff gates.
curl -fsSL https://raw.githubusercontent.com/ezBuilder/image2flutter-mcp/main/scripts/install.sh | bash
The installer:
- installs the latest stable package globally;
- registers the
image2flutterMCP server in Codex and Claude when present; - allows projects under
~/workspaceand~/Downloadsby default; - runs the version and environment doctor checks;
- enables a safe update check once every 24 hours.
Custom roots:
curl -fsSL https://raw.githubusercontent.com/ezBuilder/image2flutter-mcp/main/scripts/install.sh | \
IMAGE2FLUTTER_ALLOWED_ROOTS="$HOME/projects:$HOME/designs" bash
Manual npm installation:
npm install --global image2flutter-mcp
image2flutter doctor
Windows PowerShell:
irm https://raw.githubusercontent.com/ezBuilder/image2flutter-mcp/main/scripts/install.ps1 | iex
Use it with an agent
Once installed, attach a screenshot while working in a Flutter/Dart repository and ask:
Recreate this screenshot as editable Flutter widgets. Validate it and show the rendered preview.
The MCP descriptions tell compatible agents to invoke Image2Flutter automatically for screenshot-to-Flutter requests. Six tools cover the full lifecycle:
| Tool | Purpose |
|---|---|
flutter_ui_convert |
End-to-end screenshot conversion and refinement |
flutter_ui_materialize |
Validate agent-authored Dart without another model call |
flutter_ui_preview |
Rebuild, render, and compare an existing job |
flutter_ui_apply |
Copy a verified widget into a Flutter project |
flutter_ui_job_get |
Inspect manifests, diagnostics, and generated code |
flutter_ui_doctor |
Verify Flutter, browser, model, and storage readiness |
CLI
# Generate an editable semantic widget
image2flutter convert \
--image ./screen.png \
--mode semantic \
--provider auto \
--responsive adaptive \
--locale ko-KR \
--refine 2
# Inspect a job
image2flutter job <job-id> --code
# Re-render and compare
image2flutter preview <job-id>
# Apply only after validation
image2flutter apply <job-id> --project ./my_flutter_app --analyze
Conversion modes
semantic: editable widgets; rejects a whole-screen screenshot as the implementation.hybrid: editable layout plus tightly cropped visual assets where they materially improve fidelity.pixel: exact screenshot-backed reproduction for mockups; intentionally not a semantic rebuild.
Model providers
--provider auto prefers the authenticated local Codex CLI, then OPENAI_API_KEY, then MCP sampling from the calling agent. The pipeline itself does not hide model usage: convert may use a model, while materialize, preview, apply, and pixel mode can run without an extra generation call.
Languages and scripts
Visible Unicode text is preserved without automatic translation. The reconstruction prompt handles mixed scripts, CJK glyph fallback, right-to-left direction, locale-sensitive values, emoji, and original line breaks. Set --locale <BCP-47> or MCP locale when the target locale must be explicit; examples include ko-KR, en-US, ja-JP, zh-CN, and ar-SA.
Updates
Installed CLI/MCP entrypoints check the stable release once every 24 hours. When a newer version exists, it is installed globally and used on the next invocation. Network or registry failures never prevent the current command or MCP server from starting.
image2flutter upgrade --check
image2flutter upgrade
IMAGE2FLUTTER_AUTO_UPDATE=0 image2flutter doctor
Output and safety
Each job writes a manifest, Dart source, isolated preview project, render, diff, and validation report under .image2flutter/jobs (or --output). Writes are constrained to IMAGE2FLUTTER_ALLOWED_ROOTS. Applying to a real project requires an explicit flutter_ui_apply/image2flutter apply call, and overwrites remain opt-in.
No API keys, prompts, or screenshots are uploaded by the MCP server unless the selected model provider requires it. Read SECURITY.md before using sensitive designs.
Development
npm ci
npm run check
npm run release:gate
Development happens on develop; main contains released code. See CONTRIBUTING.md, CHANGELOG.md, and the architecture.
한국어 요약
Image2Flutter는 첨부한 UI 이미지를 실제 Dart 위젯으로 재구성하고 Flutter 분석·테스트·웹 렌더·시각 비교까지 수행하는 MCP/CLI입니다. 설치 명령 한 번으로 Codex와 Claude에 등록되며, Flutter 프로젝트에서 이미지를 첨부하고 “그대로 Flutter 위젯으로 만들고 검증해”라고 요청하면 MCP가 자동 선택되도록 도구 설명이 구성되어 있습니다. 전체 화면 이미지를 그대로 붙이는 방식은 semantic 모드에서 허용하지 않습니다.
License
MIT © 2026 ezBuilder
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。