maestro-plus
It is an MCP server that orchestrates Maestro mobile UI testing across multiple Android devices, adding parallel execution, assertions, failure diagnosis, and flow recording on top of the official Maestro MCP server.
health_check — verify the local toolchain (Maestro CLI, adb, devices, official MCP) and see what is missing or degraded.
list_device_pool — list connected Android devices/emulators with health and lease state to plan where work can run.
run_parallel — run multiple Maestro flows in parallel across leased devices, with per-flow results, wall time, and speedup.
run_and_assert — run a flow and immediately check assertions (visible/not visible/contains text) against the resulting screen.
assert_visual — compare the whole screen or a region against a baseline PNG with configurable tolerance and baseline regeneration.
debug_failure — run a flow and, on failure, collect correlated evidence (screenshots, logcat, view hierarchy) and produce a structured diagnosis.
explore_and_record — turn described exploration steps into a replayable Maestro flow, auto-generate assertions, and optionally validate it by running it.
Enables AI agents to drive Android UI tests via adb-based device discovery, device pooling, and a degradation fallback path for reading screens and collecting evidence from connected Android emulators and physical devices.
Listed as a planned/not-yet-implemented backend over simctl for iOS device support; not currently available.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@maestro-plus run my checkout flow on all devices in parallel and debug any failures"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
maestro-plus
Multi-device pools, composite assertions, and automatic failure diagnosis for AI agents driving mobile UI tests.
Built on top of Maestro's official MCP server — an orchestration layer above it, never a replacement. When upstream grows, this project grows with it instead of dying.
Install · Tools · Why it exists · Known limitations · 中文说明
Maestro's MCP server gives an agent eyes and hands: it can read the screen, tap, and run a flow. It deliberately stops there — one device, atomic operations, and no opinion about whether the result was correct.
maestro-plus fills in what the official server leaves out.
Capability matrix
Capability | Official MCP | maestro-plus |
List connected devices | Yes | Yes |
Device pool with health and occupancy state | No | Yes — |
Run a single flow | Yes | Yes |
Run N flows across M devices in parallel | No | Yes — |
Read the current screen | Yes | Yes |
Assert on the outcome (element / text / visual) | No | Yes — |
Decide why a run failed | No | Yes — |
Turn an exploration into a replayable flow | No (Studio is closed-source) | Yes — |
Self-check the local toolchain | No | Yes — |
Keep working when the official MCP is unavailable | No | Yes — adb fallback |
The two tools that matter most are run_parallel and debug_failure. Parallel execution across devices is Maestro Cloud's revenue line, so it will never appear in the open-source CLI. Failure diagnosis is the work nobody wants to automate, which is exactly why it is worth automating.
Related MCP server: MCP Appium
Install
MCP host (Claude Code, Codex, Cursor, anything speaking MCP)
{
"mcpServers": {
"maestro-plus": {
"command": "npx",
"args": ["-y", "maestro-plus"]
}
}
}The npm package is a launcher only. It locates a Python runtime, starts the real server, and hands over stdin/stdout. There is no logic in it beyond that.
Python-native
uvx maestro-plusOr pin it into a project:
uv add maestro-plusRequires Python 3.10+.
Prerequisites
maestro-plus shells out to tools you already use. It does not bundle them.
Tool | Required for | Install |
Maestro CLI | every flow-running tool |
|
adb | device discovery, fallback path, log collection | Android platform-tools |
ffmpeg | only | your package manager |
Run health_check first. It reports which of these are missing and which tools degrade without them.
Tools
list_device_pool
Returns every connected emulator and physical device with its serial, model, Android version, and whether it is currently leased by another run. Agent-facing tools use this to decide where work can go.
run_parallel
Takes a set of flows and a set of devices, leases devices from the pool, runs the work, and returns one aggregated result. Results are per-flow and per-device, so a flake on one device does not mask a real failure on another.
run_and_assert
Runs a flow, then evaluates a list of assertions against the resulting screen state in the same call. This replaces the loop agents get stuck in today: run, screenshot, read the hierarchy, describe what is visible, decide, repeat.
assert_visual
Compares a screen region against a baseline image with a configurable tolerance, returning a diff percentage and the diff artifact path. Baselines can be regenerated on demand, which is what keeps this from becoming the flaky part of your suite.
debug_failure
The flagship tool. Given a failed run, it collects and correlates the failure step, the screenshots immediately before and after, the relevant slice of device logs, the view hierarchy at the failure point, and emits a structured diagnosis that separates application defect from test defect — the question every QA engineer actually asks first.
explore_and_record
Takes the steps an agent already performed, emits a Maestro flow, reads the resulting screen to generate the assertions — the part of a flow people get wrong — and then runs the finished file to prove it replays.
Not a drop-in replacement for Maestro Studio's recorder: this does not watch the screen and infer what you did. What it adds over Studio, which is closed source, is deriving the assertions. Recording taps is the easy half; assertions are where recorded flows rot.
health_check
Verifies Maestro CLI version, adb availability, device reachability, and whether the official MCP server is responsive. Returns a degradation map: which tools work now, which are impaired, and what to install.
Architecture
src/maestro_plus/
server.py # MCPServer instance and the complete tool registration
pool.py # device leasing: one owner per device at a time
tools/
devices.py # health_check, list_device_pool
parallel.py # run_parallel
assertions.py # run_and_assert, assert_visual
diagnostics.py # debug_failure
record.py # explore_and_record
backends/
maestro_cli.py # the primary path: wraps the Maestro CLI
adb.py # discovery, evidence collection, degradation path
evidence.py # screenshot de-duplication, log triage, hierarchy queries
report.py # diagnosis bundle and HTML renderingTwo rules keep the design honest:
Never reimplement an official tool. If upstream exposes it, wrap it. There is a test that fails the build if anyone forgets.
Always degrade, never fail. If the official MCP is down, fall back to
adb+ the Maestro CLI rather than returning an error.
Evaluation
This section exists because a portfolio repository should show its work, including the parts that do not look good. Every row is not yet measured, and that is accurate rather than an omission — inventing plausible numbers would defeat the point of having the table.
Claim | How it is measured | Status |
Parallel execution reduces wall time | Total run time for N flows on M devices vs. sequential | Not yet measured |
| Hand-labelled set of failures with a known root cause | Not yet measured |
Screenshot de-duplication compresses evidence | Artifact count before and after de-duplication | Not yet measured |
The first and third rows are mechanical. scripts/measure.py produces them against your own suite and prints finished markdown:
python scripts/measure.py --flows flows/ --devices emulator-5554,emulator-5556
python scripts/measure.py --flows flows/ --devices emulator-5554 --artifacts ~/.maestro-plus/artifactsThe second row is not automatable on purpose. Judging whether a diagnosis was right needs someone who knows the real root cause, so the script prints the labelling template rather than an accuracy figure.
Until the numbers exist, treat the claims above as design intent, not results.
Known limitations
Android only today. The device pool and fallback path are built on
adb. iOS needssimctland a second backend.The fallback path is slower.
uiautomator dumpcosts roughly a second per read, so it is a recovery mechanism, not a default.No accessibility tree, no diagnosis.
debug_failurecan tell you an element was not found. It cannot tell you the app never rendered it if the app exposes nothing to the tree.Not a test management system. No history storage, no dashboards, no scheduling. It is a tool layer for agents and CI.
Depends on Maestro CLI output stability. Where the CLI only offers human-readable output, parsing is fragile and version-sensitive.
Roadmap
iOS backend over
simctlFill in the evaluation table with numbers from a real suite and a hand-labelled failure set
Progress reporting for long flows, so a four-minute run is not a black box
Optional HTTP transport, so a team can share one device pool instead of one pool per machine
License
MIT. See LICENSE.
Available Tools
7 toolsassert_visualB
Compare the current screen, or a region of it, against a baseline image.
Region comparison is the reason this is usable. A whole-screen baseline on a device with a clock in the status bar differs on every single run, which is how visual testing earns its reputation for flakiness. Cropping to the part that matters is what makes the result mean something.
update_baseline exists so refreshing a baseline is an explicit, visible act
rather than an edit someone makes by hand and forgets to review.
Inputs: baseline (required), device, region, tolerance, +1 more.
debug_failureA
Run a flow and, when it fails, gather the evidence needed to attribute the fault.
Collects the screen before the run, Maestro's own capture at the moment of failure, the screen after, the focused window, the relevant slice of logcat, and the elements present at failure — then applies an attribution heuristic and writes a JSON plus HTML bundle.
Returns diagnosed: false when the flow passes, because there is nothing to
diagnose and inventing an analysis would be noise.
Inputs: flow (required), env, device, package, +1 more.
explore_and_recordA
Generate a replayable Maestro flow from a described exploration, then verify it runs.
With both capture_assertions and validate enabled the steps run twice:
once to observe the resulting screen and derive assertions, once to prove the
finished file replays. That is deliberate — a flow that has never been
executed is a hypothesis, not a test.
Inputs: steps (required), app_id (required), name, device, +4 more.
health_checkA
Verify the toolchain: which tools work, which are impaired, what to install.
Run this first when anything behaves unexpectedly. It distinguishes "the Maestro CLI is missing" from "the CLI is fine but the emulator is unauthorized", which are two very different afternoons.
Inputs: no named parameters.
list_device_poolA
List every connected Android device and emulator with its health and lease state.
Call this before planning any parallel work: it is the only way to learn how
many devices are actually usable right now, and which of them are already
held by runs in flight. A device is usable when adb reports state device;
unauthorized and offline devices appear in the list but cannot run flows.
Inputs: no named parameters.
run_and_assertB
Run a Maestro flow, then check assertions against the screen it left behind.
The flow's own result is always reported, even when assertions cannot run. Assertions are skipped entirely when the flow failed, because checking expectations after a known-broken run produces a second, noisier failure that buries the first one.
Inputs: flow (required), assertions (required), env, device, +2 more.
run_parallelA
Run several Maestro flows in parallel across leased devices.
Flows are distributed round-robin over the leased devices, so N flows on M devices take roughly N/M rounds. Every device is leased for the duration and released on exit, including on failure, so a crashed run cannot strand a device.
Returns per-flow results plus wall-clock time, the sequential estimate, and the resulting speedup. A failure on one device never masks a pass on another: each result is reported separately.
Inputs: flows (required), env, devices, timeout.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools have clearly distinct purposes (device listing, toolchain health, visual baselining, exploration recording), but run_parallel, run_and_assert, and debug_failure all execute Maestro flows, so their boundaries require careful reading to distinguish execution mode from assertion/diagnostics intent.
All names use consistent snake_case with verb-first phrasing, though a few are verb_and_verb (run_and_assert, explore_and_record) rather than the cleaner verb_noun pattern of list_device_pool or assert_visual. Still predictable and readable overall.
Seven tools is a well-scoped set for a mobile test orchestration server, with each tool covering a meaningful phase (discovery, health, execution, assertion, debugging, recording) and no filler.
The surface covers device discovery, health, parallel runs, assertions, visual baselining, failure debugging, and flow recording. A gap exists: assert_visual explicitly references an update_baseline tool that is not actually present in the set, though core lifecycle workflows are otherwise covered.
Maintenance
Related MCP Connectors
Let AI agents control Android and iOS devices on Mobilerun Cloud: screen, input, apps, workflows.
Agentic AI quality engineering: run, debug and triage tests on real browsers and devices
Launch and verify high-fidelity mobile simulations from an AI agent.
Give your AI agent a real cloud Android phone: push APKs, drive it, get screenshots and logs.
Related MCP Servers
AlicenseNot gradedqualityBmaintenanceMaestro is the simplest and most effective UI testing framework for Mobile and Web. Maestro MCP allows you to control emulators, interact with apps, write and automatically debug UI tests on Claude Code, Cursor or Windsurf.16,539Apache 2.0
MCP Appiumofficial
AlicenseAqualityAmaintenanceEnables AI assistants to automate mobile app testing and development for iOS and Android through natural language interactions. Supports intelligent element identification, session management, automated test generation, and comprehensive device interactions including clicks, swipes, screenshots, and app management.3218,310 npm524Apache 2.0
agentlaneofficial
AlicenseAqualityBmaintenanceRun several AI coding agents on one machine, each with its own ports, dev servers, database and simulator, emulator or browser. Works with Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI and Antigravity, on web, iOS and Android.31,160 npm2MIT- AlicenseBqualityCmaintenanceEnables AI assistants to automate Android and iOS mobile apps through natural-language interactions, intelligent element location, session management, screenshots, and automated test generation.40Apache 2.0