DF

dhruvanbhalara/flutter_agent_lens

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

48 stars 4 forks 品質 73 トレンド 33MIT

エージェントファーストモデルコンテキストプロトコル(MCP)サーバーは、Flutterアプリの実行をデバッグ、プロファイル、最適化します.

概要

AIアシスタントを接続するモデルコンテキストプロトコル(MCP)サーバーで、Flutterアプリケーションを実行します。 WebSocket 上で Dart VM サービスと連携し、AI ツールはアプリケーションの状態、パフォーマンスデータ、レイアウト制約、コンソールログに直接アクセスします。 AIアシスタント(ClaudeやCopilotなど)は、デバッグやプロファイルモードで実行されているFlutterアプリケーションを検査、プロファイル、およびデバッグすることができます。 このサーバーを: - ウィジェットの再構築の頻度を追跡します。 - ボトルネックとフレームジャンクを診断します。 - CPUの使用状況と実行ホットスポットを分析します。 - メモリ使用量を監査し、メモリリークを引き起こすパスを保持する。 - キャプチャコンソール、stdout、stderr、およびロギングストリーム。 - ローカルビルドサイズを読み込み、重いパッケージとアセットを見つけます。 - App LinksとUniversal Linksの設定を有効にします。 - スクロール動作を駆動し、ホットリロードをトリガーします。 パッケージをグローバルに活性化し、フラッタエージェントのバイナリを登録します。 グローバルなパブキャッシュビンディレクトリがシステムPATHにあることを確認してください.

概要(AI 翻訳)

AIアシスタントを接続するモデルコンテキストプロトコル(MCP)サーバーで、Flutterアプリケーションを実行します。 WebSocket 上で Dart VM サービスと連携し、AI ツールはアプリケーションの状態、パフォーマンスデータ、レイアウト制約、コンソールログに直接アクセスします。

お問い合わせ

##特徴

AIアシスタント(ClaudeやCopilotなど)は、デバッグやプロファイルモードで実行されているFlutterアプリケーションを検査、プロファイル、およびデバッグすることができます。 このサーバーを以下に使用できます。

  • ウィジェットを再構築する頻度を追跡します。
  • ボトルネックとフレームジャンクを診断します。
  • CPUの使用状況と実行ホットスポットを分析します。
  • メモリ使用量を監査し、メモリリークを引き起こすパスを保持する。
  • キャプチャコンソール、stdout、stderr、およびロギングストリーム。
  • ローカルビルドサイズを読み込み、重いパッケージとアセットを見つけます。
  • App LinksとUniversal Linksの設定を有効にします。
  • [[package:]を URI をローカルソースファイルに変換し、正確なナビゲーションを解決します。
  • 登録されたサービス拡張RPCを発見し、トリガーします。
  • スクロール動作を駆動し、ホットリロードをトリガーします。

お問い合わせ

セットアップ

##1. CLIをインストール パッケージをグローバルに有効化して、[flutter-agent-lens] バイナリを登録します。

グローバルパブキャッシュビンディレクトリがシステムPATHにあることを確認してください。

##2.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Flutter Agent Lens MCP Server

A Model Context Protocol (MCP) server that connects AI assistants to running Flutter applications. It communicates with the Dart VM Service over WebSockets, giving AI tools direct access to application state, performance data, layout constraints, and console logs.


Features

AI assistants (such as Claude or Copilot) can inspect, profile, and debug any Flutter application running in debug or profile mode. You can use this server to:

  • Track widget rebuild frequencies.
  • Diagnose rendering bottlenecks and frame jank.
  • Analyze CPU usage and execution hotspots.
  • Audit memory usage and find retaining paths that cause memory leaks.
  • Capture console, stdout, stderr, and logging streams.
  • Read local build sizes to locate heavy packages and assets.
  • Validate App Links and Universal Links configurations.
  • Resolve package: URIs to local source files for precise navigation.
  • Discover and trigger registered service extension RPCs.
  • Drive scroll behaviors and trigger hot reloads.

Setup

1. Install the CLI

Activate the package globally to register the flutter-agent-lens binary:

dart pub global activate flutter_agent_lens

Make sure your global pub cache bin directory is in your system PATH.

2. Configure the MCP Client

Claude Desktop

Add this to your configuration file (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "flutter_agent_lens": {
      "command": "flutter-agent-lens"
    }
  }
}

Cursor

  1. Go to Settings > Features > MCP.
  2. Click + Add New MCP Server and set:
    • Name: flutter_agent_lens
    • Type: command
    • Command: flutter-agent-lens

Tool Catalog

This server groups functions into action-based tools to keep the schema footprint small.

Connection & Setup (Pre-connection / Startup)

Tool Action Option Description
connection connect``connect_dtd``disconnect Connect to the VM Service, Dart Tooling Daemon (DTD), or disconnect.
discover_apps N/A Find running Flutter apps on this machine.
diagnose_project bundle_size``deep_links Run local build size analysis or check platform deep links.
set_response_format N/A Choose output format (markdown or json).

Connected Tools (Requires Active Connection)

Category Tool Actions / Subcommands Description
App Info get_app_info N/A Get VM version details, isolates, and service extensions.
DTD Integration get_active_location N/A Find active editor path and cursor line (requires DTD).
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "flutter_agent_lens": { "command": "flutter-agent-lens" } } }