Skip to main content
Glama
Amodh2022

flutter-bridge-mcp

by Amodh2022

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
R8_JARNoPath to r8.jar if retrace is not on PATH.
ADB_PATHNoPath to the adb binary.adb on PATH
FLUTTER_PATHNoPath to the flutter binary, used for flutter_attach.flutter on PATH
ANDROID_SERIALNoDefault device serial/emulator id when several devices are attached.
FLUTTER_BRIDGE_BUFFERNoRing-buffer size for capture_start.40000
FLUTTER_BRIDGE_MAX_MSGNoPer-message truncation limit.400
FLUTTER_BRIDGE_TIMEOUTNoSeconds to wait on a Dart VM Service call.30
FLUTTER_BRIDGE_MAX_LINESNoHard cap on returned lines.200
FLUTTER_BRIDGE_SCAN_LINESNoLines pulled from logcat before filtering.8000

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_devicesA

List connected Android devices and emulators with their state and model.

read_logsA

Read recent logcat output, filtered.

Args: package: only show logs from this app's process (e.g. com.example.app). tag: regex matched against the log tag. min_level: one of V, D, I, W, E, F. Defaults to I. contains: case-insensitive substring that must appear in tag or message. limit: max lines returned (hard-capped by FLUTTER_BRIDGE_MAX_LINES). buffer: main, system, crash, events, radio, or all. serial: device serial when several are attached.

find_crashesA

Extract recent crashes and ANRs as whole stack traces from the crash buffer.

Args: package: restrict to traces mentioning this package name. limit: how many of the most recent traces to return. serial: device serial when several are attached.

clear_logsB

Clear all logcat buffers. Do this before reproducing a bug so logs stay clean.

capture_startA

Begin recording logcat into a background ring buffer.

Use this when the user is about to reproduce a bug: start the capture, let them reproduce it, then query with capture_read. Unlike read_logs this survives log rotation and captures everything, including verbose output.

capture_readB

Query the background capture buffer with the same filters as read_logs.

Args: stop: also end the capture after reading.

capture_stopA

Stop the background logcat capture and release the adb process.

retraceA

De-obfuscate an R8/ProGuard stack trace using a mapping.txt file.

Args: stacktrace: the obfuscated trace, copied from find_crashes output. mapping_path: path to mapping.txt, usually under app/build/outputs/mapping//mapping.txt

screenshotA

Capture what is currently on screen. Use this to see the app before acting on it.

The image is downscaled before sending, so coordinates read off it are NOT the device's own. Use ui_dump, or tap(text=...), to get real tap targets.

Args: max_width: longest edge of the returned image in pixels. serial: device serial when several are attached.

ui_dumpA

List on-screen UI elements with their tap coordinates.

Cheaper and more precise than a screenshot when you only need to find a control.

Args: contains: case-insensitive filter on text, content description or id. clickable_only: only return elements that accept taps. limit: max elements returned. serial: device serial when several are attached.

tapA

Tap the screen, either at a coordinate or on the element matching text.

Prefer text: it survives layout and resolution differences. Exact matches win over partial ones; if several elements match, none is tapped and they are listed so you can pick a coordinate instead.

Args: x, y: device coordinates. Ignored when text is given. text: text, content description or resource id of the element to tap. serial: device serial when several are attached.

swipeA

Swipe or scroll. Give a direction for a centred swipe, or explicit coordinates.

Args: direction: up, down, left or right. "up" scrolls the content up (reveals what is below), matching how a finger moves. x1, y1, x2, y2: start and end points, used when direction is omitted. duration_ms: swipe duration; raise it for a slow drag, lower it to fling. serial: device serial when several are attached.

input_textA

Type into the focused field. Tap the field first so it has focus.

Args: text: the text to type. ASCII only — adb cannot type emoji or most non-Latin text. submit: press Enter afterwards. clear: delete the field's existing contents first. serial: device serial when several are attached.

press_keyB

Press a hardware or navigation key.

Args: key: back, home, recents, enter, tab, delete, escape, search, menu, power, wake, sleep, volume_up, volume_down, camera, or dpad_up/down/left/right/center. A raw KEYCODE_* name or a numeric keycode also works. serial: device serial when several are attached.

launch_appA

