Skip to content

GuideUpdated 11 min read

How to give your AI agent an Android phone: every option

Five ways to let Claude Code, Codex, ChatGPT or your own agent see and use an Android phone: adb from a shell, Appium, mobile-mcp, phone-harness and Lusor. For each one, how it connects, what the agent sees, how to set it up, what it costs and when it is the right pick.

By Josiah Richards

TL;DR

  • There are five common ways: adb from the agent's shell, Appium or appium-mcp, mobile-mcp, phone-harness, and Lusor. The first four cost nothing for a phone you own. Each needs a computer that reaches the phone over USB or Wi-Fi debugging. The agent can run on that computer, or reach it over the network through a remote Appium server or mobile-mcp's HTTP mode.
  • Every option shows the agent a screenshot, an element tree from Android's accessibility layer, or both. The tree is text the agent can tap by label or number. The screenshot covers icons and screens the tree misses.
  • Pick adb or mobile-mcp when the phone or emulator sits next to the agent. Pick Appium when you are building a test suite. Pick phone-harness for Python scripts or to drive your iPhone through iPhone Mirroring.
  • Pick Lusor when no computer should stay attached to the phone. Lusor Launcher connects your own Android over Wi-Fi or mobile data, or a Lusor Phone runs in the cloud. MCP apps such as Claude, ChatGPT and Claude Code reach either one at https://mcp.lusor.ai/mcp.

An AI agent that uses an Android phone needs two things: a way to see the screen, and a way to tap and type on it. This guide compares the five common ways to give it both, with the same five questions for each: how it connects, what the agent sees, how to set it up, what it costs to run, and when to pick it.

Lusor wrote this guide, and Lusor is one of the five options. Each section says plainly when another tool is the better choice. Every claim about another tool links to that tool's own docs or code.

The five options side by side

Ways to give an AI agent an Android phone
How it connectsWhat the agent seesCost to runPick it when
adb with a shell toolUSB or Wi-Fi debugging, from the computer that runs the agent's shellA PNG from screencap and an XML tree from uiautomator dump, which the agent reads itselfNothing. adb is part of the Android SDK Platform ToolsThe phone or emulator sits next to the agent and the job is a few fixed steps
Appium or appium-mcpAn Appium driver drives a UiAutomator2 server on the phone. appium-mcp runs the driver itself or uses a remote Appium serverThe page source as XML. Screenshots are saved to a file by defaultNothing beyond your own machine and phoneYou are building a test suite for CI, or want test code out of the session
mobile-mcpAn MCP server on the phone's computer, over stdio or Streamable HTTPA list of on-screen elements with coordinates, or a screenshotNothing for local phonesYou develop the app and want one free MCP server for emulators, simulators and USB phones
phone-harnessA Python CLI on the computer, using adb for AndroidVisible text boxes from the accessibility tree, or a screenshotNothing for your own phone. Hosted phones are paidYou want short Python scripts, and the same helpers for your iPhone through iPhone Mirroring
LusorLusor Launcher on your own Android, or a Lusor Phone in the cloud, through a remote MCP server or the Lusor APIThe element tree with tappable elements numbered, and a screenshotA Lusor plan. A Lusor Phone is billed per phoneNo computer should stay attached to the phone, or you want to hand off a whole task

The first four options run on a computer that reaches the phone over USB or Wi-Fi debugging. The agent can run on the same computer, or connect over the network: appium-mcp can drive a remote Appium server, and mobile-mcp can serve MCP over HTTP. Lusor puts the connection on the phone itself, so no computer stays attached to the phone.

Option 1: adb with a shell tool

How it connects. adb is a command-line tool that talks to a daemon on the phone, over USB or over Wi-Fi. Any agent that can run shell commands, such as Claude Code or Codex, can run it. The adb documentation covers both connections.

What the agent sees. Both, if it asks. screencap takes a PNG screenshot. uiautomator dump writes the screen's UI hierarchy as XML, with the text, ids and bounds of each element. The agent parses that XML itself, works out the center of an element, and taps it with input tap. The input command also types text, presses keys and swipes.

