Skip to content
agent-device

agent-deviceMCP Server

Released
v0.20.10
MIT

Summary

Give a coding agent a live feedback loop on real mobile, TV and desktop apps — inspect, tap, type and capture evidence on iOS, Android and HarmonyOS over MCP or a CLI.

Features

  • Token-efficient accessibility snapshots with stable element refs and change diffs
  • Drives iOS, tvOS, Android, Android TV, HarmonyOS, Vega OS, macOS, Linux and basic web targets
  • Captures screenshots, video, logs, traces, network data, crash details and React profiles as evidence
  • Saves working interactions as .ad replay scripts for CI, or exports strict Maestro YAML
  • Worktree-scoped sessions and host-local device claims keep parallel agents off each other's devices
  • Connects to BrowserStack, AWS Device Farm and Limrun device clouds with the same commands
  • Available as a stdio MCP server, a CLI, or a typed Node.js API over one execution path

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it.
  3. Restart the agent — the "agent-device" tools will be available.
{
  "mcpServers": {
    "agent-device": {
      "command": "agent-device",
      "args": [
        "mcp"
      ]
    }
  }
}

Description

agent-device closes the loop between a coding agent and the app it is editing. Instead of writing a change and hoping it works, the agent opens the app on a simulator, emulator or physical device, reads the screen, drives the UI, and captures evidence a human can review on the pull request.

Why the accessibility tree, not screenshots

The server hands the model a token-efficient accessibility snapshot rather than an image. Elements come back as stable refs (@e7 [text-field] "First name"), and after a --settle command the tool returns a diff of what changed rather than the whole tree again. That keeps a multi-step interaction inside a sane context budget, and it means the agent acts on roles and labels instead of guessing at pixel coordinates. Screenshots, video and traces are still captured — as evidence, or as a fallback when a screen's accessibility data is poor.

What it reaches

iOS and tvOS through XCTest, Android and Android TV through ADB with a snapshot helper, HarmonyOS through HDC and ArkUI uitest, Amazon Vega OS through the Vega Virtual Device, macOS through a local helper, and Linux through AT-SPI. Basic --platform web support runs Vercel's agent-browser inside the same session and replay model. Coverage is not uniform — the newer HarmonyOS and Vega backends implement a subset of commands, and agent-device capabilities --platform <platform> reports what a given target actually supports.

Beyond a single session

Sessions are scoped to the caller's git worktree and host-local device claims stop parallel agents from stealing each other's simulators, which matters once several agents run at once. Working interactions can be saved as .ad replay scripts for CI, or exported as strict Maestro YAML. The same commands drive hosted devices on BrowserStack, AWS Device Farm and Limrun.

Three ways in

The built-in stdio MCP server (agent-device mcp) exposes the installed commands as structured tools over the same execution path as the CLI, so an agent that speaks MCP and one that just shells out get identical behaviour. A typed Node.js API (createAgentDeviceClient()) covers the third case: driving devices from your own orchestration code or as model tools in an agent you build yourself.

Built and maintained by Callstack, MIT-licensed, and requiring Node.js 22.12 or newer (24+ for web automation). Callstack documents production use at Expensify and Shopify.

Related MCP Servers

MCP: Engram

by Gentleman Programming

New

Persistent memory for coding agents as a single Go binary — SQLite and FTS5 behind MCP, an HTTP API, a CLI and a TUI, with no Node, Python or Docker required.

New

Replicate's official MCP server: search thousands of hosted models, read their schemas, and run predictions on image, video, audio and language models from inside an agent.

MCP: Hugging Face

by Hugging Face

New

Hugging Face's official remote MCP server — search and inspect models, datasets and Spaces, browse the Hub filesystem over hf:// URIs, and turn Gradio Spaces into callable tools.

Browse all MCP servers →