by callstack
Enables AI coding agents to automate, inspect, and verify mobile applications across iOS, Android, HarmonyOS, TV platforms, web, macOS, and Linux using a CLI, an MCP server, or a typed Node.js API.
Agent Device provides a live feedback loop for AI coding agents, allowing them to control and validate mobile apps by reading accessibility snapshots, interacting with UI elements, and capturing evidence such as screenshots, logs, and performance data.
npm install -g agent-device@latest (or npx -y agent-device for a one‑off run). Verify with agent-device doctor.agent-device open Contacts --platform ios, agent-device press @e2 --settle, agent-device screenshot ./evidence.png.agent-device mcp and configure your AI agent to call the exposed tools.import { createAgentDeviceClient } from 'agent-device'; const client = createAgentDeviceClient({ session: 'qa-run' }); then call methods like client.apps.open(), client.capture.snapshot(), client.interactions.press()..ad scripts or strict Maestro YAML for automated testing..ad scripts on pull requests, storing artifacts for audit.What platforms are supported? iOS, Android, HarmonyOS, tvOS, Android TV, Vega OS TV, web browsers, macOS, and Linux.
Do I need a physical device? Both simulators/emulators and physical devices are supported; remote clouds enable testing on real hardware.
How does it differ from Appium/Detox/Maestro? Agent Device is designed for on‑the‑fly AI decision making, providing accessibility snapshots and evidence per action, while traditional frameworks focus on pre‑written test suites.
Can I use it with React Native, Expo, and Flutter apps? Yes—Agent Device reads React Native component trees and works with Expo and Flutter on supported targets.
Is there an MCP server? Yes. agent-device mcp launches the standard stdio MCP server, exposing all CLI commands as structured tools.
Can I run it in CI? Absolutely. Record a session as a .ad script, replay it in CI pipelines, and publish screenshots, logs, and performance data as artifacts.
How do I integrate with a custom AI agent? Use the MCP server configuration or the typed Node.js client (createAgentDeviceClient) to invoke commands directly from your agent logic.
What credentials are required? No API keys are needed for local usage; cloud device integrations may require their own credentials.
Mobile app automation and verification for AI coding agents. Give coding agents a live app feedback loop through a CLI, built-in MCP server, or typed Node.js API.
Let your coding agent verify its changes in the running app. agent-device lets agents inspect, control, debug, and verify apps on iOS, Android, and HarmonyOS (simulators, emulators, and physical devices), plus tvOS, Android TV, Amazon Vega OS TV (Vega Virtual Device), web, macOS, and Linux. Agents read token-efficient accessibility snapshots instead of reasoning over screenshots alone, act through refs and selectors, and save evidence for review. It also coordinates device access across parallel agent worktrees and connects to remote device clouds.
Works with Claude Code, Codex, Cursor, Windsurf, Cline, Goose, and any agent that can run a CLI or connect over MCP, or as the runtime under agents you build with the AI SDK or Eve. Developers at Expensify, Shopify, and others use it to verify their apps.
Install the CLI and check setup. It requires Node.js 22.12 or newer; web automation requires Node.js 24 or newer. See Installation for target requirements.
npm install -g agent-device@latest
agent-device doctor
agent-device help workflow
Run doctor yourself before handing the CLI to an agent; help workflow links to the guides for debugging, replay, and profiling, and the installed help always matches the installed version.
Add a contact in the built-in iOS Contacts app:
# Start a session.
agent-device open Contacts --platform ios
# Inspect the screen. The example below shows the output; refs vary.
agent-device snapshot -i
# @e2 [button] "Add"
# Use the ref and wait for the UI to settle.
agent-device press @e2 --settle
# The diff includes:
# + @e7 [text-field] "First name"
agent-device fill @e7 "Ada" --settle
# The next diff shows changed values and current refs:
# - @e7 [text-field] "First name"
# + @e14 [text-field] "Ada"
# = @e15 [text-field] "Last name"
# Capture evidence and close the session.
agent-device screenshot ./contact-form.png
agent-device close
Refs are only valid from the latest output: after a --settle command, use the refs in its diff, and take a new snapshot only if the diff omits what you need. Snapshots come from the app's accessibility tree, so clear labels, roles, and test IDs make agent runs more reliable; use screenshots and video as evidence or when accessibility data is poor.

