パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.7.0

marionette_flutter

MCPを介したAIエージェントとの相互作用用のFlutter拡張機能 — Claude、Copilot、Cursorがアプリでタップ、スクロール、入力、スクリーンショットを撮影できるようにします。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
25万
いいね数
77
Pub ポイント
160

パッケージをインストール

flutter pub add marionette_flutter

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Marionette Flutter は MCP プロトコルを通じて AI エージェントが Flutter アプリと対話できるようにし、Claude、Copilot、Cursor などのツールがタップ、スクロール、入力、スクリーンショットの取得などの操作を実行できるようにします。これにより、Flutter アプリに自動テストや AI による UI 連携機能が拡張され、開発ワークフローが向上します。このパッケージは Android、iOS、Web、macOS、Windows、Linux など複数のプラットフォームでシームレスに統合可能です。LLM をアプリのテストや自動化に活用する開発者向けに設計されており、AI エージェントとネイティブアプリの挙動のギャップを埋めます。

用途

  • AIエージェントを用いた自動UIテスト
  • AI駆動のアプリ探索とデバッグ
  • アプリケーションとの相互作用のためのCopilotおよびClaudeとの統合
  • テスト中のリアルタイムスクリーンショットのキャプチャ
  • MCPを介したクロスプラットフォームアプリケーションの相互作用

主な機能

  • AIエージェント間通信のためのMCPプロトコルサポート
  • タップ、スクロール、入力、スクリーンショット操作のサポート
  • マルチプラットフォーム互換性(Android、iOS、Web、macOS、Windows、Linux)
  • LLM駆動の開発ツールとのシームレスな統合
  • エージェント相互作用用の軽量なFlutter拡張

適している対象

  • テストにAIエージェントを使用する開発者
  • AI駆動型UI自動化を実装するチーム
  • 高度なテストオーケストレーションを必要とするFlutterプロジェクト
  • Copilot、Claude、または Cursor と連携する統合者
  • アプリ開発における生成型AIに焦点を当てたプロジェクト

注意事項

  • MCP 対応をサポートする互換性のあるAIエージェントが必要です
  • セキュアなエージェントアクセスのための追加設定が必要になる場合があります
  • MCP をサポートするプラットフォームに限定
  • 完全な機能を実現するには外部のAIツールに依存しています
  • 本番ユーザーインタラクションを想定していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

marionette_mcp

Marionette MCP

License marionette_mcp pub.dev badge

"Playwright MCP/Cursor Browser, but for Flutter apps"

Marionette MCP enables AI agents (Claude Code, Copilot, Cursor, Gemini CLI, and more) to inspect and interact with running Flutter applications. It connects your AI agent directly to a running app via the Model Context Protocol (MCP), so it can see the widget tree, tap elements, enter text, scroll, and capture screenshots for automated AI-driven smoke testing and interaction.

Marionette MCP keeps the surface area intentionally small. It exposes only a handful of high-signal actions and returns the minimum actionable data, which helps keep prompts focused and context sizes under control.

Learn more about Marionette MCP:

Demo

Marionette MCP vs Flutter MCP

The official Dart & Flutter MCP server focuses on development-time tasks: searching pub.dev, managing dependencies, analyzing code, and inspecting runtime errors. It can also drive the UI, but it does so through Flutter Driver, which introduces extra instrumentation in your app. Marionette MCP focuses solely (and in an opinionated way) on runtime interaction: tapping buttons, entering text, scrolling, and taking screenshots, while requiring minimal changes to your app. Use Flutter MCP to build your app, use Marionette MCP to test and interact with it with minimal code changes.

Quick Start

[!NOTE] Your Flutter app must be prepared to be compatible with Marionette. The steps below are the short version — the Getting Started guide walks through each one.

  1. Prepare your app — add marionette_flutter and initialize MarionetteBinding in main.dart:

    flutter pub add marionette_flutter
    
    void main() {
      if (kDebugMode) {
        MarionetteBinding.ensureInitialized();
      } else {
        WidgetsFlutterBinding.ensureInitialized();
      }
      runApp(const MyApp());
    }
    
  2. Install the bridge — activate the MCP server (for the CLI alternative, see the CLI guide):

    dart pub global activate marionette_mcp
    
  3. Configure your AI tool — e.g. for Claude Code:

    claude mcp add --transport stdio marionette -- marionette_mcp
    

    Other tools (Cursor, Gemini CLI, Copilot, Antigravity): see Configuring your AI tool.

  4. Run your app in debug mode — flutter run, then copy the VM service URI from the console (e.g. ws://127.0.0.1:9101/ws).

  5. Connect and interact — ask your agent to connect using that URI and start driving the app.

[!IMPORTANT] Standard Material widgets work out of the box. If your app uses a custom design system, configuration is required — otherwise the agent can't see or tap your custom buttons and fields. Start with the Production Setup Checklist.

What you can do

Once connected, an agent can drive your app with a small, focused toolset: inspect the widget tree (get_interactive_elements), tap / secondary_tap / double_tap / long_press / swipe / pinch_zoom / scroll_to, enter_text, press_back_button, take_screenshots, read get_logs, and hot_reload. Full list: MCP Tools.

Your app can also expose its own actions to the agent via Custom Extensions — navigate by route name, seed test data, toggle feature flags, and more.

Some real-world prompts:

"I implemented the Forgot Password screen — connect, navigate to login, tap 'Forgot Password', enter a valid email, submit, and check the logs that the API call fired."

"I refactored the routing. Run a smoke test: cycle through all bottom-nav tabs and verify each screen loads without exceptions in the logs."

"Investigate the unresponsive 'Clear Cache' button on Settings — find it via get_interactive_elements, tap it, and analyze the logs."

Documentation

Guide What's inside
Getting Started Zero-to-driving in 5 steps.
Flutter Setup The binding, debug-only init, the single-binding rule.
Configuration Custom design systems, production checklist, complete main.dart.
Log Collection Wire up get_logs (logging, logger, or custom).
Semantics Make custom-painted / rich content readable to agents.
MCP Tools Full tool reference + AI-tool configuration.
Custom Extensions Expose app-specific actions as agent tools via registerMarionetteExtension.
CLI Drive Marionette from any shell-capable agent.
Troubleshooting Common gotchas and limitations.

Packages

Package Role
marionette_flutter The binding you add to your Flutter app. Required.
marionette_mcp MCP server bridging AI agents to your running app.
marionette_cli CLI alternative for shell-only / restricted environments.
marionette_logging LogCollector adapter for the logging package.
marionette_logger LogCollector adapter for the logger package.

🛠️ Maintained by LeanCode

This package is built with 💙 by LeanCode. We are top-tier experts focused on Flutter Enterprise solutions.

Why LeanCode?
  • Creators of Patrol – the next-gen testing framework for Flutter.

  • Production-Ready – We use this package in apps with millions of users.

  • Full-Cycle Product Development – We take your product from scratch to long-term maintenance.


Need help with your Flutter project?

👉 Hire our team   •   Check our other packages

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

このパッケージを使用しているプロジェクト