# Neverlow512/agent-droid-bridge [Health: Active]

**Category:** 📂 Browser Automation  
**Repository:** https://github.com/Neverlow512/agent-droid-bridge  
**GitHub Stars:** 22  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/neverlow512-agent-droid-bridge

## Description
MCP server giving AI agents programmatic control over Android devices and emulators via ADB. 11 tools covering UI inspection, screen interaction, ADB commands, and change detection.

## Tools
Capabilities this server exposes over MCP:

- **get_ui_hierarchy** — Returns the current Android screen as an XML UI hierarchy.

Use this when you need to locate element coordinates, read text, or find resource IDs to
interact with. Do not call this after every action — only call it when you actually need to
read screen content. To check if the screen changed after an action, use snapshot_ui before
the action and detect_ui_change after.
- **tap_screen** — A tap gesture at the given pixel coordinates on the Android screen.
- **swipe_screen** — A swipe gesture on the Android screen from (x1,y1) to (x2,y2) over the given duration.
- **type_text** — Text input into the currently focused Android input field.

Spaces are encoded automatically.
- **press_key** — A key event sent to the Android device using the given keycode integer.
- **take_screenshot** — A PNG screenshot of the current Android device screen with width, height,
and base64-encoded image data.
- **list_devices** — All Android devices currently visible to ADB, with their serial numbers,
connection state, and model names.
- **launch_app** — An Android app launched by its component name (package/activity).
- **execute_adb_command** — The output of an ADB command. Parsed safely via shlex and never passed to a system shell.
- **snapshot_ui** — Takes a lightweight snapshot of the current UI state and returns a short token.

Use this before performing an action (tap, swipe, launch, key press) when you only need to
confirm the screen changed afterward — not read its content. Pass the returned token to
detect_ui_change as baseline_token. This avoids loading the full XML hierarchy into context
unnecessarily. Do not use this when you need to read or interact with screen elements — use
get_ui_hierarchy for that.
- **detect_ui_change** — Polls the UI hierarchy after an action and returns when the screen content changes or the
timeout is reached. Returns changed status and elapsed time. By default, omits the XML
hierarchy for efficiency — set return_hierarchy=True to receive the full hierarchy.

For efficient change detection: call snapshot_ui before the action, perform the action, then
call detect_ui_change with baseline_token. Only use without baseline_token when you need to
wait for a slow transition (loading screens, animations). Do not use to read the current
screen state — use get_ui_hierarchy for that.
- **get_screen_elements** — Structured list of UI elements currently visible on the Android screen.

Returns elements filtered and shaped by the chosen mode. Prefer 'tappable' for
navigation and 'interactive' when you need XPath or bounds for ADB commands.
Only use 'all' as a last resort — it returns every node and can be large.
- **get_screen_text** — Returns all visible text on the current Android screen, sorted top-to-bottom.

Use this when you need to read what is on screen. Does not include coordinates
or element info — for tapping or interacting, use `get_screen_elements`.
- **check_device_capabilities** — Device capabilities and hardware profile for the connected Android device.

Use 'identity' to establish what device you are working with before starting a session.
Use 'security' when a task requires root permissions or you need to confirm privilege level.
Use 'hardware' when you need screen dimensions or memory constraints for layout decisions.
Use 'all' only when you need a complete profile and latency is not a concern.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "agent-droid-bridge": {
    "command": "uvx",
    "args": ["agent-droid-bridge"],
    "env": {
      "ADB_EXECUTION_MODE": "",
      "ADB_ALLOW_SHELL": "",
      "ADB_PATH": "",
      "ADB_EXTRA_TOOL_PACKS": "",
      "MCP_LOG_ENABLED": "",
      "MCP_LOG_DIR": ""
    }
  }
}
```

**Requires environment variables:** `ADB_EXECUTION_MODE`, `ADB_ALLOW_SHELL`, `ADB_PATH`, `ADB_EXTRA_TOOL_PACKS`, `MCP_LOG_ENABLED`, `MCP_LOG_DIR` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What Neverlow512/agent-droid-bridge MCP server does

Neverlow512/agent-droid-bridge MCP server connects an MCP-compatible AI client to Android devices and emulators through the Android Debug Bridge. It exposes structured operations for reading the current interface, sending input, launching applications, inspecting device state, and executing ADB commands.

The server is suited to mobile UI automation, app testing, development diagnostics, and dynamic analysis. An agent can inspect visible controls before acting, enter text into the focused field, send Android keycodes, capture screenshots, and check whether an action changed the interface. The optional `app_manager` tool pack adds package management, app lifecycle, APK extraction, permissions, and intent-related operations.

## How it works

The server runs over standard input/output and communicates with the connected Android target through ADB. With one device connected, it detects that device automatically. If several devices are visible to ADB, the server supports choosing the target.

For content inspection, `get_ui_hierarchy` returns the current XML hierarchy, while `get_screen_elements` provides shaped element data and `get_screen_text` returns visible text in reading order. `take_screenshot` returns a PNG as base64 data along with the screen dimensions.

For efficient state checks, an agent can call `snapshot_ui` before an action and pass its token to `detect_ui_change` afterward. This avoids requesting the full hierarchy when the agent only needs to know whether the screen changed. `detect_ui_change` can also return the hierarchy when needed.

## Setup and configuration

Neverlow512/agent-droid-bridge requires Python 3.11 or later and ADB installed on the host. The documented launcher is:

```bash
uvx agent-droid-bridge
```

Connect a physical Android device or start an emulator, then add the command and the `agent-droid-bridge` argument to the MCP client configuration. `ADB_PATH` can point to an ADB executable that is not on the system path. Set `ADB_EXTRA_TOOL_PACKS` to `app_manager` to load the additional application-management tools.

The server supports `ADB_EXECUTION_MODE` values of `unrestricted` and `restricted`. In restricted mode, shell commands must be permitted by the configured allowlist. `ADB_ALLOW_SHELL=false` disables shell commands regardless of execution mode. Optional JSONL session recording is enabled with `MCP_LOG_ENABLED=true` and requires a writable `MCP_LOG_DIR`.

## Tools and capabilities

The core tool set includes:

- UI hierarchy, screen element, and visible-text inspection
- Taps, swipes, text entry, and Android key events
- PNG screenshots with dimensions and encoded image data
- Device listing and hardware, identity, and security capability checks
- App launching by package/activity component
- Parsed ADB command execution
- Lightweight UI snapshots and change polling

The execution layer parses commands with `shlex` rather than passing them directly to a system shell. Tool availability is reported in the server’s startup instructions.

## Limitations and notes

The host must have ADB available and an Android device or emulator connected. The server does not provide a hosted device environment; it operates on targets visible to the local ADB installation. UI coordinates and app component names must correspond to the connected device and application. Arbitrary ADB access depends on the selected execution mode and shell settings, while the optional app-management features are not loaded unless explicitly enabled.

_Full upstream README: https://allmcps.com/mcp/neverlow512-agent-droid-bridge/readme_