adb devices
adb exec-out screencap -p > screen.png
adb shell uiautomator dump /sdcard/window_dump.xml
adb pull /sdcard/window_dump.xml
adb shell input tap 540 1200
adb shell input text "hello"
adb shell input keyevent KEYCODE_BACK

Two details shape how an agent uses it. Each dump first waits for the screen to go idle, and fails with could not get idle state on a screen that never settles. And some screens return no tree at all, so the dump prints null root node and the agent has to fall back to the screenshot.

Setup.

  • Install the Android SDK Platform Tools, which include adb.
  • On the phone, turn on Developer options and USB debugging, plug it in and accept the prompt. For Wi-Fi on Android 11 and later, turn on Wireless debugging and pair with adb pair.
  • Check that adb devices lists the phone, then tell the agent to use adb.

What it costs to run. Nothing. You need a phone or an emulator, and a computer it is connected to.

When to pick it. When the phone or emulator sits next to the agent and the job is a few known steps: install a build, open a screen, take a screenshot. It is the wrong pick when the agent's computer cannot reach the phone, such as an agent in a cloud sandbox and a phone on your home Wi-Fi.

Option 2: Appium or appium-mcp

How it connects. Appium is a UI automation server with separate drivers per platform and client libraries per language, as the Appium introduction describes. For Android, the UiAutomator2 driver works through a server that runs on the phone itself. appium-mcp is the Appium project's MCP server. It bundles the UiAutomator2 driver, so an agent can start a session without a separate Appium server. Given a remoteServerUrl, it drives an existing Appium server instead, so the agent and the phone can be on different machines.

What the agent sees. Mostly the page source. appium_get_page_source returns the screen as XML, and appium_find_element finds an element by accessibility id, resource id, UiAutomator selector or XPath. appium_screenshot saves a PNG to disk and returns its path, unless the call asks for the image inline. An opt-in vision mode can find an element from a plain description.

Setup. For Appium itself, install the Android SDK with ANDROID_HOME set, a JDK, and then the server and driver, as the install guide and the UiAutomator2 driver guide show:

npm install -g appium
appium driver install uiautomator2
appium

For appium-mcp, the same Android SDK, JDK and Node.js are needed. Add the server to Claude Code, and set ANDROID_HOME in its environment:

claude mcp add appium-mcp -- npx -y appium-mcp@latest

What it costs to run. Nothing beyond your own machine and phone. Appium and appium-mcp are open source under the Apache 2.0 license.

When to pick it. When the goal is a test suite. Appium is built for scripted tests that run again in CI, with clients in several languages, and appium-mcp can generate Java and TestNG test code from a plain description. If you already run Appium or a device lab that speaks WebDriver, an agent can attach to it. It is more setup than the other options when all you want is an agent using one phone.

Option 3: mobile-mcp

How it connects. mobile-mcp is an MCP server for Android and iOS phones, emulators and simulators. It runs on the computer the phone is connected to. By default it reaches the phone through mobilecli, a device tool from the same makers. Its older adb-based robot runs only when MOBILEMCP_LEGACY_ROBOT=1 is set, as its server source shows. The agent connects over stdio on the same computer, or over Streamable HTTP from another machine when you start the server with --listen. Set MOBILEMCP_AUTH so that the HTTP server requires a token.

What the agent sees. Both. mobile_list_elements_on_screen lists the elements with their coordinates and properties, so the agent does not read raw XML. mobile_take_screenshot returns the image when the tree is not enough. Other tools install and launch apps, read device logs, list crash reports and run several actions in one call.

Setup. Install Node.js 20 or later and the Android Platform Tools, and connect a phone with USB debugging or start an emulator. Then add the server:

claude mcp add mobile-mcp -- npx -y @mobilenext/mobile-mcp@latest

What it costs to run. Nothing for local phones and emulators. It is open source under the Apache 2.0 license. Its makers also offer real devices in the cloud through the same tools.

When to pick it. When you build the app and the agent runs on your workstation. One free server covers Android emulators, iOS simulators and USB phones, installs the build you just made and reads its crash reports. For an agent on the same machine as the phone, mobile-mcp is the better choice than Lusor. It needs no account, no network hop and no payment.

