agent-device

Testing and QADeveloper tools

Open source device layer for AI agents: control mobile, web, TV, and desktop apps over MCP.

Your AI app calls the agent-device MCP server, which does the testing and QA and developer tools work and sends the result back to the chat.

About agent-device

agent-device is a community MCP server from callstack, filed in our directory under testing and qa and developer tools. Open source device layer for AI agents: control mobile, web, TV, and desktop apps over MCP.

agent-device runs on your own machine: your AI app starts it with the command npx -y agent-device@0.21.46 mcp and talks to it over standard input and output.

agent-device is listed in the official MCP registry as io.github.callstack/agent-device, version 0.21.46.

At a glance

Publisher
callstack (community)
Runs
Locally on your machine
Install from
Node.js package on npm: agent-device
Written in
TypeScript
License
MIT
GitHub stars
5,604
Official MCP registry
io.github.callstack/agent-device

How to set up agent-device

  1. Install Node.js on the machine that runs your AI app, because agent-device starts with npx and downloads its package on first run.
  2. Check the agent-device README for keys or settings; the registry lists none that agent-device requires.
  3. Add agent-device to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the agent-device tools to confirm the connection.
  5. Run one read-only task with agent-device first, and keep your app asking before each tool call until the results look right.

agent-device compared with similar servers

  • Redamon by samugit83 has fewer GitHub stars than agent-device (3.6k against 5.6k); both are community servers, and both run locally.
  • Crosspaste Desktop by CrossPaste has fewer GitHub stars than agent-device (2.8k against 5.6k); both are community servers, and both run locally.
  • Reticle by reticlehq has fewer GitHub stars than agent-device (1.3k against 5.6k); both are community servers, and both run locally.

Before you connect agent-device

  • Give agent-device its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each agent-device tool call until you trust what it does with them.
  • Treat text that agent-device fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for agent-device on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for agent-device

How marketing and sales teams put agent-device to work, by company size. Pick the size closest to yours and start agent-device on one use case.

Small business

  • A small business can use agent-device to test its booking or checkout flow after each update, so a broken button doesn't cost a week of sales.
  • Owners can have agent-device check emails and forms render correctly before a promotion goes out.
  • A small business with a developer can use agent-device to ship site and tracking fixes faster, with the AI reading the code it changes.
  • agent-device runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing teams can run agent-device on every landing page release, checking forms, tracking and copy before ads point at it.
  • Lifecycle teams can use agent-device to test email and signup journeys end to end, catching a broken step before customers do.
  • Growth engineers can use agent-device to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Start agent-device on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can plug agent-device into release gates, so marketing pages meet the same quality bar as the product.
  • Large web teams can use agent-device to test across locales, devices and accessibility rules at a scale no manual team can match.
  • Enterprise engineering teams can roll out agent-device with repo scopes and audit logs, so agents work only where they are allowed.
  • agent-device is a community server, so have security review the code and pin a version before agent-device touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

agent-device README

From callstack/agent-device on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

agent-device

Open source device layer for AI coding agents. Let coding agents control mobile, web, TV, and desktop apps on devices and simulators, locally or in the cloud, 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, Fire TV (Fire OS), 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.

agent-device powers mobile automation in e2e and T3 Code.

Quick start

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 you hand the CLI to an agent. help workflow links to the guides for debugging, replay, and profiling.

Drive an app from the CLI

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 valid only in 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.

Add MCP tools to your agent

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.

Script it from Node.js

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.

What agents can do

  • Inspect app state through accessibility snapshots, refs, and selectors, and profile React Native renders to find what makes an interaction slow.
  • Act on visible UI by tapping or pressing elements, filling fields, scrolling, making gestures, waiting, asserting state, and handling alerts.
  • Diagnose failures with screenshots, video, logs, traces, network data, performance samples, crash details, and React profiles.
  • Repeat workflows by saving working steps as .ad scripts for local use or CI. Export strict Maestro YAML when needed.

See Commands for the commands and evidence each target supports.

What to ask your agent

With the CLI installed, prompts like these work end to end:

  • "Implement the onboarding screen, run it on the iOS simulator and Android emulator, and attach screenshots."
  • "Reproduce this crash and capture the logs that lead up to it."
  • "Check whether this change causes unnecessary React Native re-renders."
  • "Explore the checkout flow once, save it as a replay script, and run it in CI."
  • "Verify this pull request on a physical device and attach reviewable evidence."

Next steps

Where to run agent-device

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, TestMu AI, Limrun), or contact Callstack for team QA.

How it works

agent-device keeps device state in sessions. It uses a local accessibility bridge for iOS Simulator snapshots and XCTest for iOS interactions, physical iOS, and tvOS; ADB and the snapshot helper on Android, Android TV, and Fire OS; HDC and ArkUI uitest on HarmonyOS; Vega CLI/VDA on the Vega Virtual Device; a local helper on macOS, including Electron and other Chromium-based apps through the accessibility tree; and AT-SPI on Linux.

Support depth varies by target. Some backends, such as HarmonyOS and Vega OS, cover a subset of commands; run agent-device capabilities --platform <platform> to see what a target supports. The capabilities matrix shows which commands each target, desktop, web, and cloud provider 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. Run agent-device device status to inspect ownership without a daemon, and agent-device device release --stale to release claims whose owner is reclaimable: its process exited, or a newer daemon replaced it, even if the replaced daemon still runs. The same commands drive hosted devices on BrowserStack, AWS Device Farm, TestMu AI, 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.

FAQ

What is agent-device?

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.

Is there an MCP server for mobile app automation?

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.

Does it work with React Native, Expo, Flutter, and native apps?

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.

How is it different from mobile MCP servers?

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.

Can I build my own agent or QA product on agent-device?

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.

How is it different from Appium, Detox, or Maestro?

With agent-device, an agent reads app state and chooses each command at run time. For stable, repeatable test suites, use e2e, a TypeScript testing framework for web and mobile apps. agent-device can also save its runs as .ad scripts or export them as strict Maestro YAML.

Can agent-device run in CI?

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.

Articles and videos

Articles
Videos

Who uses agent-device?

Teams and developers at Callstack, JPMorgan Chase, Expensify, Shopify, Kindred, Total Wine & More, LegendList, HerLyfe, App & Flow, and others use agent-device.

Documentation

Contributing

See CONTRIBUTING.md.

Made at Callstack

agent-device is open source under the MIT license. Visit agent-device.dev or contact Callstack.

Questions about agent-device

What is the agent-device MCP server?

Open source device layer for AI agents: control mobile, web, TV, and desktop apps over MCP. agent-device is maintained by callstack on GitHub at callstack/agent-device, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the agent-device MCP server?

Add agent-device to your AI app's MCP config with the command npx -y agent-device@0.21.46 mcp. In Claude Code, run claude mcp add --transport stdio agent-device -- npx -y agent-device@0.21.46 mcp. To run agent-device this way you need Node.js installed.

Does agent-device need an API key?

The registry lists no required keys for agent-device. Check the agent-device README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is agent-device an official MCP server?

No. agent-device is a community server maintained by callstack. Community servers can be excellent; read the code and the open issues before you give agent-device access to company data.

What license is agent-device under?

agent-device is released under the MIT license, according to its GitHub repository. The license covers the code of agent-device; the service it connects to has its own terms.