Driftcheck
io.github.wilsonvargas由 GitHub 账号 wilsonvargas 发布v0.1.1更新于 Oct 30, 2026
Compares a mobile app screen (Android or iOS Simulator) with its Figma design and suggests fixes.
概览
本地 MCP 服务器:截取 Android 或 iOS 模拟器画面,与 Figma 设计稿对比,并向助手给出差异、修复建议和还原度评分。
- 可以做什么
- 列出已连接的 Android 设备与已启动的 iOS 模拟器
- 在编写 UI 代码前读取 Figma 画板的尺寸、颜色、文字与字体
- 截取应用画面及其元素和 AutomationId
- 对比设计与应用:还原度评分、逐项属性差异、按框架给出的修复建议,并生成 HTML 报告、并排图和差异图
- 导入保存在默认目录之外的 Figma 插件导出文件
- 适用场景
- 适合依据 Figma 设计开发或检查移动端界面时使用,让助手自动发现并修复间距、颜色、字体、缺失图标等视觉偏差,而不必靠肉眼比对截图。最适合已在模拟器或真机上运行应用的团队。
- 运行要求
- 通过 dotnet dnx 从 NuGet 本地运行,需要 .NET 10 SDK。Android 需要 Android SDK 与 adb;iOS 需要 macOS、Xcode 和已启动的模拟器。需要 FIGMA_TOKEN 环境变量(只读 Figma 令牌),或使用自带的 Figma 插件以不调用 API。可选 DRIFTCHECK_OUTPUT 与 DRIFTCHECK_EXPORTS 指定输出与导出目录。
安装
在 SourceWeft 中
- 打开 控制台中的 Driftcheck,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Driftcheck
Catch UI drift before your users do.
Your AI agent compares the app on the emulator with its Figma design, then fixes the differences.
[Driftcheck report: the Figma design and the app under a slider, a 75 % fidelity score and the list of differences with how to fix each one]
Open the interactive report → · Design: Paylo kit by Marvilo (CC BY 4.0)
Driftcheck is a local MCP server. It captures the screen of an Android device or the iOS Simulator, compares it 1:1 with the Figma frame and gives your agent what it needs to close the gap:
- What's different: position, size, text, font, colors, corner radius, borders, and missing icons or images, including layers with no text, found by how they look.
- How to fix it, written with your framework's properties:
Margin,android:layout_marginTop,Modifier.padding,.frame,EdgeInsets… - A fidelity score that tracks progress from one fix to the next, and an HTML report to share with your team.
It works with real-world design kits, where layers are called Frame or Text, and without a Figma token through the Driftcheck Figma plugin.
Quick start
You need the .NET 10 SDK, plus adb for Android or Xcode for the iOS Simulator. Install Driftcheck in one click:
[Install in VS Code] [Install in VS Code Insiders] [Install in Cursor]
VS Code asks for your Figma token; leave it empty to use the Figma plugin instead. In Cursor, add the token to FIGMA_TOKEN in the server's configuration afterwards.
Or add it to any MCP client by hand; dotnet dnx downloads it from NuGet the first time:
With Claude Code:
Then run your app and ask your agent:
Compare the app on the emulator with https://www.figma.com/design/…?node-id=… and fix the differences.
What your agent gets back
compare_screen answers with a report the agent can act on (excerpt from the demo):
Along with it come report.html (the interactive report above: slider, opacity, diff and side by side), side_by_side.png and diff.png.
Supported platforms
Fix suggestions are written for .NET MAUI, Android views, Jetpack Compose, UIKit, SwiftUI and Flutter, or in plain terms if you don't pass a framework. The comparison itself doesn't depend on the framework: it works from what's on the screen.
MCP tools
How it works
Driftcheck downloads the frame once and keeps it in a local cache, recomputes Figma's auto layout, and matches layers to app elements by AutomationId, by visible text or by position. Texts are compared by their visible glyphs rather than their boxes, non-text layers are found in the screenshot by how they look, and a device slightly wider or narrower than the frame is handled by anchoring each element where it fits best. The full walkthrough is in How Driftcheck compares.
Figma API limits
Figma limits how many calls a token can make, and on some seat types the quota is very low: once it runs out, it responds 429 with waits of days. That's why:
- The JSON and PNG of each frame are stored in a local cache and reused on every comparison. Pass
refresh=truetoget_design_specsorcompare_screento download a frame that changed in Figma. - If Figma responds
429, the error says how long to wait. - Without a token or quota, the Figma plugin in
tools/figma-export-pluginexports the frame (JSON + 2x render) to a.driftcheck.jsonfile without using the REST API. If it lands in Downloads, Driftcheck picks it up on its own from the frame link; if it lands in another folder, import it withimport_design. See the plugin README.
Requirements
- .NET 10 SDK
- For Android: Android SDK with
adb(detected fromANDROID_HOME,ANDROID_SDK_ROOTor the default paths on Windows and macOS) - For iOS: macOS with Xcode and a booted simulator. No idb or WebDriverAgent needed
- A
FIGMA_TOKENenvironment variable with a Figma Personal Access Token (scope File content: Read-only), or the Figma plugin to work without the API - Optional:
DRIFTCHECK_OUTPUTto change the output folder (default:driftcheckin the temp folder) - Optional:
DRIFTCHECK_EXPORTSto change where plugin exports are looked up (default: Downloads)
Current limitations
- iOS on the simulator only (not on physical devices).
- Visible area only (no scrolling).
- Doesn't measure font size in the app (uiautomator and XCUITest don't expose it);
get_design_specsprovides it as a reference.
Running from source
The .mcp.json at the root registers the server for MCP clients that read it when opening this folder. To use it from another project, add the server to your client's MCP configuration:
Repository layout
src/Driftcheck.Mcp— MCP servertools/ios-accessibility-helper— UI test that dumps the iOS Simulator accessibility tree (copied next to the server on build)tools/figma-export-plugin— Figma plugin that exports a frame without the REST APIsamples/PayloMaui— MAUI test app with screens from the Paylo kit by Marvilo (CC BY 4.0) For the iOS Simulator:dotnet build -f net10.0-ios -p:TargetFrameworks=net10.0-ios(limitingTargetFrameworksavoids requiring the Mac Catalyst workload), thenxcrun simctl install booted bin/Debug/net10.0-ios/iossimulator-arm64/PayloMaui.appandxcrun simctl launch booted com.companyname.paylomaui. The Xcode version must be the one the iOS workload asks for; if several are installed, pick it withDEVELOPER_DIR.samples/PayloNative— the same sign-up screen with native Android views (Java, no MAUI or AndroidX), to check that the comparison doesn't depend on MAUI../build.ps1builds it with the SDK tools (no Gradle) and installs it on the emulatorsamples/PayloIos— the same screen with native iOS views (UIKit in Swift, no MAUI or storyboard)../build.shbuilds it withswiftc(no Xcode project) and installs it on the booted simulatortests/Driftcheck.Tests— comparer tests with synthetic screensdocs— the detailed comparison walkthrough and the demo report published on GitHub Pages
To compare the sample apps, open the Paylo kit in the Figma Community, duplicate it to your drafts, select the frame Component 113 (the sign-up screen) and use Copy link to selection. Then run a sample on the emulator or simulator and ask your agent to compare it with that link.
Contributing
Issues and pull requests are welcome. See CONTRIBUTING.md for how to build, test and propose changes, and SECURITY.md to report a vulnerability privately.
License
Driftcheck is released under the MIT License. Third-party material in the sample apps keeps its own license: see THIRD_PARTY_NOTICES.md.
来源:README.md,提交 d369cfb
工具
0版本历史
1- v0.1.1最新Oct 29, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分