
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 分