Android设备远程控制与屏幕理解引擎,基于uiautomator2+FastMCP,支持多设备连接池+心跳检测、UI层级解析(dump_hierarchy核心)、元素查找与点击、触控操作(点击/滑动/输入)、APP启停、消息收发、微信专用操作、AutoGLM视觉分析。触发: Android设备操作/微信自动化/屏幕理解/UI自动化/多设备管理
Integrations
Ghost in the Droid
Try itControl real Android and iOS devices, run apps, take screenshots, and execute on-device inference via Ghost in the Droid MCP server (62 tools).
What it does
Control real Android and iOS devices, run apps, take screenshots, and execute on-device inference via Ghost in the Droid MCP server (62 tools).
The skill document
Ghost in the Droid
Ghost in the Droid is an MCP server that gives any LLM agent a real Android or iOS device as its body. 62 tools covering tap, swipe, type, screenshot, screen-tree reading, app launch, camera, TTS, crash reports, batched execution, and on-device inference.
Install: pip install ghost-in-the-droid
Repo: https://github.com/ghost-in-the-droid/android-agent
When to use this skill
Use Ghost in the Droid when the user wants to:
- Control an Android phone or tablet via ADB
- Control an iPhone or iPad via WebDriverAgent
- Take screenshots of a real device screen
- Tap, swipe, type, or scroll on a device
- Launch or interact with mobile apps
- Run on-device inference (llama.cpp, MediaPipe, MLX)
- Automate mobile workflows end-to-end
- Spin up Android emulators via Docker+KVM pools
Setup
1. Install the MCP server
pip install ghost-in-the-droid
2. Add to your MCP config
For Claude Code (~/.claude/claude_code_config.json):
{
"mcpServers": {
"ghost-in-the-droid": {
"command": "python",
"args": ["-m", "ghost_in_the_droid"]
}
}
}
For OpenClaw:
openclaw mcp add ghost-in-the-droid --command "python -m ghost_in_the_droid"
3. Android prerequisites
# Install ADB
sudo apt install android-tools-adb # Linux
brew install android-platform-tools # macOS
# Connect device (USB or TCP)
adb devices
4. iOS prerequisites
WebDriverAgent must be installed and running on the target device. See the iOS setup guide.
Core tool reference
Screen interaction
| Tool | What it does |
|---|---|
tap | Tap at coordinates or element |
swipe | Swipe between two points |
type_text | Type text into focused field |
press_key | Press a key (HOME, BACK, ENTER, etc.) |
scroll | Scroll up/down/left/right |
long_press | Long press at coordinates |
Screen reading
| Tool | What it does |
|---|---|
screenshot | Capture device screen as image |
screen_tree | Get UI accessibility tree (for clicking elements by label) |
find_element | Find element by text, id, or class |
get_screen_text | OCR-extract all visible text |
App management
| Tool | What it does |
|---|---|
launch_app | Launch app by package name |
close_app | Close app |
install_apk | Install APK from path or URL |
list_apps | List installed apps |
clear_app_data | Clear app storage |
Device info
| Tool | What it does |
|---|---|
list_devices | List connected ADB devices |
device_info | Get device model, OS, battery, etc. |
get_clipboard | Read device clipboard |
set_clipboard | Write to device clipboard |
On-device inference
| Tool | What it does |
|---|---|
run_llm | Run inference via llama.cpp on-device |
run_mediapipe | Run MediaPipe model on-device |
run_mlx | Run MLX model (iOS/macOS) |
Emulators (Docker+KVM)
| Tool | What it does |
|---|---|
create_emulator | Spin up new Android emulator |
list_emulators | List running emulator pool |
destroy_emulator | Tear down emulator instance |
Batching
| Tool | What it does |
|---|---|
run_flow | Execute a sequence of actions as one atomic batch |
run_skill | Replay a saved skill (recorded interaction) |
Usage patterns
Take a screenshot and describe what you see
1. Call screenshot → get base64 PNG
2. Pass to vision model for description
Find and tap a button by label
1. Call screen_tree → get accessibility tree
2. Find element with target label
3. Call tap with element bounds
Automate a login flow
1. launch_app("com.example.app")
2. screenshot → verify login screen
3. tap(username_field)
4. type_text("user@example.com")
5. tap(password_field)
6. type_text("password")
7. tap(login_button)
8. screenshot → verify logged in
Multi-device targeting
Always use device_id parameter to target a specific device when multiple are connected:
tap(x=100, y=200, device_id="emulator-5554")
screenshot(device_id="R3CN20ABCDE")
Tips
- Always call
list_devicesfirst to confirm devices are connected - Use
screen_treeover coordinate-based tapping when possible — it survives resolution changes run_flowis much faster than individual tool calls for scripted sequences- For iOS, WebDriverAgent must be already running on the target device before using any iOS tools
- On-device inference tools require the model to be pre-loaded on device; call
run_llmwith aloadaction first
Related skills
Use the longarm Android remote-control app through its HTTP API or MCP server. Trigger when the user asks to remotely tap, long-press, swipe, scroll, pinch,...
Ghost (ghost.org). Use this skill for ANY Ghost request — reading, creating, and updating data. Whenever a task involves Ghost, use this skill instead of cal...
Control a real phone from OpenClaw via a local MCP relay. Use when the user asks to operate a phone (open apps, tap, input, take screenshots), run an AI automation task on a connected Android/iPhone device, check the current phone screen or device info, or query/abort a running phone agent task. WAR
Control a real phone from OpenClaw via a local MCP relay. Use when the user asks to operate a phone (open apps, tap, input, take screenshots), run an AI automation task on a connected Android/iPhone device, check the current phone screen or device info, or query/abort a running phone agent task. WAR
Devicebase CLI — cross-platform Go CLI for remote Android, HarmonyOS, and iOS device control via HTTP API. Supports tap, swipe, text input, app launching, screenshots, UI hierarchy inspection, and more.