home / mcp / android mcp server
An MCP server that provides control over Android devices via adb
Configuration
View docs{
"mcpServers": {
"minhalvp-android-mcp-server": {
"command": "uv",
"args": [
"--directory",
"path/to/android-mcp-server",
"run",
"server.py"
]
}
}
}You can manage Android devices programmatically through ADB using this MCP server. It exposes commands for running ADB actions, capturing screenshots, analyzing UI layouts, and managing installed packages, all accessible by MCP clients you use in your preferred editor or desktop app.
To use this server with an MCP client, start the server using your MCP runtime and then connect your client to the Android MCP server. The server is designed to auto-connect when a single device is available or allow you to specify which device to target when multiple devices are connected.
Prerequisites you need before installing: - Python 3.x - ADB (Android Debug Bridge) installed and configured - An Android device or emulator connected to your development machine
# Step 1: Install the MCP runtime (uv) if you do not have it yet
uv python install 3.11
# Step 2: Synchronize dependencies
uv sync
# Step 3: Clone the Android MCP Server repository
git clone https://github.com/minhalvp/android-mcp-server.git
cd android-mcp-server
# Step 4: Start the server using the provided runtime command
uv --directory path/to/android-mcp-server run server.pyDevice selection can be automatic when only one device is connected or manual when multiple devices are present. To use automatic selection, ensure only one device is connected. For manual selection, create and edit a configuration file to specify the target device serial as shown below.
Example configuration for manual device selection (device name corresponds to the value shown by adb devices). You would create a file named config.yaml and set the device field to your device serial.
For auto-selection, you can set the device name to null or leave it undefined.
{
"type": "stdio",
"name": "android",
"command": "uv",
"args": ["--directory", "path/to/android-mcp-server", "run", "server.py"]
}Find your device identifier by running adb devices. The first column in the output is the serial you should use for automatic or manual device selection.
Connect your MCP client to the Android server using the client’s MCP configuration area. Add a server entry that points to the stdio-based command provided above, ensuring the runtime and arguments remain intact.
This MCP server provides the following programmatic capabilities: - Get all installed packages on the device - Execute an ADB command and obtain its output - Retrieve information about clickable UI elements and their properties - Capture a screenshot from the device - Retrieve non-data action intents for a given package
Returns a list of all installed packages on the connected Android device.
Executes a given ADB command and returns its output.
Retrieves and formats information about clickable elements in the current UI, including text, descriptions, bounds, and coordinates.
Captures a screenshot from the connected device and returns it as an image.
Fetches non-data actions from the Activity Resolver Table for a specified package.