agent-device mcp starts the official stdio MCP server, exposing the installed commands as structured tools over the same execution path as the CLI:
{
"mcpServers": {
"agent-device": {
"command": "agent-device",
"args": ["mcp"]
}
}
}
See AI Agent Setup for per-client setup and when to prefer plain CLI over MCP.
createAgentDeviceClient() gives Node.js code typed access to the same commands, as model tools in your own agent or from orchestration code:
import { createAgentDeviceClient } from 'agent-device';
const client = createAgentDeviceClient({ session: 'qa-run' });
try {
await client.apps.open({ app: 'com.apple.Preferences', platform: 'ios' });
const snapshot = await client.capture.snapshot({ interactiveOnly: true });
const button = snapshot.nodes.find((node) => node.role === 'button');
if (button) await client.interactions.press({ ref: button.ref });
} finally {
await client.sessions.close();
}
See the Node.js API, the runnable examples, and the AI SDK and Eve integration guides.
.ad scripts for local use or CI. Export strict Maestro YAML when needed.See Commands for the commands and evidence each target supports.
With the CLI installed, prompts like these work end to end:
The same session and evidence model works at every step: the agent explores the app, captures evidence, saves a replay, runs it in CI, and moves onto remote devices.
| Path | Best for | Start with |
|---|---|---|
| Local | Trying commands and debugging apps on simulators, emulators, physical devices, macOS, and Linux. | Follow the Quick Start. |
| CI/CD | Automated pull request and merge validation with replay scripts and captured artifacts. | Try the EAS workflow template. |
| Cloud / remote | Linux runners, managed devices, and remote jobs. | Set up a remote proxy, connect a device cloud (BrowserStack, AWS Device Farm, Limrun), or contact Callstack for team QA. |
agent-device keeps device state in sessions. It sends commands to XCTest on iOS and tvOS, ADB and the snapshot helper on Android, HDC and ArkUI uitest on HarmonyOS, Vega CLI/VDA on the Vega Virtual Device, a local helper on macOS, and AT-SPI on Linux.
Support depth varies by target. Newer backends such as HarmonyOS and Vega OS cover a subset of commands; run agent-device capabilities --platform <platform> to see what a target supports.
Sessions are scoped to the caller's git worktree, and host-local device claims stop parallel agents from taking over each other's simulators and emulators. The same commands drive hosted devices on BrowserStack, AWS Device Farm, and Limrun.
agent-device uses the inspect-act-verify process from Vercel's agent-browser for mobile, TV, and desktop apps. Basic --platform web support runs agent-browser in the same session and replay system.
agent-device is a command-line tool and MCP server that lets AI coding agents inspect, control, and verify mobile apps and save evidence for review. It supports iOS, Android, HarmonyOS, TV, web, macOS, and Linux.
Yes. agent-device mcp starts the official stdio MCP server. The Quick start above has the client config, and AI Agent Setup covers per-client details.
Yes. agent-device supports native iOS and Android apps, plus React Native, Expo, and Flutter apps on supported targets. The commands and evidence vary by target.
The MCP server is one entry point to the same runtime used by the CLI and typed Node.js API. Sessions, device ownership, selectors, evidence, replay, CI workflows, and cloud routing stay consistent across all three.
Yes. The typed Node.js client is a public surface over that same runtime, so an agent you build inherits everything above. Start from the Node.js API, AI SDK, or Eve guides.
With agent-device, an agent reads app state and chooses each command at run time. Teams use Appium, Detox, and Maestro to write and maintain test suites. agent-device can complement them by saving its runs as .ad scripts or exporting them as strict Maestro YAML.
Yes. Record a run as an .ad script, replay it in CI, and keep the screenshots and logs as artifacts; the EAS workflow template is a working example.
Teams and developers at Callstack, JPMorgan Chase, Expensify, Shopify, Kindred, Total Wine & More, LegendList, HerLyfe, App & Flow, and others use agent-device.
See CONTRIBUTING.md.
agent-device is open source under the MIT license. Visit agent-device.dev or contact Callstack.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
{
"mcpServers": {
"agent-device": {
"command": "npx",
"args": [
"-y",
"agent-device",
"mcp"
]
}
}
}claude mcp add agent-device npx -y agent-device mcp