agent-device — Claude Code MCP server for mobile app automation
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.
claude mcp add agent-device -- npx -y agent-deviceWhat agent-device 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.
What it helps with
- 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
.adscript for CI - share device access across parallel agents
Example prompts for the agent
- 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
How to install agent-device
Platform CLI
claude mcp add agent-device -- npx -y agent-devicePlatform CLI
codex mcp add agent-device -- npx -y agent-deviceConfig file
{
"mcpServers": {
"agent-device": {
"command": "npx",
"args": [
"-y",
"agent-device"
]
}
}
}Config file
{
"servers": {
"agent-device": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"agent-device"
]
}
}
}Platform CLI
gemini mcp add agent-device npx -y agent-deviceStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about agent-device
How do I install agent-device in Claude Code?
Run claude mcp add agent-device -- npx -y agent-device. That registers the stdio MCP server and exposes its commands to the agent.
What does agent-device do?
It lets an agent control an app on a device or simulator: inspect the screen, tap, fill fields, wait, assert state and capture evidence. The same commands are reachable from the CLI and from Node.js.
What do I need before it works?
Node.js 22.12 or newer, and 24 or newer for web automation. Run agent-device doctor yourself first to check the environment is ready.