
Ultimate Android
STDIOMCP server for Android device control and interaction via ADB commands
MCP server for Android device control and interaction via ADB commands
Ultimate Android MCP is a powerful and versatile MCP (Model Context Protocol) server designed to interact with connected Android devices. It provides a wide range of tools and functionalities to perform various tasks on Android devices, such as managing applications, interacting with the UI, retrieving device information, and more. This project aims to provide the widest set of capabilities to ensure optimal interaction via LLMs using the Model Context Protocol.
The MCP server provides the following features:
Physical device (Pixel 7 Pro running Android 15) connected via USB, which is having its screen shared via scrcpy. Using Claude for Desktop (Version 0.9.2). The text provided to Claude was the following :
In the connected android device, play the song 'mask off' by future on spotify.
Claude then figured out how to launch the app, which button to click and what text to enter where. Everything in the demo is autonomous with no user interaction in between.
https://github.com/user-attachments/assets/5811fcc1-9047-48be-b057-1049754710c0
To run this project, ensure you have the following:
adb
command works).pure-python-adb
library installed (included in the project dependencies).Follow these steps to set up the project:
Clone the repository:
git clone https://github.com/oddlyspaced/ultimate-android-mcp.git android-mcp cd android-mcp
Install the required libraries:
By default this project uses uv
for dependency management, however you can install the required packages via pip if you like.
uv sync
or
pip install pure-python-adb pip install mcp
Configure the project by editing the config.py
file to match your ADB setup and device details. (More in next section)
Run doctor.py
to ensure that the setup is done correctly.
Here is reference response from the doctor.py
script :
Checking device connection using the following configuration:
ADB Client Host: 127.0.0.1
ADB Client Port: 5037
ADB Device Serial: 32241FDH3002EH
Device connected: 32241FDH3002EH
Hello from Android! Ready to use with MCP.
The config.py
file contains the following configuration options:
adb_client_host
: The host address of the ADB server (default: 127.0.0.1
).adb_client_port
: The port of the ADB server (default: 5037
).adb_device_serial
: The serial number or IP address of the connected device. If not specified, the first available device will be used.To use the MCP server, you can interact with it via Claude Desktop MCP configuration JSON.
The Claude Desktop configuration file is present at the following locations:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Here is an example configuration using uv
:
{ "mcpServers": { "Android MCP": { "command": "uv", "args": [ "--directory", "/Users/hardik/Projects/Android-Agents/android-mcp", // Replace this with your folder path "run", "server.py" ] } } }
or with python
{ "mcpServers": { "Android MCP": { "command": "python", "args": [ "/Users/hardik/Projects/Android-Agents/android-mcp/server.py", // Replace this with your folder path ] } } }
Alternatively, you can run the MCP server using the following command:
python server.py
This project is licensed under the GNU General Public License v3.0. You may obtain a copy of the license at:
https://www.gnu.org/licenses/gpl-3.0.en.html
This license allows you to use, modify, and distribute the software, provided that any modifications or derivative works are also licensed under the GPL. For more details, refer to the license documentation.