Local Android MCP
Operates a local Android device (USB or wireless ADB) through a constrained tool surface: list attached devices and authorization state, read allow-listed build properties, capture screenshots as PNG, dump the UIAutomator XML hierarchy, tap and swipe at bounded coordinates, type conservative text, press allow-listed navigation keys, list installed packages, and launch or force-stop apps. Includes a deviceless free form—no arbitrary shell, no install/uninstall/clear-data/reboot/file-transfer/root—plus a localhost-only web panel for choosing the default device and starting AVDs.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Local Android MCP
A local-only, model-agnostic MCP server and installer that lets GitHub Copilot, Codex, Claude, Cursor, Gemini, Devin/Windsurf, and other MCP clients operate an Android device through ADB.
The server contains no language model and calls no cloud API. The MCP client supplies the reasoning; this package supplies a deliberately constrained Android tool surface.
Requirements
Node.js 20 or newer
Android platform-tools (
adb)An Android device with USB debugging enabled, or an authorized wireless ADB device
Confirm the device before setup:
adb devices -lThe device state must be device, not unauthorized or offline.
Related MCP server: phone-control
Get the source
git clone https://github.com/manuelcabrera1193/droid.git
cd droid
npm ciThe GitHub repository is public. The npm package remains marked private to
prevent accidental registry publication; local installation is supported.
One-command multi-client setup
Install a self-contained global copy, detect the AI clients on this computer, review the plan, and apply it:
npm install
npm run install:global
local-android-mcp detect
local-android-mcp setup
local-android-mcp setup --yes --force
local-android-mcp doctor
local-android-mcp uisetup without --yes is always a read-only plan. The applied setup:
registers one stable
local-android-mcpcommand, never the source folder;configures every detected compatible client;
merges existing JSON/JSONC instead of replacing it;
creates timestamped sibling backups before changes;
uses vendor CLIs for Codex, Claude Code, and Devin;
refuses malformed configuration and conflicting entries unless
--forceis explicit.
--force is required for Codex, Claude Code, and Devin because their official
CLI may replace an existing same-named entry and does not expose portable
installer ownership metadata. Always inspect the plan first.
Limit setup to selected clients when needed:
local-android-mcp setup --client vscode,cursor,codex
local-android-mcp setup --client vscode --yes
local-android-mcp uninstall --client vscode --yesUninstalling a provider-CLI-owned entry (codex, claude-code, or devin)
requires --force because those formats do not expose portable ownership
metadata. Inspect the plan and provider configuration first.
Supported IDs are vscode, copilot, cursor, claude-code,
claude-desktop, codex, gemini, devin, and windsurf-legacy.
Windows configurations use cmd.exe with the absolute npm shim dynamically
resolved during setup, preventing an untrusted workspace from shadowing the
command. macOS and Linux use the stable global command directly. Rerun setup
after moving to another computer or changing the Windows Node installation.
Local device selector
Run:
local-android-mcp uiThe command starts an ephemeral web server bound only to 127.0.0.1, opens the
default browser, and remains active until you press Ctrl+C. From the panel you
can select or clear the default device, inspect authorization state, refresh a
screenshot, and start a configured Android Virtual Device. The page refreshes
its inventory automatically.
The selected card exposes Deseleccionar, which removes the saved preference
and returns to automatic selection. If Actualizar cannot reach the local
service, keep the terminal that runs local-android-mcp ui open. With a fixed
port, restarting local-android-mcp ui --port 3210 lets the same page renew its
local session on the next refresh.
The selection is read dynamically by the MCP server, so changing it does not require editing every AI client. Selection precedence is:
the
deviceargument supplied by an MCP tool;ANDROID_SERIALfrom the MCP client environment;the device saved by the local web panel;
automatic selection when exactly one authorized device exists.
Use local-android-mcp ui --no-open on a headless machine, or --port 3210
when a predictable localhost port is useful. The UI exposes no LAN listener,
uses a per-process request token, and does not call a cloud service.
See docs/CLIENT-COMPATIBILITY.md for exact
destinations and docs/AI-INTEGRATION.md for a guide
written for both developers and coding agents.
For a new computer, follow docs/INSTALL-MAC-WINDOWS.md.
Workspace-only setup (GitHub Copilot)
npm install
npm test
npm run smoke
npm run smoke:deviceThe repository-root .mcp.json is portable. It runs npm in the
workspace instead of containing an absolute path, so the whole folder can be
moved or copied to another computer. On the other computer, install Node.js and
ADB, run npm install, and open the folder in VS Code.
In VS Code:
Open this folder as the workspace.
Open the Command Palette and run MCP: List Servers.
Start or restart
local-androidif it is not already running.In Copilot Agent mode, ask:
List the connected Android devices using local-android.
GitHub Copilot's portable workspace format uses mcpServers; the older
.vscode/mcp.json format uses a different top-level key and is intentionally
not duplicated here.
Global, source-location-independent installation
To use the server from unrelated workspaces, install a packaged copy:
npm install
npm run install:globalThis builds an npm tarball and installs a copy globally. Moving or deleting the
source folder afterward does not break the local-android-mcp command. The
automatic setup command is recommended; examples/global-mcp.json
remains available for manual clients.
Common destinations:
GitHub Copilot CLI:
$COPILOT_HOME/mcp-config.json, or~/.copilot/mcp-config.jsonCodex:
$CODEX_HOME/config.toml, or~/.codex/config.tomlClaude Code:
$CLAUDE_CONFIG_DIR/.claude.json, or~/.claude.jsonA compatible workspace:
.mcp.jsonClaude Desktop: its
mcpServersconfiguration
Do not overwrite an existing global configuration file; merge only the
local-android entry.
Dynamic ADB and device selection
The server resolves ADB in this order:
ANDROID_ADB_PATHADB_PATHANDROID_SDK_ROOT/platform-tools/adbANDROID_HOME/platform-tools/adbadbfound onPATH
No repository, SDK, home-directory, or device path is hard-coded.
When exactly one authorized device exists, it is selected automatically. With
multiple devices, pass device to a tool or set ANDROID_SERIAL before the MCP
client starts.
Examples:
export ANDROID_SERIAL=emulator-5554
export ANDROID_ADB_PATH=/custom/android-sdk/platform-tools/adbThese variables are optional. Keep machine-specific values outside committed MCP configuration.
The UI also resolves the Android Emulator through ANDROID_EMULATOR_PATH,
EMULATOR_PATH, the active Android SDK, and finally PATH.
Exposed tools
Tool | Effect |
| List attached devices and authorization state |
| Read an allow-listed subset of build properties |
| Return the current screen as PNG |
| Return the UIAutomator XML hierarchy |
| Tap a bounded coordinate |
| Swipe between bounded coordinates |
| Type a conservative, shell-safe character set |
| Press an allow-listed navigation key |
| List package identifiers |
| Launch a validated package identifier |
| Stop an app without deleting its data |
Security boundaries
Commands use process argument arrays with local shell execution disabled.
There is no arbitrary
adb shelltool.Package names, coordinates, durations, keys, and text are validated.
Text containing shell metacharacters is rejected before reaching the device.
Commands have timeouts and output-size limits.
There are no install, uninstall, clear-data, reboot, file-transfer, or root tools.
MCP runs over local stdio and opens no listening network port.
ADB itself is a privileged debugging interface. Use a dedicated test device and review tool approvals in the MCP client.
Do not commit device screenshots, UI dumps, private design links, device identifiers, credentials, or signing keys. The repository excludes common local artifacts, and CI scans the Git history with Gitleaks. Test fixtures use synthetic device names and documentation-only network addresses.
Development and verification
npm run check # TypeScript without output
npm test # Build plus unit tests
npm run smoke # Start a real MCP client/server session and list devices
npm run smoke:device # Read device info, screenshot, and UI tree
npm pack --dry-run # Inspect the portable package contents
local-android-mcp detect --json
local-android-mcp setup --dry-runThe unit tests cover portable ADB discovery, device parsing and selection, argument construction, client detection, JSONC-preserving configuration merges, backup/conflict behavior, package validation, and remote-shell text rejection.
Documentation map
AGENTS.md: repository rules and implementation map for coding agents.llms.txt: compact discovery entrypoint for language models.docs/AI-INTEGRATION.md: implementation and project-integration contract.docs/CLIENT-COMPATIBILITY.md: supported clients and configuration ownership.docs/INSTALL-MAC-WINDOWS.md: portable setup on another macOS or Windows computer.docs/local-android.manifest.json: machine-readable capability manifest.
This server cannot be deployed
Maintenance
Related MCP Connectors
Melaya is a remote MCP server. It gives an assistant hands on your own Android phone and browser: it reads the screen through the accessibility tree, then taps, types and navigates inside the apps and sites you allow-list, with no per-app API. It also builds, schedules and runs agent pipelines across 6k+ connected tools. OAuth 2.1, nothing to install.
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
Remote MCP for Android CLI agent build gate, structured receipts, audit logs, and reviewer-ready evi
Give your AI agent a real cloud Android phone: push APKs, drive it, get screenshots and logs.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI agents and test runners to control Android devices via local ADB, including listing devices, tapping, swiping, typing, sending system keys, launching apps, and dumping UI hierarchy. Communicates over MCP stdio without exposing network listeners.-
- AlicenseNot gradedqualityBmaintenanceEnables controlling an Android device from an MCP client via ADB, including wireless debugging discovery, UI-tree inspection, and performing taps, swipes, typing, app actions, and shell commands without relying on screen coordinates.12 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables bounded, local-first Android device perception and interaction over ADB, including screenshots, UI hierarchy inspection, allowlisted key/app/URI actions, and guarded verified taps. It also exposes passive health, runtime status, capability, permission, and unified device-contract surfaces.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables Android device control over ADB through MCP tools that mirror CLI subcommands, including taps, swipes, text input, app launch/stop, screenshots, UI inspection, and running action sequences. Coordinates from screenshots are converted to screen coordinates automatically.MIT