Option 4: phone-harness

How it connects. phone-harness is a Python CLI. The agent writes a short script against its helpers and runs it from the shell. For an Android phone on your desk, it uses adb over USB or Wi-Fi, from macOS, Linux or Windows. It also drives an iPhone through the Mac's iPhone Mirroring window, with nothing installed on the phone. Its MCP server covers its hosted phones only.

What the agent sees. On Android, screen() returns the visible text as boxes from the accessibility tree, ready to tap, and screenshot() saves a PNG for icons. Its skill file notes that some screens, such as a playing video, give no tree. On a Mac it then reads the screenshot with Apple's text recognition instead.

Setup. Install it with uv, register its skill with your agent (phone-harness skill prints it), connect the phone with USB debugging, and check with phone-harness doctor:

uv tool install --python 3.12 --upgrade --force phone-harness
phone-harness doctor

PHONE_HARNESS_PLATFORM=android phone-harness <<'PY'
open_app("Settings")
print([o["text"] for o in screen()][:10])
PY

What it costs to run. Nothing for your own phone. It is open source under the MIT license. Its makers sell hosted Android and iPhone phones.

When to pick it. When you like Python scripts as the agent's way of working, or you want one set of helpers for both your Android and your own iPhone. The phone still has to be reachable over adb, and a phone locked with a PIN needs you to unlock it.

Option 5: Lusor

How it connects. Lusor puts the connection on the phone. On your own Android, the Lusor Launcher app signs the phone in to your workspace and connects it over Wi-Fi or mobile data. Its Lusor agent accessibility service reads the screen and taps, types and swipes. No computer or cable stays attached. Once the phone shows Ready for agents, you can lock it and put it down, and agents keep using it. The live view in Lusor pauses while the phone is locked and resumes when you unlock it. Without a phone to spare, a Lusor Phone is a cloud Android that Lusor runs, always on and private to your workspace. iPhone Lusor Phones are available through Contact sales.

Agents reach either phone through Lusor's remote MCP server at https://mcp.lusor.ai/mcp, or your own code calls the Lusor API. The same tools work with an iPhone, connected through the Lusor Mac app.

What the agent sees. Both. get_screen_state with detail: "full" returns the screen's elements with their text, and numbers the ones the agent can tap. phone_action taps an element by its number, and get_screenshot returns the image. In the API, the state endpoint returns the element tree as text, with the tappable elements numbered. Every API action can return the screen right after it, and one request can chain up to 20 actions, as the chains and capture docs show.

An agent can also hand over a whole job with run_task, and Lusor's own phone agent does it. run_task enables video recording by default, and get_task returns the video links when they're available. If your own Android is locked or its screen is off, the task can finish without a video.

Setup. For your own Android, on Android 12 or later:

  • In the Lusor app, open Phones, choose Add phone, then Personal Android.
  • On the phone, open lusor.ai/android, install Lusor Launcher, tap Sign in and enter its code on your computer.
  • On the phone, choose the workspace the phone should join and tap Add phone.
  • Turn on the Lusor agent accessibility service, and allow Lusor to run in the background and over other apps.
  • Add the MCP server to your agent and sign in with Lusor. In Claude Code, run the command below, then /mcp and Authenticate. The Connect an AI app guide covers ChatGPT, Claude, Codex, Cursor and more.
claude mcp add --transport http lusor https://mcp.lusor.ai/mcp

For a Lusor Phone, choose Lusor Android under Add phone instead. Your own code uses an API key with the direct control endpoints: read the numbered tree, then tap by number and get the new screen back.

curl "https://api.lusor.ai/v1/workspaces/$WS/devices/$DEVICE/state" \
  -H "X-Api-Key: $LUSOR_API_KEY"

curl "https://api.lusor.ai/v1/workspaces/$WS/devices/$DEVICE/tap" \
  -H "X-Api-Key: $LUSOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "index": 12, "capture": true }'

