Another - Android Device Control
You have access to an Android device through the Another MCP server. Use these tools to see what's on screen, interact with the device, and automate tasks.
Setup
The Another desktop app must be running with MCP Server enabled (on by default in Settings).
Configure your MCP client:
CODEBLOCK0
Workflow
Always follow this order:
- 1. List devices to see what's available
- Connect to establish a control session
- Screenshot to see the current screen state
- Act using touch, text, buttons, swipe, etc.
- Screenshot again to verify the result
- Disconnect when done
Available Tools
Device Management
| Tool | What it does |
|---|
| INLINECODE0 | List all connected Android devices |
| INLINECODE1 |
Connect to a device (starts scrcpy control session) |
|
another_disconnect_device | Disconnect from the current device |
Observation
| Tool | What it does |
|---|
| INLINECODE3 | Capture the screen as a PNG image |
Input
| Tool | What it does |
|---|
| INLINECODE4 | Press a hardware button: home, back, recents, power, volume_up, INLINECODE10 |
| INLINECODE11 |
Type text into the focused input field |
|
another_send_touch | Send a touch event (
down,
up,
move) at normalized coordinates (0.0-1.0) |
|
another_send_scroll | Scroll at a position with a given delta |
|
another_swipe | Swipe from one point to another (normalized 0.0-1.0 coordinates) |
Apps & Shell
| Tool | What it does |
|---|
| INLINECODE18 | Launch an app by package name (e.g. com.android.chrome) |
| INLINECODE20 |
Open a URL in the device's default browser |
|
another_shell | Run an arbitrary adb shell command and get the output |
WiFi
| Tool | What it does |
|---|
| INLINECODE22 | Switch a USB device to WiFi debugging mode |
| INLINECODE23 |
Connect to a device by IP address |
|
another_wifi_disconnect | Disconnect a WiFi device |
|
another_get_device_ip | Get the WiFi IP of a USB-connected device |
Coordinate System
Touch, swipe, and scroll tools use normalized coordinates from 0.0 to 1.0:
- -
(0.0, 0.0) = top-left corner - INLINECODE27 = bottom-right corner
- INLINECODE28 = center of screen
Common Patterns
Tap on something
CODEBLOCK1
Tap, then verify
CODEBLOCK2
Type into a field
CODEBLOCK3
Scroll down a page
CODEBLOCK4
Swipe to go back or navigate
CODEBLOCK5
Navigate with buttons
CODEBLOCK6
Open an app and interact
CODEBLOCK7
Find an element on screen
Take a screenshot, examine it to identify positions, then use the coordinates to interact. Screenshots are the primary way to understand what's visible on the device.
Run a shell command
CODEBLOCK8
Tips
- - Always screenshot first before interacting. You need to see the screen to know where to tap.
- Screenshot after actions to confirm they worked.
- Use shell commands for things that don't need the screen (checking battery, listing packages, getting device info).
- Swipe duration defaults to 300ms. Increase
duration_ms for slower, more deliberate swipes. - Connect before acting. Tools like pressbutton, sendtext, sendtouch, swipe require an active connection via
another_connect_device. - listdevices, shell, takescreenshot, wifi* tools work without a scrcpy connection, they only need adb.
Another - Android设备控制
您可以通过Another MCP服务器访问Android设备。使用这些工具查看屏幕内容、与设备交互以及自动化任务。
设置
必须运行Another桌面应用并启用MCP服务器(默认在设置中开启)。
配置您的MCP客户端:
json
{
mcpServers: {
another: {
url: http://localhost:7070/mcp
}
}
}
工作流程
始终遵循以下顺序:
- 1. 列出设备 查看可用设备
- 连接 建立控制会话
- 截图 查看当前屏幕状态
- 操作 使用触摸、文本、按钮、滑动等方式
- 再次截图 验证结果
- 断开连接 操作完成后
可用工具
设备管理
| 工具 | 功能说明 |
|---|
| anotherlistdevices | 列出所有已连接的Android设备 |
| anotherconnectdevice |
连接到设备(启动scrcpy控制会话) |
| another
disconnectdevice | 断开当前设备连接 |
观察
| 工具 | 功能说明 |
|---|
| anothertakescreenshot | 捕获屏幕截图(PNG格式) |
输入
| 工具 | 功能说明 |
|---|
| anotherpressbutton | 按下硬件按钮:home、back、recents、power、volumeup、volumedown |
| anothersendtext |
在聚焦的输入框中输入文本 |
| another
sendtouch | 在归一化坐标(0.0-1.0)上发送触摸事件(down、up、move) |
| another
sendscroll | 在指定位置按给定增量滚动 |
| another_swipe | 从一点滑动到另一点(归一化坐标0.0-1.0) |
应用与Shell
| 工具 | 功能说明 |
|---|
| anotherlaunchapp | 通过包名启动应用(例如 com.android.chrome) |
| anotheropenurl |
在设备默认浏览器中打开URL |
| another_shell | 运行任意adb shell命令并获取输出 |
WiFi
| 工具 | 功能说明 |
|---|
| anotherwifienable | 将USB设备切换为WiFi调试模式 |
| anotherwificonnect |
通过IP地址连接设备 |
| another
wifidisconnect | 断开WiFi设备连接 |
| another
getdevice_ip | 获取USB连接设备的WiFi IP地址 |
坐标系
触摸、滑动和滚动工具使用归一化坐标,范围从0.0到1.0:
- - (0.0, 0.0) = 左上角
- (1.0, 1.0) = 右下角
- (0.5, 0.5) = 屏幕中心
常见模式
点击某个位置
anothersendtouch { action: down, x: 0.5, y: 0.5 }
anothersendtouch { action: up, x: 0.5, y: 0.5 }
点击后验证
- 1. anothertakescreenshot (查看屏幕内容)
- anothersendtouch (点击目标位置)
- anothertakescreenshot (验证结果)
在输入框中输入文本
- 1. 使用anothersendtouch点击输入框
- anothersendtext { text: hello world }
向下滚动页面
anothersendscroll { x: 0.5, y: 0.5, dx: 0.0, dy: -1.0 }
滑动返回或导航
anotherswipe { fromx: 0.0, fromy: 0.5, tox: 0.5, to_y: 0.5 }
使用按钮导航
anotherpressbutton { button: home }
anotherpressbutton { button: back }
anotherpressbutton { button: recents }
打开应用并交互
- 1. anotherlaunchapp { package: com.android.chrome }
- 稍等片刻,然后anothertakescreenshot
- 按需交互
查找屏幕上的元素
截取屏幕截图,检查以确定位置,然后使用坐标进行交互。截图是了解设备上可见内容的主要方式。
运行Shell命令
another_shell { command: pm list packages }
another_shell { command: dumpsys battery }
anothershell { command: settings get system screenbrightness }
提示
- - 交互前务必先截图。您需要查看屏幕才能知道点击位置。
- 操作后截图以确认操作生效。
- 使用Shell命令处理不需要屏幕的操作(检查电池、列出包、获取设备信息)。
- 滑动持续时间默认为300毫秒。增加durationms可实现更慢、更谨慎的滑动。
- 先连接再操作。pressbutton、sendtext、sendtouch、swipe等工具需要通过anotherconnectdevice建立活动连接。
- listdevices、shell、takescreenshot、wifi_*工具无需scrcpy连接即可工作,它们只需要adb。