跳到正文
FunCoding

marionette_mcp

MCP server enabling AI agents to interact with Flutter apps at runtime - let them inspect widgets, simulate taps, enter text, scroll, and take screenshots.

Star
517
分类
其他
许可证
Apache-2.0
最近提交
2026年11月24日
marionette_mcp

Marionette MCP

License marionette_mcp pub.dev badge

Your agent's hands and eyes on a running Flutter app.

Marionette connects Claude Code, Cursor, Codex, Gemini CLI, Copilot or any MCP client to the Flutter app you run in debug mode. The agent sees the screen, taps, types, scrolls, reads the logs, hot reloads, and writes a report of what it did. If you know Playwright MCP: this is that, for Flutter.

Website · Docs · Video · Article

Quick start

  1. Add the package to your app and initialize the binding in debug builds:

    flutter pub add marionette_flutter
    
    void main() {
      if (kDebugMode) {
        MarionetteBinding.ensureInitialized();
      } else {
        WidgetsFlutterBinding.ensureInitialized();
      }
      runApp(const MyApp());
    }
    

    If another package provides a binding mixin, combine both behaviors in one binding and initialize it before startup. See the binding guide.

  2. Give your agent a bridge: the MCP server or the marionette CLI, whichever you prefer (every agent):

    # MCP server, registered with Claude Code
    dart pub global activate marionette_mcp
    claude mcp add --transport stdio marionette -- marionette_mcp
    
    # or the CLI
    dart pub global activate marionette_cli
    
  3. Run the app with flutter run and paste the ws://…/ws VM service URI it prints into the prompt, or ask the agent to run the app itself:

    Connect to ws://127.0.0.1:9101/…/ws. On Profile, a malformed email must show an error and keep Submit disabled, and a valid one must submit.

Important

Flutter's own widgets work as is. A custom design system needs one configuration step, or the agent cannot see your buttons and fields: see Configure.

What the agent can do

Tools
Seeget_interactive_elements, take_screenshots
Acttap, enter_text, scroll_to, swipe, long_press, double_tap, pinch_zoom, press_key, press_back_button
Verifyget_logs, set_device_config (text scale, bold text, dark mode)
Iteratehot_reload, hot_restart
Extendyour app's own actions, registered with registerMarionetteExtension

With MarionetteConfiguration(enableSessionReports: true), every run leaves a folder: a steps.md the server writes, one line per tool call, and a report.md the agent writes from it. See Reports.

The marionette CLI drives the app with the same actions as shell commands: see Drive.

For UI outside the Flutter widget tree (system permission dialogs, OS sheets, webviews), use the native lane: native_connect with platform android | ios, then native_get_elements / native_tap / etc. Prefer Flutter tools when the target is an in-app widget. The CLI has the same native lane as native-* commands (marionette native-connect --platform android, marionette native-tap --text Allow). Setup (adb, a WebDriverAgent build), the CLI and the workflow: Native lane. To run the MCP server without the native tools, start it with --no-native (marionette_mcp --no-native or marionette mcp --no-native).

Agent Skills

marionette_flutter ships three Agent Skills:

SkillTeaches the agent to
marionette-flutter-setupAdd the binding, configure a custom design system, logs and device config
marionette-flutter-drive-appDrive the app with the MCP tools or the CLI, and write the report
marionette-flutter-to-patrolTurn a verified run into Patrol tests
dart run skills@ get                     # in an app that depends on marionette_flutter
npx skills add leancodepl/marionette_mcp # without the Dart toolchain

Documentation

PageWhat is inside
StartSetup, every agent's config, the first prompt, the example app, FAQ
ConceptsHow the agent sees a screen, selectors, compaction, the single-binding rule
ConfigureCustom design systems, Semantics, logs, device config, custom extensions
DrivePrompts for common jobs, every tool with its CLI command, the CLI
ReportsSession folders, steps.md, report.md, the verdict
Native laneSystem UI outside Flutter: dialogs, pickers, notifications, WebViews — setup, workflow, what each lane sees.

Packages

PackageRole
marionette_flutterThe binding in your app. Required.
marionette_mcpThe MCP server your agent runs.
marionette_cliThe marionette CLI, for shell-only agents.
marionette_loggingLog collection from the logging package.
marionette_loggerLog collection from the logger package.

🛠️ Maintained by LeanCode

Marionette is built by LeanCode, the creators of Patrol, the testing framework for Flutter. We build Flutter products from scratch to long-term maintenance.

同类 MCP Server

官方

Time

Current time lookup and conversion between IANA timezones

MOmodelcontextprotocol/servers92k近 7 天新增 200 个 star

官方

Everything

Reference server that exercises every MCP feature: tools, resources, prompts, sampling and more

MOmodelcontextprotocol/servers92k近 7 天新增 200 个 star

官方

Context7

Up-to-date docs for AI agents

UPupstash/context766k近 7 天新增 359 个 star

Reactive Resume

Free open-source resume builder with remote MCP tools for resumes and job applications.

REreactive-resume/reactive-resume46k近 7 天新增 219 个 star

mcp-server

Puter MCP enables AI tools to interact with Puter: manage files, websites, workers, and more

HEHeyPuter/puter44k近 7 天新增 63 个 star