Phone Harness
Provides tools for observing and controlling real Android devices via ADB, including UI hierarchy observation, taps/swipes/typing, app lifecycle management, screenshots and screen recording, clipboard access, GPS mocking, orientation control, logs, batching, crawling, and replay.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
PHONE HARNESS
A 40-tool Rust MCP server for real Android devices — built on rmcp, driven by ADB, zero Python runtime.
Overview
Phone Harness exposes an Android device to any MCP client through a single stdio server. Observation is accessibility-first: it reads uiautomator hierarchies, returns a compact indexed DOM, and rejects actions grounded against a stale observation generation. Actions are executed with ADB.
It is a native Rust rewrite of the original Python universal-phone-harness. The Python implementation remains available separately as a compatibility fallback.
+----------------+ stdio / MCP +-------------------+ ADB +----------------+
| MCP client | <------------------> | phone_harness | <--------> | Android device|
| (OpenCode…) | 40 tools, JSON-RPC | Rust, rmcp 3.12 | shell I/O | USB / WiFi |
+----------------+ +-------------------+ +----------------+Related MCP server: ARTEMIS MCP Server
Features
40 tools — observation, gestures, app lifecycle, logs, GPS mocking, screen recording, batching, crawling and replay.
Generation-gated grounding — indexed actions require the
observation_generationreturned byphone_observe.No Python required — a single 5 MB release binary.
Token-bounded output — compact DOM with interactive-only filtering by default.
Session recording — interaction traces as JSONL, replayable with text re-grounding.
Screen recording — frame capture encoded to MP4 with
ffmpeg(for devices withoutscreenrecord).Batch commands — multiple actions in one MCP round-trip.
Tool map
Group | Tools |
Observe & assert |
|
Input |
|
Navigation |
|
Screen |
|
Apps |
|
Clipboard |
|
Location |
|
Orientation |
|
Diagnostics |
|
Automation |
|
Install
crates.io: cargo install phone_harness_rust.
Prebuilt binary: copy target/release/phone_harness_rust.exe somewhere stable, then register it with your MCP client.
OpenCode global config — ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"phone_harness": {
"type": "local",
"command": ["D:\\path\\to\\phone_harness_rust.exe"],
"protocol": "legacy"
}
}
}
}Requirements at runtime: ADB on PATH or at D:\platform-tools\adb.exe, USB debugging authorized, ffmpeg on PATH for screen recording.
Build from source
cargo build --releaseOn Windows with the MSVC toolchain you need the Visual Studio C++ build tools and a Windows SDK (kernel32.lib, dbghelp.lib). build.ps1 in this repository sets LIB and uses the bundled linker when building from a plain shell.
Usage loop
phone_observe→ get[1],[2]… badges and anobservation_generation.phone_tap/phone_typewithindexand that generation.Text and coordinate selectors do not need a generation.
On a failed assertion, re-observe — don't reuse a stale generation.
{ "index": 3, "observation_generation": 12 }Verified on
Huawei JLN-LX1 (
JLN-LX1), Android 12, 1080×2388, ADB serialU4YYD22415503298.Mock GPS provider
oc-mockconfirmed throughdumpsys location.Screen recording produced a 2.67 s / 254 KB MP4 at 3 fps, verified with
ffprobe.
Known limitations
phone_wait_for_settleuses UI-hierarchy stability, not perceptual image diff.phone_save_screenshotwrites a raw framebuffer PNG; the SoM overlay is not implemented. Secure windows (banking apps) may return no pixels.phone_set_orientationchanges theuser_rotationsetting; some real devices do not physically rotate.phone_set_locationinstalls a mock location provider; it does not override GNSS hardware.phone_replay_traceandphone_crawl_appare simplified versions of their Python counterparts.phone_get_clipboardmay return empty on Android 12;phone_set_clipboardworks.
Registry identity
MCP Registry name:
mcp-name: io.github.ZachDreamZ/phone-harness-rust
Research credits
Capability ideas came from mobile-next/mobile-mcp, CursorTouch/Android-MCP, and the original universal-phone-harness. MCP transport is the official Rust SDK rmcp.
License
MIT — see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Give your AI agent a real cloud Android phone: push APKs, drive it, get screenshots and logs.
Cloud Android devices for AI agents: install an APK, read the screen, tap, type, read logcat.
Mobile sandboxes for AI agents: each agent gets its own cloud Android phone or iOS simulator over MCP, reads the screen, taps, types and installs your app. Android $0.01/min, iOS $0.03/min, parked phones free.
Let Claude, ChatGPT and other agents use your Android phone: see the screen, tap, type, open apps.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables controlling an Android device from an MCP client via ADB, including wireless debugging discovery, UI-tree inspection, and performing taps, swipes, typing, app actions, and shell commands without relying on screen coordinates.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants and test suites to drive real Android devices or emulators through MCP, executing natural-language automation and testing workflows while collecting screenshots, Logcat output, and device state.Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables MCP-compatible AI assistants to see and control Android devices through ADB and a fast device-control protocol, including screenshots, touch input, typing, app management, UI inspection, file transfer, shell commands, and audio/video streaming.801 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to control an Android phone by reading the screen, taking screenshots, tapping, typing, swiping, opening apps, and running multi-step tasks. It also supports on-device Android app testing and optional adb commands.713 npm2MIT