# agent-device

Lets a coding agent drive the app that is already running: read the screen, tap, fill a field, grab a screenshot and keep the evidence.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 5149
- Author: callstack
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/callstack/agent-device
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/agent-device

## What it does

\`agent-device` is an MCP server and CLI for mobile app automation. The agent works from an accessibility snapshot instead of guessing from pixels, acts through refs and selectors, and writes evidence out for review. Targets include iOS, Android, HarmonyOS, tvOS, Android TV, Fire TV, Amazon Vega OS TV, plus web, macOS and Linux.

There are three ways in: the CLI, a bundled stdio MCP server started with `agent-device mcp`, and a typed Node.js API via `createAgentDeviceClient()`. Same commands, same execution path. It also arbitrates device access between parallel agent worktrees and can reach remote device clouds.

Node.js 22.12 or newer is required; web automation needs 24 or newer. Run `agent-device doctor` yourself before handing the CLI to an agent, otherwise the first call fails on a broken environment. Since snapshots come from the accessibility tree, clear labels, roles and test IDs in your app make runs far more dependable.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add agent-device -- npx -y agent-device
```

### Codex

**Platform CLI**
```bash
codex mcp add agent-device -- npx -y agent-device
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "agent-device": {
            "command": "npx",
            "args": [
                "-y",
                "agent-device"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "agent-device": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "agent-device"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add agent-device npx -y agent-device
```

## When to use it
- confirm a change inside the running app
- track down a slow React Native interaction
- attach screenshots and video to a pull request
- save a working flow as a `.ad` script for CI
- share device access across parallel agents

## Example prompts
- Open the Contacts app on iOS and list the interactive elements
- Press the add button and fill the first name field with Ada
- Take a screenshot of the form and close the session

## Similar
- [mobile-mcp](https://affpapa.org/en/nevibecode/mcp/mobile-mcp.md) — MCP server · ★ 9946
- [e2e](https://affpapa.org/en/nevibecode/mcp/e2e.md) — MCP server · ★ 11912
- [mcp](https://affpapa.org/en/nevibecode/mcp/sceneview-mcp.md) — MCP server · ★ 1348
- [Argent](https://affpapa.org/en/nevibecode/mcp/argent.md) — MCP server · ★ 3084
- [mcp](https://affpapa.org/en/nevibecode/mcp/buoy-gg-mcp.md) — MCP server · ★ 691
- [Ghost in the Droid](https://affpapa.org/en/nevibecode/mcp/ghost-in-the-droid.md) — MCP server · ★ 397

From the same set: [callstack/agent-device](https://affpapa.org/en/nevibecode/by/callstack/agent-device.md) — 5 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
