Uiautomator2 Mcp Server

A MCP (Model Context Protocol) server that provides tools for controlling and interacting with Android devices using uiautomator2.

LLM Mart 0 views 0 listing impressions
Transport
Not stated
Package
—
Registry id
—

No install snippet on purpose. A working MCP config is a command, its arguments and an environment block — the last two are where API keys live, so this catalogue never stores them and cannot publish them. Follow the link above for the authors' own instructions.



Code of Conduct: Please follow our Code of Conduct when participating in this project.

An MCP server that provides tools for controlling Android devices using uiautomator2.

Use AI to automate your Android device: take screenshots, tap/swipe, manage apps, send text, and more.

📺 Demo

Conversational Android Automation

User says: "Search cat videos on xxx App then play the video and swap to the next video"

AI automatically:

Demo GIF

Bilibili Download Video

  • ✅ Launch app → Tap search → Enter keywords → Execute search → Tap result -> Swap to next video

Control Android devices with natural language, no coding required

Detailed example: .skills/douyin-search


✨ Features

  • 📱 Multi-Device - One server, many phones
  • 🔍 XPath Filtering - Dump only the UI elements you need — save tokens and speed up responses
  • 🎛️ Tool Filtering - Show the AI only the tools it needs — fewer hallucinations, better results
  • ⚡ Zero Setup - Run with uvx immediately, no installation needed
  • 📦 Standalone Executable - Bundle into a standalone app with PyInstaller or Nuitka — no Python runtime required
  • 🧰 70+ Tools - Click, swipe, type, apps, screenshots — everything you need
  • 🧪 Built-in Testing - Includes AI-driven UI test framework out of the box
  • 🔄 Two Modes - STDIO for local, HTTP for remote
  • ⚙️ Config Files - TOML/YAML/JSON config with auto-discovery
  • 🔒 Clean Code - Type hints, linted, formatted — easy to extend

🎯 Use Cases

Scenario Description
🧪 Automated Testing Run natural language UI tests with AI-driven test framework
⚡ Rapid Prototyping Quickly test Android app interactions without writing code
♿ Accessibility Testing Verify app accessibility features automatically
📊 Health Monitoring Periodic device health and status checks
🤖 Task Automation Automate repetitive tasks like form filling, navigation
🔬 Remote Debugging Inspect UI hierarchy and capture screenshots remotely

🏗️ Architecture

graph TD
    AI[AI Assistant<br/>Claude/GPT/etc.] --> MCP[MCP Protocol]
    MCP --> Server[u2mcp Server]
    Server --> uiautomator2[uiautomator2]
    uiautomator2 --> ADB[ADB]
    ADB --> Device[Android Device<br/>Physical/Emulator]

    style AI fill:#e1f5ff
    style MCP fill:#fff4e6
    style Server fill:#f3e5f5
    style uiautomator2 fill:#e8f5e9
    style ADB fill:#fff3e0
    style Device fill:#fce4ec

Migration from v0.1.x

If you're upgrading from v0.1.3 or earlier: The CLI now requires an explicit subcommand. Change your command from:

# Old (v0.1.3 and earlier)
u2mcp

to:

# New (v0.2.0+)
u2mcp stdio

All other commands remain the same (just add the transport subcommand).

Prerequisites


From the project's README.

Related servers

Portable, vendor-neutral home for agent skills, MCP servers, personas, and memory.

26 views

Test management over MCP: author cases, run manual executions, cut releases, read health

26 views

MCP server for MikroTik routers: firewall, NAT, routing, DHCP, DNS, WireGuard and more via SSH.

25 views

Korean apartment data: 45,000+ complexes, official prices, jeonse ratios, AI forecasts.

25 views