What it does
mobile-agent-harness exposes Android device automation as MCP tools, a CLI and a hot-reloadable plugin runtime, built on a self-healing uiautomator2 bridge. Its tools cover screen observation (accessibility-tree snapshots, screenshots, OCR, screen evidence), actions such as taps, swipes, text entry and scrolling, app launch and control, shell and file access, event capture and task tracking. Selectors resolve against the live accessibility tree rather than screen coordinates. Each tool returns an ok envelope, and a false result carries a business error type that the caller can act on.
It suits development, testing and automation of the user's own devices. Per-app flows can be written as harness files made of selector steps with pre- and postconditions, drafted by exploration and checked by a lint command. Plugins placed in a plugins folder can register tools or capability providers at load time. For apps where a model's prior knowledge is weak, the project can load structural app surveys from the separate app-lore catalogue. Unlike droidrun, it needs no accessibility app installed on the device.
Running it requires Python 3.9 or later and adb on the PATH, with USB debugging enabled on the device. The device serial is set through environment variables. Observation can use an optional H.264 frame stream, and an external OpenAI-compatible vision endpoint can be configured. A test suite and tool listing can run without a connected device, and the server can be attached to any MCP client.
Limitations and requirements
Requires Python 3.9 or later, adb on the PATH and USB debugging enabled on the device. Messaging, banking and e-commerce apps run active anti-automation risk control, and the adb tier is unreliable on them. The project is intended for development, testing and the user's own device workflows. It does not provide root; a root provider is available only if the device already has su, and it is gated by a command allowlist.
Safety
Our team has not reviewed this resource. Only automated rules checked it; resources with high-risk signals are not published. These are signals, not a guarantee that installing it is safe. Try it in a sandbox project first.
- Runs code or changes an assistant's behaviour
Sources
- Official MCP Registry first seen 13 Nov 2026 · last seen 13 Nov 2026 · its page on the source
io.github.Aelindra/mobile-agent-harness
Android device automation for AI agents: MCP server, CLI, and plugin runtime over adb.
v0.5.0As shown on registry.modelcontextprotocol.io when we last read it