Launch an app, optionally from a clean state.

Args: package: application id, e.g. com.example.app. activity: fully qualified activity to start instead of the launcher entry point. clear_data: wipe the app's data first, for a true first-run test. serial: device serial when several are attached.

stop_appA

Force-stop an app. Pair with launch_app to test a cold start.

Args: package: application id, e.g. com.example.app. serial: device serial when several are attached.

device_infoB

Report screen size, density, Android version and the foreground activity.

flutter_connectA

Connect to a running Flutter app's Dart VM Service. Call this first.

The VM Service URI is printed to logcat only at launch, and only by debug and profile builds. If it has already scrolled out of the buffer, pass relaunch=True to restart the app and capture it.

Args: package: application id, needed for relaunch. relaunch: force-stop and restart the app to capture a fresh URI. serial: device serial when several are attached.

flutter_widget_treeA

Show the live widget tree with the source location of each widget.

Only widgets from your own project are shown by default — the framework's own wrappers are noise. Each line ends with the file and line that built it.

Args: contains: case-insensitive filter on widget type or description. max_depth: 0 for no limit, otherwise prune deeper than this. limit: max widgets returned. include_framework: also show widgets from Flutter and third-party packages. package, serial: as elsewhere.

flutter_locateA

Find something on screen and report both how to tap it and where it lives in code.

This is the bridge: tap coordinates come from Android's semantics tree, while the widget type and source location come from the Dart VM Service. Use it to go from "this looks wrong on screen" to the exact line that built it.

Args: text: visible text, semantics label or widget type to look for. package, serial: as elsewhere.

flutter_diagnoseA

Correlate Dart-side errors with the native Android log around them.

A Flutter failure usually leaves two unrelated-looking traces: a Dart exception and, for anything crossing a platform channel, a Java/Kotlin one in logcat. This pulls both and puts them next to each other in time order.

Args: package: app to restrict native logs to, e.g. com.example.app. limit: how many Dart errors to report. serial: device serial when several are attached.

ui_checkpointA

Remember the current screen so a later ui_diff can show what changed.

Take one before editing code, then call ui_diff after hot reloading.

Args: label: name for this checkpoint. serial: device serial when several are attached.

ui_diffA

Compare the screen now against a checkpoint and highlight what moved.

Returns a summary plus the current screen with changed regions outlined, so you can confirm an edit did what you meant and did not disturb anything else.

Args: label: which checkpoint to compare against. threshold: per-channel difference (0-255) that counts as a real change. Raise it to ignore animations and anti-aliasing. max_width: longest edge of the returned image. serial: device serial when several are attached.

flutter_attachA

Attach the Flutter tool to the running app so hot reload becomes possible.

Needed once per session before flutter_hot_reload: the VM Service on its own has no Dart compiler, so source edits cannot be applied without this.

Args: project_dir: the Flutter project root, the directory holding pubspec.yaml. serial: device serial when several are attached.

flutter_hot_reloadA

Apply Dart source edits to the running app.

Requires flutter_attach first. Use full_restart after changing initState, global state or main(), which a plain reload cannot pick up.

Args: full_restart: hot restart instead of hot reload. package, serial: as elsewhere.

flutter_detachA

End the attach session, leaving the app running on the device.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 26 tools

Disambiguation4/5

Most tools target a distinct action and resource, but read_logs and capture_read share the same filter semantics, and ui_dump and flutter_locate both find on-screen elements. The descriptions are detailed enough to disambiguate, so the overlap is manageable.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun style: list_devices, read_logs, clear_logs, launch_app, flutter_connect, ui_diff. The flutter_* and ui_* prefixes further group related operations, making the naming predictable and scannable.

Tool Count2/5

At 26 tools, the set exceeds the well-scoped range and feels heavy for an MCP server. The tools are organized into clear categories, but the capture_* trio, multiple UI-inspection tools, and the attach/reload/detach sequence add bulk that could have been consolidated.

Completeness5/5

The surface covers the full Flutter debugging loop: log capture, crash extraction, retracing, UI inspection, interaction, VM Service connection, widget tree analysis, hot reload, and visual verification via ui_diff. There are no obvious dead ends or missing core operations for the stated purpose.

Maintenance

ActivityMaintained
ResponsivenessNo issues