Uiautomator2BLOCK
A MCP (Model Context Protocol) server that provides tools for controlling and interacting with Android devices using uiautomator2.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://pypi.org/project/uiautomator2-mcp-server/) [](https://github.com/tanbro/uiautomator2-mcp-server/releases) [](https://github.com/tanbro/uiautomator2-mcp-server/actions/workflows/ci.yml) [](https://codecov.io/gh/tanbro/uiautomator2-mcp-server)
[](https://lobehub.com/mcp/tanbro-uiautomator2-mcp-server)
[](README.md) [](README.zh-CN.md)
- 🇨🇳 中文说明
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:
[](https://www.bilibili.com/video/BV1wGF4zFEev/) [](assets/douyin-demo-2x.mp4)
- ✅ Launch app → Tap search → Enter keywords → Execute search
7422922f1de0OBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add uiautomator2-mcp-server -- None uiautomator2-mcp-server==0.3.3 stdio
Exposed tools (77)
55 read · 16 write · 6 destructive. Blast radius: 6 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
activity_wait_appear | read | |
app_auto_grant_permissions | read | |
app_clear | destructive | |
app_current | read | |
app_info | read | |
app_install | write | |
app_list | read | |
app_list_running | read | |
app_start | write | |
app_stop | write | |
app_stop_all | write | |
app_uninstall | destructive | |
app_uninstall_all | destructive | |
app_wait | read | |
clear_text | destructive | |
click | read | |
connect | read | |
delay | read | |
device_list | read | |
disconnect | read | |
disconnect_all | read | |
double_click | read | |
drag | read | |
dump_hierarchy | read | |
get_orientation | read | |
get_toast | read | |
hide_keyboard | read | |
info | read | |
init | read | |
long_click | read | |
open_notification | read | |
open_quick_settings | read | |
press_key | read | |
purge | destructive | |
read_clipboard | read | |
reset_toast | destructive | |
save_dump_hierarchy | write | |
save_screenshot | write | |
screen_off | read | |
screen_on | read | |
screen_record | read | |
screen_record_start | write | |
screen_record_stop | write | |
screenshot | read | |
send_text | write | |
set_focused_text | write | |
set_orientation | write | |
shell_command | read | |
show_toast | read | |
start_scrcpy | write | |
stop_scrcpy | write | |
swipe | read | |
swipe_down | read | |
swipe_ext | read | |
swipe_left | read | |
swipe_points | read | |
swipe_right | read | |
swipe_up | read | |
unlock | read | |
window_size | read | |
write_clipboard | write | |
xpath_click | read | |
xpath_click_nowait | read | |
xpath_exists | read | |
xpath_get_attrib | read | |
xpath_get_bounds | read | |
xpath_get_info | read | |
xpath_get_text | read | |
xpath_long_press | read | |
xpath_save_screenshot | write | |
xpath_screenshot | read | |
xpath_scroll | read | |
xpath_scroll_to | read | |
xpath_set_text | write | |
xpath_swipe | read | |
xpath_wait_appear | read | |
xpath_wait_gone | read |
Trust audit
BLOCKgrade D · trust 67/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (14)
console.print(" [white]sudo apt install adb[/white] # Debian/Ubuntu")console.print(" [white]sudo yum install android-tools[/white] # Fedora/RHEL")fix_suggestion="Install scrcpy: brew install scrcpy (macOS) or sudo apt install scrcpy (Linux)",
app_clear, app_uninstall, app_uninstall_all, clear_text, purge, reset_toast
.coveragerc
.mypy.ini
.pre-commit-config.yaml
.readthedocs.yaml
.ruff.toml
[pipx]: https://pipx.pypa.io/ "pipx is a tool to install and run Python command-line applications without causing dependency conflicts with other packages installed on the system."
curl -LsSf https://astral.sh/uv/install.sh | sh # Linux/macOS
curl -LsSf https://astral.sh/uv/install.sh | sh
curl -LsSf https://astral.sh/uv/install.sh | sh
system use found in code, not declared in the description
Gates applied: no_behavioural_pass.
7422922f1de0full audit observations/trust-audit/mcp-server/tanbro__uiautomator2-1.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 7422922f1de0 | BLOCK | D | 67 | first audit |
Questions
What is the Uiautomator2 MCP server?
A MCP (Model Context Protocol) server that provides tools for controlling and interacting with Android devices using uiautomator2.
What tools does Uiautomator2 expose?
77 in total: 55 read-only, 16 that write, and 6 that can delete or overwrite (app_clear, app_uninstall, app_uninstall_all, clear_text, purge). Every one is listed on this page with its risk.
Is Uiautomator2 safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (67/100) and found 3 critical or high issues in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 6 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Uiautomator2 need?
No credential environment variables were found in its source, so it appears to need none.
How does Uiautomator2 run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on PyPI as uiautomator2-mcp-server.
How current is this page?
The grade is for one exact copy of the source (7422922f1de0), read on 2026-10-08. The repository is watched and re-audited when it changes.