
FlutterSDK Dusk
io.github.fluttersdkPublished by GitHub account fluttersdkv0.0.13Updated Oct 24, 2026
Drive live Flutter apps: snapshot the Semantics tree, tap, type, scroll and screenshot.
Overview
A local stdio MCP server that lets an AI assistant drive a running Flutter app: snapshot its Semantics tree, tap, type, scroll, and take screenshots.
- What you can do
- Inspect the live app: snapshot the Semantics tree with stable ref tokens, observe candidate widgets, capture screenshots, read console output and captured Flutter errors, and inspect routes and modals. Drive gestures: tap, double- and right-click, type, fill, clear, drag, scroll, hover, focus, blur, set checkboxes, select options, press keys, and navigate. Manage the app lifecycle: hot reload and re-snapshot in one call, resize the viewport and emulate device profiles over CDP, wait for network idle, and close the app. Measure performance: bracket an interaction with perf begin and end, then get frame attribution, traces, and comparisons. Evaluate expressions in the running app through a DUS
- When to use it
- Useful when an assistant needs to test or debug a running Flutter app interactively, for example to reproduce a UI bug, verify a fix after hot reload, or walk through a flow without writing a test file. It targets unscripted automation of a live app rather than authored integration tests.
- Requirements
- Runs as a local process on the user's machine (desktop only). Needs Dart SDK 3.4.0 or later and Flutter 3.22.0 or later, plus the fluttersdk_dusk package added to the app and its install command run to patch main.dart and scaffold the CLI. The app must be started in debug or profile mode with the plugin installed.
Installation
In SourceWeft
- Open FlutterSDK Dusk in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Dusk
End-to-end driver for Flutter apps. Read by humans, driven by AI agents.
Snapshot the Semantics tree, drive any gesture, capture screenshots, observe live state, all from one CLI and one stdio MCP server.
[CI] [pub package] [pub points] [License: MIT] [GitHub stars]
Documentation · pub.dev · Issues
[!NOTE] Requires Dart SDK >= 3.4.0 and Flutter >= 3.22.0. dusk is debug-only: production builds tree-shake the entire driver across web, desktop, and mobile.
Installation
That's it. After the second command, all 41 dusk:* commands surface through ./bin/fsa <cmd> (~110ms warm) or dart run fluttersdk_dusk <cmd> (works the same, ~3s startup), and the MCP server is one dart run fluttersdk_dusk mcp:install away. When fastcli (./bin/fsa) is absent, mcp:install writes dart run fluttersdk_dusk mcp:serve into .mcp.json automatically; no manual edit required. See MCP install: 8 clients for the per-client wiring. Manual wiring, Magic-stack integration, and the full per-command flag reference live in the Getting Started guide.
[!TIP] fastcli is the AOT-compiled artisan dispatcher (~110ms warm) shipped as
./bin/fsa.dusk:installscaffolds it for you automatically (best-effort; falls through to a warning whendartis not on PATH). After that, every./bin/fsa <cmd>is the fast path. The CLI also runs asdart run fluttersdk_dusk <cmd>with the same surface, ~3s slower per call.
Why Dusk?
End-to-end testing on Flutter has always been a stitched-together ritual. flutter_driver ships a one-off socket protocol that does not survive hot restart. integration_test runs in-process against a simulated WidgetTester, but you write a test file, build, run, and wait. AI coding agents that want to drive the running app reach for ad hoc flutter test invocations, copy stack traces back into the prompt, and paste screenshots back, calling it a workflow.
Dusk closes that loop. A single VM Service extension family (ext.dusk.*), a single CLI namespace (dusk:*), and a single stdio MCP server back 41 CLI commands and 39 MCP tools (33 ext.dusk.* + 6 artisan:dusk:* substrate-routed). The same contracts power human-driven terminal calls and agent-driven MCP tool calls: dusk:tap --ref=e7 (CLI) and dusk_tap (MCP) reach the exact same code path. No test harness, no test file, no build step. Attach to the live app and the agent has eyes (dusk_snap, dusk_screenshot, dusk_observe) and hands (dusk_tap, dusk_type, dusk_scroll, dusk_drag). On Flutter web, the dusk:screenshot CLI command falls back to CDP Page.captureScreenshot when artisan was started with --cdp-port, bypassing the in-isolate extension that hangs under CanvasKit; the dusk_screenshot MCP tool still dispatches in-isolate, so web agents should use the CLI for screenshots. dusk_exceptions captures non-fatal FlutterErrors (including overflow) in-package so diagnostics work even without telescope.
Features
[!IMPORTANT]
DuskPlugin.install()must be wrapped inif (!kReleaseMode) { ... }at the call site inlib/main.dart, so debug and profile builds carry it (dusk:perf_runmeasures a profile build). An app wired underkDebugModebefore this still works in debug, but registers noext.dusk.*in a profile build. Release builds tree-shake the entire driver across web (dart2js), desktop (dart2native), and mobile (AOT), but only when the guard exists. Without the guard, dusk ships into release binaries.
AI Coding Assistants
Dusk ships AI-first. The skill at skills/fluttersdk-dusk/SKILL.md teaches your agent the 6 core laws, the e<N> / q<N> ref grammar, the 6-step actionability vocabulary, the 39 MCP tool surface, and the agent-workflow playbooks. The same skill is distributed through fluttersdk/ai for Claude Code, Cursor, OpenCode, Gemini CLI, VS Code Copilot, Codex CLI, Cline, and Roo Code, one command:
The hosted MCP server at mcp.fluttersdk.com exposes a search-docs tool over Streamable HTTP (no auth) for agents that need to query the dusk docs corpus directly. For stdio-only clients, the npx @fluttersdk/mcp bridge proxies stdio to the upstream HTTP server. The LLM-readable inventory lives at llms.txt. Full multi-client wire-up and the OpenCode registry URL live in the fluttersdk/ai README.
This is independent of dusk's own runtime MCP server (./bin/fsa mcp:serve, covered in the next section): the docs MCP teaches the agent ABOUT dusk; the runtime MCP gives the agent eyes and hands on a running Flutter app.
MCP install: 8 clients
Dusk is the first Flutter MCP server focused on UI automation (tap, snap, screenshot, observe) rather than runtime telemetry. The 39 dusk_* tools surface to any MCP-compatible agent.
[!NOTE] Configs below use
./bin/fsa(the fastcli wrapper, see top of README). If fastcli is not scaffolded yet, swap./bin/fsa mcp:servefordart run fluttersdk_dusk mcp:servein every client row.
Standard config (any client that reads .mcp.json in the project root):
Before / after
Typical agent session
Full per-tool input schemas + example calls in the MCP tool reference. For agents that read structured project context at attach time, the canonical entry point is llms.txt; it lists the 39 MCP tool names inline, plus the command surface, ref token grammar, and 6-step actionability vocabulary. The site serves the bare URLs to humans and the same paths with a .md suffix to LLM agents (e.g. https://fluttersdk.com/dusk/getting-started.md).
Examples
The example/ directory ships a vanilla Flutter showroom that gives every CLI command a live target widget on one route: TextField, Dropdown, Checkbox, Switch, counter button, Draggable + DragTarget, dialog, bottom sheet, 30 ListTile rows for scrolling, and navigation buttons across three named routes.
Documentation
Full docs with live examples at fluttersdk.com/dusk: commands catalog, MCP tool reference, the 6-step actionability reference, Magic and Wind integration guides, and the snapshot enricher authoring guide. The internal architecture lives in ARCHITECTURE.md for contributors.
Contributing
CI enforces 80%+ line coverage on lib/ on every push to master and every PR back into it, with zero analyze issues and zero format drift on lib/, test/, and bin/. New behavior ships with a failing test first (red, green, refactor).
Before opening a pull request, run the same checks CI runs:
Report a bug · Request a feature
License
MIT, see LICENSE for details.
Built with care by FlutterSDK
If Dusk saves you debugging time, give it a star, it helps others discover it.
Source: README.md at commit 238ab21
Tools
0Version history
1- v0.0.13LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts