
Android
io.github.martingeidobler由 GitHub 账号 martingeidobler 发布v1.2.1更新于 Oct 27, 2026
Control Android devices and emulators via ADB — screenshots, UI automation, and logcat.
概览
通过 ADB 控制 Android 模拟器和真机,让助手截图、查看并点击界面元素、读取 logcat 日志。
- 可以做什么
- 列出已连接设备和 AVD、启动模拟器、读取设备信息
- 截取屏幕截图并读取界面元素层级
- 点击、长按、双击、滑动、滚动、输入文字、按键,并按 resource-id、文本或 content-desc 定位元素
- 读取和清空 logcat 日志,可按包名、日志级别和时间过滤
- 安装 APK、启动应用、查看前台 Activity、拉取文件,并执行任意 ADB shell 命令
- 适用场景
- 适合在 UI 测试、冒烟测试和缺陷记录中操作 Android 应用,让助手看到界面、与之交互并结合日志分析问题。无需在应用中集成 SDK,适用于任意应用。
- 运行要求
- 通过 npx 在本地运行,需要 Node.js 18+、含 platform-tools(ADB)和模拟器的 Android SDK,以及正在运行的模拟器或已连接设备。SDK 路径在 macOS 上自动探测,否则通过环境变量 ANDROID_HOME 指定。
安装
在 SourceWeft 中
- 打开 控制台中的 Android,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Android MCP Server
[npm version] [npm downloads] [License: MIT] [android-mcp-server MCP server] [Awesome MCP Servers] [SocketBadge]
MCP server for controlling Android emulators and devices via ADB. Gives AI assistants the ability to see, interact with, and debug Android apps — taking screenshots, tapping elements, reading logs, and documenting bugs.
npm Package | GitHub | Issues
[ezgif-3bbb68e918812643] ^ Sped up for better viewing. More demos and test cases.
Features
- 25 tools for complete Android device control
- Screenshot capture with intelligent compression (Sharp-based, max 1280px)
- UI tree inspection — read element hierarchy with bounds, text, resource IDs, and state
- Touch automation — tap, swipe, scroll, type text, press hardware keys
- Element targeting — find and tap elements by resource-id, text, or content-desc
- App lifecycle — install APKs, launch apps, inspect current activity
- Logcat integration — filter by package, log level, or timestamp
- Device management — list devices, start emulators, get device info
- Compound actions —
tap_and_waitcombines tap + settle + UI tree in one round trip - Persistent ADB shell — reuses a single shell session for faster command execution
- Device info caching — queries device properties once per session
- Multi-device support — target specific devices by ID
- Zero app modifications — works with any Android app via ADB, no SDK integration needed
Prerequisites
- Node.js 18+
- Android SDK with platform-tools (ADB) and emulator
- A running Android emulator or connected device
Finding your ANDROID_HOME
The server auto-discovers the SDK at ~/Library/Android/sdk (macOS) or via ANDROID_HOME. If your SDK is elsewhere, set ANDROID_HOME in the MCP config (see below).
To check:
Setup
Claude Code
This registers the server globally so it's available in all projects. Use --scope project instead to limit it to the current project.
If your SDK is not in the default location:
Claude Desktop
Add to your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
VS Code
Add to your VS Code settings (.vscode/settings.json):
Cursor
Add to your Cursor MCP config (~/.cursor/mcp.json):
Windsurf
Add to your Windsurf MCP config (~/.codeium/windsurf/mcp_config.json):
Project config (.mcp.json)
Add to your project's .mcp.json (checked into version control so your team gets it too):
Build from source
Available Tools
Device Management
Screenshot & UI Analysis
Interaction
Diagnostics
App Management
Example Workflows
Bug documentation
"Clear the logs, open the settings screen, tap the save button, then show me the logs and a screenshot"
Claude will: clear_logs → launch_app → tap_element → get_logs(package_name="com.example.app", level="E") → screenshot(save_path="./bugs/settings-crash.png")
UI testing
"Navigate through the login flow and verify each screen matches the designs"
Claude will use screenshot + get_ui_tree to see and understand each screen, tap_element/type_text to interact, and its vision capabilities to compare against mockups or descriptions.
Smoke testing
"Install the APK, launch the app, and tap through the main screens to check nothing crashes"
Claude will: install_apk → launch_app → navigate with tap_element → get_logs(level="E") to check for errors after each screen.
Element interaction
"Open Settings, search for 'display', tap the first result, then go back"
Claude will: launch_app(package_name="com.android.settings") → tap_and_wait(by="text", value="Search settings") → type_text("display") → tap_and_wait(by="text", value="Display") → press_key(key="back")
Demos & Prompting Guide
- DEMOS.md — copy-paste prompt scenarios you can try right now
- PROMPTING.md — best practices, performance tips, and common pitfalls
How It Works
The server communicates over stdio using the Model Context Protocol. All device interaction goes through ADB — no modifications to your app are required. Screenshots are captured in memory, compressed, and returned as base64 images that the AI can see and analyze visually.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
License
MIT - see LICENSE.
来源:README.md,提交 15a4b90
工具
0版本历史
1- v1.2.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分