# Phone Harness

> Phone Harness is an open-source MCP server for mobile apps. Rust MCP server that lets AI clients observe and control Android phones over ADB. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Linux, Windows, macOS, API, Self-hosted
- **Repository:** https://github.com/zachdreamz/phone-harness-rust
- **MCP Registry name:** io.github.ZachDreamZ/phone-harness-rust
- **Categories:** [mobile apps](https://ai-powered.com/categories/mobile-apps)
- **Listing updated:** 2026-11-27

## About

Phone Harness connects an Android device to any MCP-compatible AI client through a single stdio server written in Rust. It reads the screen through uiautomator hierarchies and returns a compact list of indexed interactive elements, so a model can refer to buttons and fields by number rather than by pixel coordinates.

Actions such as taps, typing, swipes and app launches are sent to the device over ADB. Indexed actions are tied to the observation generation that produced them, which lets the server reject a request grounded on a stale view of the screen. The toolset also covers logs, mock GPS locations, clipboard access, orientation, screenshots, MP4 screen capture and recorded interaction traces that can be replayed.

The project suits developers and QA engineers who want an AI agent to drive a real handset for testing or automation over USB or Wi-Fi debugging. It is distributed as a native binary with no Python runtime needed.

## Features

- **Accessibility-based screen reading:** Reads uiautomator hierarchies and presents a compact, indexed view of interactive elements.
- **Generation-gated actions:** Indexed taps and typing are checked against the observation they were based on to avoid acting on stale screens.
- **ADB device control:** Sends taps, swipes, key presses, app lifecycle commands and clipboard operations to Android devices over ADB.
- **Session recording and replay:** Saves interaction traces as JSONL files that can be replayed later.
- **Screen capture to MP4:** Captures frames and encodes them to MP4 with ffmpeg for devices without screenrecord.
- **Batched commands:** Runs several actions in a single MCP round trip to reduce overhead.

## Good for

- Automating end-to-end tests of Android apps driven by an AI agent
- Letting an assistant navigate a phone to complete a multi-step task
- Simulating GPS locations for testing location-aware apps
- Collecting device logs and screen recordings while reproducing a bug
- Installing, launching and clearing data for apps during test runs

## Install

### Claude Desktop (Claude Desktop → Settings → Extensions)

```text
https://github.com/ZachDreamZ/phone-harness-rust/releases/download/v0.3.0/phone-harness-rust.mcpb
```

Download the bundle and open it with Claude Desktop, or drag it onto Settings → Extensions and click Install. This server is only published as a Claude Desktop bundle.

## Tools

From the tool list in its README, going by the names, 2 of 8 tools change data; 6 names don't say. From the server's own tool labels and tool names; not verified by us.

- `phone_observe`: Reads the screen and returns indexed elements with an observation generation.
- `phone_tap`: Taps an indexed element or coordinates on the device.
- `phone_type`: Types text into an indexed element or the focused field.
- `phone_swipe`: Performs a swipe gesture on the device.
- `phone_open_app`: Launches an installed app.
- `phone_set_location` (name suggests: changes): Installs a mock location provider with given coordinates.
- `phone_start_screen_recording` (name suggests: changes): Starts capturing the device screen.
- `phone_batch`: Runs multiple actions in one request.

## FAQ

### How is the server installed?

It can be installed from crates.io with cargo install phone_harness_rust, or by using a prebuilt binary registered with an MCP client.

### What is needed on the computer at runtime?

ADB must be available on the PATH, USB debugging must be authorized on the device, and ffmpeg is needed on the PATH for screen recording.

### Does Phone Harness work with banking apps?

Secure windows may return no pixels, so screenshots of such apps may be empty.

### Does mock location change the phone's GPS hardware?

No. It installs a mock location provider and does not override GNSS hardware.

### Is Phone Harness free?

Yes. Phone Harness is open source, so you can use and self-host it for free.

### What are the best alternatives to Phone Harness?

The closest alternatives to Phone Harness are android-use, Mobile Agent Harness, MCP Android, Pilotdroid and droidsight.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [android-use](https://ai-powered.com/mcp/android-use): android-use is an open-source MCP server for developer tools.
- [Mobile Agent Harness](https://ai-powered.com/mcp/mobile-agent-harness): Mobile Agent Harness is an open-source MCP server for developer tools.
- [MCP Android](https://ai-powered.com/mcp/mcp-android): MCP Android is an open-source MCP server for mobile apps.
- [Pilotdroid](https://ai-powered.com/mcp/pilotdroid): Pilotdroid is an open-source MCP server for mobile apps.
- [droidsight](https://ai-powered.com/mcp/droidsight): droidsight is an open-source MCP server for mobile apps.
- [Mobile Device MCP](https://ai-powered.com/mcp/mobile-device-mcp-2): Mobile Device MCP is an open-source MCP server for mobile apps.
- [Android Puppeteer MCP](https://ai-powered.com/mcp/android-puppeteer-mcp): Android Puppeteer MCP is an open-source MCP server for browser automation.
- [Android](https://ai-powered.com/mcp/android): Android is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/phone-harness
