UIAutomator2 MCP Server is an MCP server that connects LLM clients to Android devices using the UIAutomator2 testing framework and Android Debug Bridge. Built with FastMCP, it is intended for mobile developers, QA automation engineers, and AI agent builders who need to control Android applications and hardware programmatically. The server enables an AI agent to execute low-level ADB commands, manage installed packages, capture screen images, and inspect live device state. It also exposes high-level user interface actions such as tapping on UI elements by text or selector, typing text strings, swiping across the screen, scrolling through lists, and waiting for UI components to appear. By bridging Claude or other MCP-compatible assistants to physical devices or emulators, it provides the capabilities needed to run automated mobile test workflows, verify app behaviors, and execute device operations through plain text instructions.
Category: Browser & Web Automation
Tags: android, mobile-automation, testing, uiautomator2
bash git clone https://github.com/GitDzreal93/uiautomator2-mcp.git cd uiautomator2-mcp pip install -e . 3. Open your client configuration file, such as ~/.cursor/mcp.json or Claude Desktop's mcp.json, and register the server: json { "mcpServers": { "android": { "command": "uv", "args": [ "--directory", "/path/to/uiautomator2-mcp", "run", "src/server.py" ] } } } 4. Alternatively, configure the command to run with python pointing directly to /path/to/uiautomator2-mcp/src/server.py.Part of MCP Servers
UIAutomator2 MCP Server is an open source server built on the FastMCP framework. It exposes Android device control and UIAutomator2 automation capabilities directly to Model Context Protocol clients, allowing AI agents to perform tasks like clicking elements, typing input, capturing screenshots, and running ADB commands on connected Android devices or emulators.
The server requires Python 3.10 or higher, the Android Debug Bridge command-line tool installed and reachable in your environment, and an active physical Android device or emulator connected via ADB.
It works with MCP-compatible clients including Claude Desktop and Cursor. Users configure the server entry inside their client configuration file using uv or direct Python commands pointing to the server entry point.
Yes, UIAutomator2 MCP Server is open source and distributed under the MIT License on GitHub.