Get the FREE Ultimate OpenClaw Setup Guide →

android

An MCP server that provides control over Android devices via adb

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio minhalvp-android-mcp-server path/to/uv --directory path/to/android-mcp-server run server.py

How to use

This Android MCP Server provides programmatic control over connected Android devices via ADB, exposing capabilities such as executing raw ADB commands, capturing screenshots, analyzing UI layout to identify clickable elements, and inspecting installed packages and their intent actions. Clients using MCP, such as Claude Desktop or compatible editors, can connect to this server and invoke the available tools to manage devices, automate tasks, or gather UI/output data from a connected device.

Key tools exposed by the server include: get_packages to list all installed packages on the device, execute_adb_command to run arbitrary ADB commands and retrieve their output, get_uilayout to retrieve information about clickable UI elements on the current screen, get_screenshot to capture a device screenshot, and get_package_action_intents to fetch non-data actions from the Activity Resolver Table for a given package. To use these, configure your MCP client to target the android server entry, then call the corresponding functions or endpoints provided by the server. The CLI/examples in the repository illustrate standard call patterns and return types for each tool.

How to install

Prerequisites:

  • Python 3.x
  • ADB (Android Debug Bridge) installed and accessible in your PATH
  • An Android device or emulator connected and authorized for debugging

Installation steps:

  1. Clone the repository
git clone https://github.com/minhalvp/android-mcp-server.git
cd android-mcp-server
  1. Install dependencies via uv (the project uses uv for management)
uv python install 3.x.x
uv sync
  1. Run the server (example using uv to run server.py from this directory)
# Adjust the paths to your environment as needed
path/to/uv --directory path/to/android-mcp-server run server.py
  1. Verify the server is running and reachable by your MCP client. Ensure ADB is connected to the device you intend to manage (use adb devices to verify).

Additional notes

Notes and tips:

  • Automatic device selection is recommended when only one device/emulator is connected; manual selection via a config.yaml is supported if multiple devices are present.
  • If multiple devices are connected and no device is specified, the server will emit an error listing available devices.
  • The configuration file config.yaml (optional) can specify device.name to target a specific device; for auto-selection, set name to null or leave it unset.
  • Ensure ADB is properly configured and that the target device is authorized for debugging before starting the MCP server.
  • The server uses uv for installation and management; refer to uv’s documentation for additional installation options and environment setup.

Related MCP Servers

Sponsor this space

Reach thousands of developers