Mcp Android

io.github.dockndevai由 GitHub 帳號 dockndevai 發布v0.1.0更新於 Nov 4, 2026

Control Android devices over ADB from AI agents — safe-by-default, read-only by default, audited.

已驗證STDIO僅桌面效率與工作流開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理透過 ADB 控制以 USB 或無線連線的 Android 手機:查看畫面、點擊輸入、啟動應用程式、讀取通知。

可以做什麼
  • 檢視裝置:列出已連線裝置、讀取裝置資訊、截圖、匯出 UI 階層、查看目前應用程式。
  • 讀取應用程式與通知:列出已安裝應用程式、讀取待處理通知。
  • 操作介面:點擊、滑動、輸入文字、按鍵、啟動應用程式、開啟網址。
  • 在手機上設定鬧鐘與計時器。
  • 啟用後的管理操作:安裝 APK、解除安裝應用程式、清除應用程式資料、執行原始 adb shell 指令。
適用情境
適合希望助理在桌機上操作或檢視實體 Android 手機的情境,例如查看畫面上有什麼、自動化重複的點擊輸入流程、設定鬧鐘與計時器,或檢視通知。
執行需求
透過 npm 套件以 npx 在桌機本機執行,需要 Node.js 與 adb 執行檔(ANDROID_ADB_PATH,預設使用 PATH 中的 adb)。手機需開啟 USB 或無線偵錯並授權本機。以 ANDROID_MODE、ANDROID_SERIAL 及各項允許開關等環境變數設定;不需帳號或 API 金鑰。
安裝前請注意
它會操作實體裝置。預設為唯讀,但讀寫模式允許點擊、輸入、啟動應用程式、設定鬧鐘與計時器;管理模式搭配 ANDROID_ALLOW_INSTALL 或 ANDROID_ALLOW_SHELL 可安裝、解除安裝、清除資料及執行任意 shell 指令。除非必要請保持 ANDROID_MODE 為唯讀,使用 ANDROID_PACKAGE_ALLOWLIST 與 ANDROID_PROTECTED_PACKAGES,並注意只有當用戶端支援 MCP elicitation 時,破壞性工具才會暫停等待人工核准;ANDROID_DRY_RUN 可預覽寫入操作而不執行。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Android,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-android

[CI] [License: MIT] [npm]

A Model Context Protocol server to control an Android phone over ADB — the phone equivalent of the Mac-control servers. Claude can see the screen (screenshots + UI hierarchy) and tap, type, press keys, launch apps, set alarms/timers, and read notifications. Safe-by-default, with the suite's access-mode + flag model.

Runs on your computer and drives a phone connected by USB or wireless debugging (great for the Z Fold 7). It is not installed on the phone and does not need root.

iOS? A stock iPhone can't be controlled this way — Apple's sandbox forbids cross-app/system automation. See the separate mcp-ios repo for the realistic (Appium/WebDriverAgent over USB from a Mac) approach.

Quickstart

bash
brew install android-platform-tools        # provides adb# On the phone: Settings → Developer options → enable USB (or Wireless) debugging, then authorize this computeradb devices                                 # confirm your device shows "device"

Run it straight from npm — no clone or build needed:

bash
npx -y @dockndevai/mcp-android

Or add it to Claude Code in one line (start read-only):

bash
claude mcp add android -e ANDROID_MODE="read-only" -- npx -y @dockndevai/mcp-android

See docs/CLIENTS.md for Claude Desktop, Cursor, Codex, Windsurf, and VS Code configs.

Setup from source

bash
brew install android-platform-tools        # provides adbadb devices                                 # confirm your device shows "device"npm install && npm run build

Tools

Read (read-only+): list_devices, device_info, screenshot, ui_dump, current_app, list_apps, get_notifications

Write (read-write+): tap, swipe, input_text, press_key, launch_app, open_url, set_alarm, set_timer

Admin (admin): install_apk, uninstall_app, clear_app_data (need ANDROID_ALLOW_INSTALL), run_shell (needs ANDROID_ALLOW_SHELL; not registered otherwise)

The typical loop for driving the UI: screenshot → ui_dump (find bounds) → tap/input_text.

Security model

ConcernFlagDefault
What it can doANDROID_MODEread-only
Which packages in scopeANDROID_PACKAGE_ALLOWLIST(all)
Protected packages (never uninstall/clear)ANDROID_PROTECTED_PACKAGESsettings, systemui, gms
Allow install/uninstall/clearANDROID_ALLOW_INSTALLfalse
Allow raw adb shellANDROID_ALLOW_SHELLfalse
Interactive confirmation (destructive ops)MCP elicitation (client-driven)(on when the client supports it)
Preview without touching deviceANDROID_DRY_RUNfalse
Audit log (stderr)ANDROID_AUDIT_LOGtrue

When the connected client supports MCP elicitation, destructive tools (uninstall_app, clear_app_data, install_apk, run_shell) pause and ask the human to approve the exact action before it runs — the model can't approve on your behalf. When the client can't elicit, the access-mode + flag gates above are the control.

Run with Claude Desktop / Claude Code

json
{  "mcpServers": {    "android": {      "command": "node",      "args": ["/absolute/path/to/mcp-android/dist/index.js"],      "env": { "ANDROID_MODE": "read-write" }    }  }}

Example prompts

  • "Take a screenshot of my phone and tell me what's on screen."
  • "Set an alarm for 6:30am labeled Gym."
  • "Open the Clock app and start a 10-minute timer."
  • "What notifications do I have piling up?"

Develop

bash
npm run devnpm test          # security policynpm run typecheck

License

MIT

來源:README.md,提交 a3a3fd6

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Oct 14, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分