Maestro MCP Server
Use Maestro's MCP server to let your coding agent write, run, and debug mobile and web UI tests.
Maestro implements the Model Context Protocol (MCP), enabling direct integration coding agents like Claude Code, Claude Desktop, Cursor, GitHub Copilot, Codex, Codex Desktop, Gemini, Windsurf, and JetBrains AI Assistant (full list). For more information on MCP see What is MCP?.
How to Install Maestro MCP
Prerequisites
Install Maestro CLI
Any coding agent that supports MCP (full list)
How to Use the Maestro Viewer
Maestro MCP ships with Maestro Viewer - a web app that embeds an iOS simulator or Android emulator or physical device into your coding agent or browser. It shows the exact commands that Maestro MCP runs in real time, and enables full interactions with the embedded mobile device, allowing you to iterate end to end completely within the coding agent app of your choice.
The Maestro Viewer is exposed via the open_maestro_viewer MCP tool, so to open it simply ask your coding agent:
open the maestro viewer
Here's an example of the Maestro Viewer running in the embedded Cursor IDE browser:
How to Update Maestro MCP
The Maestro MCP is bundled inside the Maestro CLI, so upgrading the CLI upgrades the MCP server. After upgrading, your agent needs to reload the MCP connection to pick up the new binary.
MCP tools
list_devices
List all available local devices (Android emulators, iOS simulators, and Chromium for web) that can be targeted for automation.
inspect_screen
Get the current screen's view hierarchy as compact JSON. Call this before targeting elements, and re-call after any UI change.
take_screenshot
Take a screenshot of the current device screen. Useful when a visual helps disambiguate elements.
run
Execute Maestro flows. Accepts exactly one of { yaml } (inline YAML, preferred for exploration), { files } (specific .yaml files), or { dir, include_tags, exclude_tags }. Syntax is validated as part of the call.
cheat_sheet
Return the Maestro cheat sheet covering common commands, flow syntax, and best practices. The agent should call this before authoring unfamiliar commands.
list_cloud_devices
List valid { device_model, device_os } pairs available on Maestro Cloud. Call before run_on_cloud. OS versions must be passed verbatim (e.g. iOS-17-5, android-34).
run_on_cloud
Submit a flow (or folder of flows) to Maestro Cloud. Returns upload_id, project_id, and a dashboard URL immediately.
get_cloud_run_status
Poll the status and per-flow results of a Cloud run. Poll every 60s until the status is terminal (SUCCESS, ERROR, CANCELED, WARNING).
open_maestro_viewer
Returns the running Viewer URL.
What is MCP?
The Model Context Protocol is an open standard that provides a uniform interface for connecting Large Language Models to external data sources, tools, and services. MCP defines a client-server architecture where:
MCP Servers expose resources like data sources, APIs, and tools through a standardized interface.
MCP Clients, such as AI apps, consume these resources via the protocol.
Transport Layer handles communication using JSON-RPC 2.0 over stdio, HTTP with Server-Sent Events (SSE), or WebSocket connections.
The Maestro MCP server ships inside the Maestro CLI and exposes Maestro's authoring, device, and Cloud capabilities to your agent over stdio.
Last updated