What it costs to run. Lusor needs a Lusor plan. The model work behind Lusor's own agent is paid from the plan's credits. A Lusor Phone is billed per phone each month, and agent time and direct control on it use Lusor Phone minutes. Your own phone never uses Lusor Phone minutes. The plans and credits page has the details, and the plans are on the pricing page.

When to pick it. When no computer should stay attached to the phone, and you do not want to run and expose a server for it. The agent can be ChatGPT or Claude in a browser, a coding agent in a cloud sandbox, or your own backend. When the phone should stay locked in your pocket while the agent works on it. When you want to hand over a whole task and get the result back. Lusor is the wrong pick for a test suite, where Appium fits, and for a phone on your desk with a local agent, where adb or mobile-mcp costs nothing. Over a sign-in connection, an agent asks for an app store install through run_task. The install_app tool, for the Lusor Phone app catalog, is on API-key connections. Neither uploads a build you just made.

Which should you choose?

  • The phone or emulator is next to the agent. Start with adb. Move to mobile-mcp when you want named tools and a parsed element list instead of raw XML.
  • You are writing tests. Use Appium. appium-mcp lets an agent explore the app and write the test code.
  • You want Python scripts, or your own iPhone too. Use phone-harness.
  • No computer should stay with the phone, or the phone has to stay in your pocket. Use Lusor, with your own Android through Lusor Launcher or a Lusor Phone in the cloud.

Whichever you pick, give the agent both the element tree and a screenshot. The tree makes taps exact, and the screenshot covers the screens the tree cannot read. For what decides how fast a phone agent works, read where a phone agent's time goes. For the full list of Lusor's MCP tools, read what an MCP server for real phones should expose.

Frequently asked questions

How do I give my AI agent an Android phone?

Five common ways. Let the agent run adb commands from its shell. Run Appium, or its MCP server appium-mcp. Add the mobile-mcp server. Install phone-harness and let the agent run its Python helpers. Or connect the phone to Lusor and add Lusor's remote MCP server. The first four need a computer that can reach the Android device: a physical phone over USB or Wi-Fi debugging, or an emulator running on that computer. The agent can run on that computer or connect to a server on it. Lusor needs no computer attached. It reaches your own Android through Lusor Launcher, or a Lusor Phone in the cloud.

Can an AI agent use adb to control an Android phone?

Yes. An agent with a shell tool can run adb exec-out screencap -p for a screenshot, adb shell uiautomator dump for the screen as XML, and adb shell input tap, text, swipe and keyevent to act. The phone needs USB or Wi-Fi debugging turned on, and adb has to reach it from the computer where the agent runs its commands.

Which way of giving an agent an Android phone is free?

adb, Appium, appium-mcp, mobile-mcp and phone-harness cost nothing for a phone or emulator you own. adb is part of the Android SDK Platform Tools, and the others are open source. Lusor needs a Lusor plan, and a Lusor Phone is billed per phone.

Should the agent read a screenshot or the element tree?

Both, for different things. The element tree from Android's accessibility layer gives exact text, labels and positions, so the agent can tap by label or number. A screenshot shows icons, images and screens where the tree is empty, such as a playing video. Every option in this guide can give the agent both. Neither covers more than the screen, so a long list takes a scroll and another read.

Can ChatGPT or Claude use my Android phone?

Yes, through a remote MCP server. Connect the phone to Lusor with Lusor Launcher. In ChatGPT, install Lusor from the app directory. Business, Enterprise and Edu workspaces can also add https://mcp.lusor.ai/mcp as a custom MCP server, as https://docs.lusor.ai/connect/chatgpt shows. In Claude, add https://mcp.lusor.ai/mcp as a custom connector, as https://docs.lusor.ai/connect/claude shows. mobile-mcp can also serve a remote app over Streamable HTTP, if you expose it from the computer the phone is connected to.

Do I need a physical Android phone?

No. adb, Appium, mobile-mcp and phone-harness all work with an Android emulator on your computer. Lusor runs cloud Android phones, called Lusor Phones, that stay on and are private to your workspace. iPhone Lusor Phones are available through Contact sales.