
MCP server that lets AI assistants (Claude, OpenCode, VS Code) control Android devices securely via
MCP server that lets AI assistants (Claude, OpenCode, VS Code) control Android devices securely via ADB
·
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.git clone https://github.com/Neem2004/android-mcp-server.git
cd android-mcp-server
npm installnpm run buildThis 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).
{
"mcp": {
"android": {
"type": "local",
"command": ["npx", "-y", "@neem2004/android-mcp-server"],
"enabled": true
}
}
}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).
{
"mcpServers": {
"android": {
"command": "npx",
"args": ["-y", "@neem2004/android-mcp-server"]
}
}
}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).
{
"servers": {
"android": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@neem2004/android-mcp-server"]
}
}
}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.
npm test # runs the unit test suite
npm run build # compiles TypeScript to dist/
npm run dev # runs the server directly via tsx (development)| 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.
A ready-made SKILL.md that teaches an agent when and how to use this
server lives in skills/android-adb/. It is
compatible with any agent that reads the SKILL.md standard (Claude Code, Cursor,
Codex CLI, Copilot, OpenCode, and more).
It is also published as a free skill on the Agensi marketplace as Android ADB Control (category: Mobile Development).
The skill only provides instructions — the agent still needs this MCP server connected to access the
adb_*tools.
If you do not have ADB yet:
PATH.brew install android-platform-tools, apt install adb).Verify with:
adb devicesYour 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.git clone https://github.com/Neem2004/android-mcp-server.git
cd android-mcp-server
npm installnpm run buildEsto 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).
{
"mcp": {
"android": {
"type": "local",
"command": ["npx", "-y", "@neem2004/android-mcp-server"],
"enabled": true
}
}
}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).
{
"mcpServers": {
"android": {
"command": "npx",
"args": ["-y", "@neem2004/android-mcp-server"]
}
}
}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).
{
"servers": {
"android": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@neem2004/android-mcp-server"]
}
}
}Alternativa de clon local — "command": "node" con "args": ["TU_RUTA/android-mcp-server/dist/index.js"].
Nota de desarrollo: en lugar del build compilado puedes ejecutar TypeScript directamente con
tsxreemplazando el argumento porsrc/index.tsy usandonpx tsxcomo comando. Para máxima fiabilidad, prefiere el build compilado.
npm test # ejecuta la suite de tests unitarios
npm run build # compila TypeScript a dist/
npm run dev # ejecuta el servidor directamente con tsx (desarrollo)| Tool | Descripción | Argumentos |
|---|---|---|
adb_get_logcat | Vuelca el buffer de logcat con filtros opcionales | lines, filter_tag, log_level |
adb_clear_logcat | Limpia el buffer de logs del dispositivo | — |
adb_dump_hierarchy | Devuelve la jerarquía de la UI actual (XML/texto) | — |
adb_list_packages | Lista los paquetes instalados | filter, include_system |
adb_execute_shell | Ejecuta un comando shell seguro (lista blanca) | command |
Este servidor prioriza la seguridad frente a la ejecución arbitraria de comandos:
adb_execute_shell solo acepta comandos cuyo prefijo esté autorizado (getprop, dumpsys, pm list). Cualquier otra cosa se rechaza con un error descriptivo. También se bloquean encadenamientos (&&, ||, ;, |) y metacaracteres de inyección.execFile (sin pasar por un shell intermedio), evitando la inyección de metacaracteres.La lógica vive en
src/adb/security.ts; revísalo antes de ampliar los permisos.
Un SKILL.md listo para usar que le enseña al agente cuándo y cómo usar
este servidor está en skills/android-adb/. Es
compatible con cualquier agente que lea el estándar SKILL.md (Claude Code, Cursor,
Codex CLI, Copilot, OpenCode y más).
También está publicado como skill gratuito en el marketplace Agensi como Android ADB Control (categoría: Mobile Development).
El skill solo aporta instrucciones — el agente sigue necesitando este servidor MCP conectado para acceder a las tools
adb_*.
Si aún no tienes ADB:
PATH del sistema.brew install android-platform-tools, apt install adb).Verifica con:
adb devicesTu dispositivo debe aparecer como device (no unauthorized/offline). El servidor usará ADB_PATH, luego ANDROID_HOME/ANDROID_SDK_ROOT, luego rutas estándar del SDK, antes de caer a adb en el PATH.
Este proyecto es 100% open source y se mantiene de forma independiente. Si Android ADB MCP Server ahorra tiempo a tu equipo o mejora tus flujos de automatización, considera apoyar su desarrollo continuo.
Toda contribución, por pequeña que sea, ayuda a mantener el proyecto activo, documentado y seguro. ¡Gracias por tu apoyo!
ISC
Pick your client and paste the snippet. Each one is the same server, written the way that client expects it.
claude mcp add android -- npx -y @neem2004/android-mcp-server{
"mcpServers": {
"android": {
"args": [
"-y",
"@neem2004/android-mcp-server"
],
"command": "npx"
}
}
}code --add-mcp '{"name":"android","args":["-y","@neem2004/android-mcp-server"],"command":"npx"}'[mcp_servers.android]
command = "npx"
args = ["-y", "@neem2004/android-mcp-server"]Runs locally on your device. Your client starts the server itself, so nothing has to be hosted.
Paste this prompt into your agent. It reads this page and does the setup for you.
Read https://aiagentslisting.com/mcp/android-adb-mcp-server-2 to learn what the "Android ADB MCP Server" MCP server does and how to install it. Add it to my coding agent's MCP configuration as documented on that page, then confirm the server connects and list the tools it exposes.Agents can also browse this directory over MCP at https://aiagentslisting.com/api/mcp
| Name | What it does |
|---|---|
adb_get_logcat | Dumps and exits the Android logcat buffer (logcat -d; not a stream), returning newline-separated lines with blank lines removed. Optionally filters by tag, minimum log level and the last N lines. Use |
adb_clear_logcat | Permanently clears the device logcat buffer (logcat -c) and returns a confirmation message. All buffered log entries are lost; subsequent dumps start fresh. Run it before capturing a clean log stream. |
adb_dump_hierarchy | Returns the current UI hierarchy of the Android device as XML/text via uiautomator. Tries /dev/tty first and falls back to /sdcard/window_dump.xml. May return empty when no window is focused. Useful t |
adb_list_packages | Lists the packages installed on the Android device as one 'package:<name>' line each (third-party only by default). Optionally filters by a case-insensitive name substring and includes system packages |
adb_execute_shell | Runs a read-only shell command on the Android device, restricted to an allowlist of safe prefixes: getprop (read system properties), dumpsys (dump services) and pm list (list packages). Anything else |
Read live from the server on October 2, 2026.
Maintain this server? Claiming proves you own the listing and earns the last 4 points.
Claim this listingPaste this line near the top of your repository's README. The badge always renders the current score.
[](https://aiagentslisting.com/mcp/android-adb-mcp-server-2)Nothing comparable is listed yet.
v1.0.2v1.0.2 — TDQS passRelease notesv1.0.1v1.0.1 — Tool schema quality passRelease notesConnect to the AI Agents Listing MCP server at https://aiagentslisting.com/api/mcp using the HTTP transport and complete the sign-in when it asks. Then call the submit_review tool for the listing "android-adb-mcp-server-2" with a rating from 1 to 5 and a short note on what worked and what did not.No reviews yet
Be the first to share your experience with this tool.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.