io.github.dockndevai/mcp-android

Registre officiel Sécurité

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

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package @dockndevai/mcp-android
Claude Code
claude mcp add mcp-android -e 'ANDROID_MODE=<ANDROID_MODE>' -e 'ANDROID_ADB_PATH=<ANDROID_ADB_PATH>' -e 'ANDROID_SERIAL=<ANDROID_SERIAL>' -e 'ANDROID_TIMEOUT_MS=<ANDROID_TIMEOUT_MS>' -e 'ANDROID_PACKAGE_ALLOWLIST=<ANDROID_PACKAGE_ALLOWLIST>' -e 'ANDROID_PROTECTED_PACKAGES=<ANDROID_PROTECTED_PACKAGES>' -e 'ANDROID_ALLOW_INSTALL=<ANDROID_ALLOW_INSTALL>' -e 'ANDROID_ALLOW_SHELL=<ANDROID_ALLOW_SHELL>' -e 'ANDROID_DRY_RUN=<ANDROID_DRY_RUN>' -e 'ANDROID_AUDIT_LOG=<ANDROID_AUDIT_LOG>' -- npx -y @dockndevai/mcp-android@0.1.0
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "mcp-android": {
            "command": "npx",
            "args": [
                "-y",
                "@dockndevai/mcp-android@0.1.0"
            ],
            "env": {
                "ANDROID_MODE": "<ANDROID_MODE>",
                "ANDROID_ADB_PATH": "<ANDROID_ADB_PATH>",
                "ANDROID_SERIAL": "<ANDROID_SERIAL>",
                "ANDROID_TIMEOUT_MS": "<ANDROID_TIMEOUT_MS>",
                "ANDROID_PACKAGE_ALLOWLIST": "<ANDROID_PACKAGE_ALLOWLIST>",
                "ANDROID_PROTECTED_PACKAGES": "<ANDROID_PROTECTED_PACKAGES>",
                "ANDROID_ALLOW_INSTALL": "<ANDROID_ALLOW_INSTALL>",
                "ANDROID_ALLOW_SHELL": "<ANDROID_ALLOW_SHELL>",
                "ANDROID_DRY_RUN": "<ANDROID_DRY_RUN>",
                "ANDROID_AUDIT_LOG": "<ANDROID_AUDIT_LOG>"
            }
        }
    }
}

Variables d'environnement

  • ANDROID_MODE Access mode: read-only | read-write | admin.
  • ANDROID_ADB_PATH Path to the adb binary (default: adb on PATH).
  • ANDROID_SERIAL Target device serial from `adb devices`. Empty = the only connected device.
  • ANDROID_TIMEOUT_MS Per-command adb timeout in milliseconds.
  • ANDROID_PACKAGE_ALLOWLIST Comma-separated package allowlist for launch/uninstall/clear. Empty = all.
  • ANDROID_PROTECTED_PACKAGES Packages that can be launched/inspected but never uninstalled or data-cleared.
  • ANDROID_ALLOW_INSTALL Enable install_apk / uninstall_app / clear_app_data (requires admin mode too).
  • ANDROID_ALLOW_SHELL Enable run_shell (arbitrary adb shell; requires admin mode too).
  • ANDROID_DRY_RUN Validate + log write/admin actions without executing them on the device.
  • ANDROID_AUDIT_LOG Emit a JSON audit line to stderr per guarded operation (default true).

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. mcp-android
  2. Quickstart
  3. Setup from source
  4. Tools
  5. Security model
  6. Run with Claude Desktop / Claude Code
  7. Develop
  8. License

mcp-android

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

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

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

npx -y @dockndevai/mcp-android

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

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

brew install android-platform-tools        # provides adb
adb 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

{
  "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

npm run dev
npm test          # security policy
npm run typecheck

License

MIT

Questions fréquentes

Qu'est-ce que io.github.dockndevai/mcp-android ?

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

Comment installer io.github.dockndevai/mcp-android ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add mcp-android -e 'ANDROID_MODE=<ANDROID_MODE>' -e 'ANDROID_ADB_PATH=<ANDROID_ADB_PATH>' -e 'ANDROID_SERIAL=<ANDROID_SERIAL>' -e 'ANDROID_TIMEOUT_MS=<ANDROID_TIMEOUT_MS>' -e 'ANDROID_PACKAGE_ALLOWLIST=<ANDROID_PACKAGE_ALLOWLIST>' -e 'ANDROID_PROTECTED_PACKAGES=<ANDROID_PROTECTED_PACKAGES>' -e 'ANDROID_ALLOW_INSTALL=<ANDROID_ALLOW_INSTALL>' -e 'ANDROID_ALLOW_SHELL=<ANDROID_ALLOW_SHELL>' -e 'ANDROID_DRY_RUN=<ANDROID_DRY_RUN>' -e 'ANDROID_AUDIT_LOG=<ANDROID_AUDIT_LOG>' -- npx -y @dockndevai/mcp-android@0.1.0. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour io.github.dockndevai/mcp-android ?

Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.

io.github.dockndevai/mcp-android est-il open source ?

Oui. Son code est sur GitHub sous licence MIT.

Qui maintient io.github.dockndevai/mcp-android ?

Il est publié par dockndevai. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.