Secure ADB-based MCP server for AI assistants (Claude, OpenCode, VS Code). Read-only logcat, UI hierarchy, package listing, and allowlisted shell commands. TypeScript/Node.js. Install: npx @neem2004/android-mcp-server.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Android ADB MCP Server is a Model Context Protocol (MCP) server that lets AI assistants — such as Claude and OpenCode, or VS Code through its Copilot/agent integration — control Android devices over ADB securely. It exposes tools to read logcat, inspect the current UI hierarchy, list installed packages, and run restricted shell commands, all gated by an allowlist that mitigates arbitrary command execution.
A note on terminology: Claude and OpenCode are AI assistants. VS Code is not an AI — it is a code editor that hosts AI assistants (GitHub Copilot, and MCP-capable extensions) and is itself an MCP client. The server works with any MCP-capable client.
PATH (adb version must work), or located via ADB_PATH / ANDROID_HOME / standard SDK paths.This produces the compiled code in the dist/ folder.
⚠️ Important:
dist/is generated locally and is not committed to the repository. You must runnpm run buildbefore configuring your MCP client, or the server will fail to start.
💡 Quick start (published on npm): you can skip the clone and build entirely — the server is published as
@neem2004/android-mcp-serverand includes the compileddist/. Run it directly withnpx -y @neem2004/android-mcp-server, as shown in the configs below. The absolute path form targets a local clone (replaceYOUR_PATH_TOwith its location).
Each MCP client keeps its servers in a different file, with a different format. Below are the three most common setups, each with the published-package form (npx) and the local-clone alternative.
File: opencode.json at your project root, or ~/.config/opencode/opencode.json (global).
Local clone alternative — "command": ["node", "YOUR_PATH_TO/android-mcp-server/dist/index.js"].
File: %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS).
Local clone alternative — "command": "node" with "args": ["YOUR_PATH_TO/android-mcp-server/dist/index.js"].
File: .vscode/mcp.json in your workspace (or via the MCP: Open User Configuration command). VS Code uses servers as the top-level key (not mcpServers).
Local clone alternative — "command": "node" with "args": ["YOUR_PATH_TO/android-mcp-server/dist/index.js"].
Development note: instead of the compiled build you can run TypeScript directly via
tsxby replacing the argument withsrc/index.tsand usingnpx tsxas the command. Prefer the compiled build for reliability.
| Tool | Description | Arguments |
|---|---|---|
adb_get_logcat | Dumps the logcat buffer with optional filters | lines, filter_tag, log_level |
adb_clear_logcat | Clears the device log buffer | — |
adb_dump_hierarchy | Returns the current UI hierarchy (XML/text) | — |
adb_list_packages | Lists installed packages | filter, include_system |
adb_execute_shell | Runs a safe allowlisted shell command | command |
This server prioritizes safety over arbitrary command execution:
adb_execute_shell only accepts commands whose prefix is authorized (getprop, dumpsys, pm list). Anything else is rejected with a descriptive error. Command chaining (&&, ||, ;, |) and injection metacharacters are also blocked.execFile (no intermediate shell), avoiding metacharacter injection.The logic lives in
src/adb/security.ts; review it before broadening permissions.
If you do not have ADB yet:
PATH.brew install android-platform-tools, apt install adb).Verify with:
Your device should appear as device (not unauthorized/offline). The server will use ADB_PATH, then ANDROID_HOME/ANDROID_SDK_ROOT, then standard SDK locations, before falling back to adb on the PATH.
This project is 100% open source and independently maintained. If Android ADB MCP Server saves your team time or improves your automation workflows, please consider supporting its continued development.
Every contribution, however small, helps keep the project active, documented, and secure. Thank you for your support!
ISC
Android ADB MCP Server es un servidor del Model Context Protocol (MCP) que permite a asistentes de IA —como Claude y OpenCode, o VS Code mediante su integración con Copilot/agente— controlar dispositivos Android vía ADB de forma segura. Expone herramientas para leer el logcat, inspeccionar la jerarquía de la UI, listar paquetes instalados y ejecutar comandos shell restringidos, todo a través de una lista blanca que mitiga los riesgos de ejecución arbitraria.
Nota sobre terminología: Claude y OpenCode son asistentes de IA. VS Code no es una IA — es un editor de código que aloja asistentes de IA (GitHub Copilot y extensiones con soporte MCP) y que además es un cliente MCP. El servidor funciona con cualquier cliente compatible con MCP.
PATH del sistema (adb version debe funcionar), o localizado vía ADB_PATH / ANDROID_HOME / rutas estándar del SDK.Esto genera el código compilado en la carpeta dist/.
⚠️ Importante:
dist/se genera localmente y no se sube al repositorio. Debes ejecutarnpm run buildantes de configurar tu cliente MCP, o el servidor no arrancará.
💡 Inicio rápido (publicado en npm): puedes saltarte el clonado y la compilación — el servidor está publicado como
@neem2004/android-mcp-servere incluye eldist/compilado. Ejecútalo directamente connpx -y @neem2004/android-mcp-server, como muestran las configuraciones de abajo. La forma de ruta absoluta apunta a un clon local (reemplazaTU_RUTApor su ubicación).
Cada cliente MCP guarda sus servidores en un archivo distinto, con un formato propio. A continuación están las tres configuraciones más comunes, cada una con la forma de paquete publicado (npx) y la alternativa de clon local.
Archivo: opencode.json en la raíz de tu proyecto, o ~/.config/opencode/opencode.json (global).
Alternativa de clon local — "command": ["node", "TU_RUTA/android-mcp-server/dist/index.js"].
Archivo: %APPDATA%\Claude\claude_desktop_config.json (Windows) o ~/Library/Application Support/Claude/claude_desktop_config.json (macOS).
Alternativa de clon local — "command": "node" con "args": ["TU_RUTA/android-mcp-server/dist/index.js"].
Archivo: .vscode/mcp.json en tu workspace (o mediante el comando MCP: Open User Configuration). VS Code usa servers como clave raíz (no mcpServers).
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/neem2004-android-mcp-server)<a href="https://allmcps.com/mcp/neem2004-android-mcp-server"><img src="https://allmcps.com/api/badge/neem2004-android-mcp-server?style=directory" alt="Android MCP Server on AllMCPs" /></a>