Uiautomator2 MCP Server logo

Uiautomator2 MCP Server

Controls Android devices through uiautomator2, with UI inspection, input, app management, screenshots, and STDIO or HTTP transport.

Install Uiautomator2 MCP Server

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "uiautomator2-mcp-server": {
      "command": "uvx",
      "args": [
        "uiautomator2-mcp-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

uiautomator2-mcp-server exposes Android device automation through the Model Context Protocol and the uiautomator2 library. It connects through ADB to physical devices or emulators, supporting actions such as screenshots, taps, swipes, text entry, app management, and UI inspection. Reach for it when an AI client needs to automate, test, inspect, or monitor Android interfaces without custom automation code. Local STDIO and remote HTTP modes support different deployment patterns, while multi-device operation allows one server to work with multiple phones.

Use cases

  • Automate repetitive Android app workflows
  • Run natural-language UI tests
  • Inspect Android UI hierarchies remotely
  • Check accessibility behavior
  • Monitor device health and status

Key features

  • 70+ Android interaction tools
  • Screenshot and UI hierarchy inspection
  • XPath-based UI filtering
  • Multi-device operation
  • STDIO and HTTP transports
  • TOML, YAML, and JSON configuration

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 5d ago via OSV.dev · uiautomator2-mcp-server (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars53Stargazers on the source repository.
Last commit2d agoMost recent push to the default branch.

How Uiautomator2 MCP Server works

What uiautomator2-mcp-server does

uiautomator2-mcp-server gives MCP-compatible AI clients tools for interacting with Android devices. Its scope covers both direct device control and UI inspection: an agent can capture screenshots, examine the interface hierarchy, locate relevant elements with XPath filtering, tap or swipe, enter text, and manage applications.

The package is aimed at conversational automation as well as repeatable engineering workflows. Example scenarios include navigating an app, searching for content, playing or switching videos, filling forms, and carrying out other sequences that would otherwise require handwritten UI automation. It also includes an AI-driven UI testing framework for automated test scenarios.

One server can work with multiple phones. That makes it suitable for device fleets, repeated health checks, or workflows that need to inspect more than one Android target.

How it works

An MCP client communicates with the server using the Model Context Protocol. The server passes device operations to uiautomator2, which uses ADB to reach a physical Android device or emulator. The device must have USB debugging enabled, and the host must be able to run adb from its PATH.

Two transport modes are available. stdio is intended for local MCP client integrations, while HTTP supports remote use. Tool filtering can limit the set of tools exposed to an AI client, reducing the available surface for a particular workflow. XPath filtering can also restrict UI dumps to the elements an agent needs, which helps reduce returned UI data.

Setup and configuration

Python 3.11 or newer and Android SDK Platform Tools are prerequisites when using the Python package. Install and run the package directly with uvx uiautomator2-mcp-server stdio, or use pipx run uiautomator2-mcp-server stdio. A regular pip installation is also available:

bash
python -m pip install uiautomator2-mcp-server

The installed command is u2mcp; the explicit transport subcommand is required, for example u2mcp stdio. Precompiled executables are available for Linux x86_64, Apple Silicon macOS, and Windows x64. Systems outside those binary targets can install from PyPI. The project also supports packaging a standalone executable with PyInstaller or Nuitka.

Configuration can be supplied through TOML, YAML, or JSON files, with automatic configuration-file discovery. The server can therefore be configured without putting every option directly into an MCP client command, although the specific configuration fields depend on the chosen setup.

Tools and capabilities

The tool set contains more than 70 operations across common Android automation tasks, including:

  • Capturing screenshots and inspecting the UI hierarchy
  • Clicking, tapping, swiping, and entering text
  • Managing installed or running applications
  • Filtering UI results with XPath
  • Selecting which tools an AI client can see
  • Running AI-driven UI tests
  • Operating across multiple Android devices

These capabilities support accessibility checks, app interaction prototypes, repetitive task automation, remote UI inspection, and periodic device status or health checks.

Limitations and notes

The host needs ADB in its PATH, and each Android target must have USB debugging enabled. Precompiled binaries are not published for Linux aarch64, Intel Macs, or musl-based systems such as Alpine; those environments use a package-based installation instead. The Linux binaries target the glibc profile associated with their manylinux build image, so older distributions may also need a PyPI installation.

The short executable name and the PyPI package name differ: use u2mcp after installation, but install uiautomator2-mcp-server. Local integrations normally use STDIO, whereas remote deployments should use the HTTP mode.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Uiautomator2 MCP Server

uiautomator2-mcp-server is an MCP server that connects AI clients to Android devices through uiautomator2 and ADB. Its main tools cover screenshots, UI inspection, taps, swipes, text entry, application management, XPath filtering, and AI-driven UI testing for physical devices or emulators.

Install it with `uvx`, `pipx`, or pip, then run the STDIO transport. For example, use `uvx uiautomator2-mcp-server stdio` or `python -m pip install uiautomator2-mcp-server` followed by `u2mcp stdio`. Python 3.11+ and ADB in PATH are required.

It requires an Android device or emulator with USB debugging enabled and `adb` available in the host PATH. The server uses uiautomator2 over ADB to perform UI actions and retrieve screenshots or interface information.

Yes. Cursor is named as an MCP client usage example, and the server provides a STDIO transport for local client integrations. Configure Cursor to launch the package with the `stdio` subcommand, and ensure Python or a supported executable setup and ADB are available.

Yes. One server can operate with multiple phones. This supports workflows such as repeated automation, device health checks, and UI inspection across more than one Android target, provided the devices are available through the host's ADB setup.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewUiautomator2 MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/uiautomator2-mcp-server?style=directory)](https://allmcps.com/mcp/uiautomator2-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/uiautomator2-mcp-server"><img src="https://allmcps.com/api/badge/uiautomator2-mcp-server?style=directory" alt="Uiautomator2 MCP Server on AllMCPs" /></a>