ADB
- python
3
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"cristianoritta-mcp_adb": {
"command": "uv",
"args": [
"--directory",
"C:\\caminho\\para\\adb-mcp-server",
"run",
"python",
"main.py"
],
"env": {
"ADB_PATH": "C:\\Users\\User\\Program Files\\ADB\\adb.exe"
}
}
}
}You run an MCP server in Python that lets Claude communicate directly with Android devices through ADB. This server enables device management, command execution, app installation, log access, screenshots, file transfers, input simulation, and system information retrieval, all via MCP-enabled clients.
How to use
Connect to your Android device from a CLAUDE MCP client by starting the local MCP server and then issuing MCP commands that map to ADB actions. You can list connected devices, run shell commands on the device, capture screenshots, push and pull files, install or uninstall apps, read logcat output, simulate touches and typing, and fetch device information such as battery, model, and memory.
How to install
Prerequisites: you need Python 3.10 or newer and the uv package manager. You also need ADB installed on your machine and an Android device with USB debugging enabled.
Step 1: Install uv (if you don’t have it yet) Akamai-style setup for Windows PowerShell (run in a PowerShell session):
# Windows (PowerShell)
irm https://astral.sh/uv/install.ps1 | iex
# Or download from the official site: https://github.com/astral-sh/uv
Step 2: Create and configure the server project
# Create directory
mkdir adb-mcp-server
cd adb-mcp-server
# Save files main.py and pyproject.toml
# Install dependencies
uv sync
# Test if it runs
uv run python main.py
Step 3: Start the server (example structure) The project typically contains main.py and pyproject.toml. Ensure uv is installed and the server starts without errors.
Additional configuration and troubleshooting
Claude Desktop configuration for Windows can be used to launch the MCP server. Create or edit the Claude Desktop config to point to your local MCP server using uv and the Python entry point.
{
"mcpServers": {
"adb": {
"command": "uv",
"args": [
"--directory",
"C:\\caminho\\para\\adb-mcp-server",
"run",
"python",
"main.py"
]
}
}
}
Device preparation is the same as a typical ADB workflow: enable Developer Options, enable USB debugging, connect the device via USB, and authorize the computer when prompted. You can verify a connection by listing devices from your ADB directory.
If you need to debug the server manually, run it in the project directory and check for any startup errors. Stop the server with Ctrl+C when you’re done.
Troubleshooting and tips
Common issues include ADB not found, device not found, or permission denied. Ensure the ADB path is correct in your code, verify device connection, authorize USB debugging, and run ADB commands manually to confirm behavior before using MCP.
Example commands to test ADB manually are shown in the troubleshooting section of the setup notes. If you encounter a permission issue, verify that your app has the necessary permissions or run commands that require elevated privileges only when appropriate.
Available commands and features
The MCP server exposes a set of commands that map directly to common ADB actions, including listing devices, running shell commands, installing or uninstalling apps, viewing logs, taking screenshots, pushing and pulling files, simulating input, listing installed apps, and fetching system information.
Examples of usage patterns include asking for connected devices, installing an APK, capturing a screenshot to a local path, or retrieving battery information from the device.
Notes on security and usage
This server runs ADB commands with your user privileges. Use it only with devices you own or have explicit permission to manage. Be cautious with shell commands and ensure the ADB server is up-to-date. Multiple devices can be isolated by device ID to avoid cross-device command execution.
Available tools
adb_devices
Lists connected Android devices.
adb_shell
Executes a shell command on the connected Android device.
adb_install
Installs an APK on the device.
adb_uninstall
Uninstalls an app from the device.
adb_logcat
Fetches and filters Android logcat logs.
adb_screenshot
Captures a screenshot from the device.
adb_push
Pushes a file from the host to the device.
adb_pull
Pulls a file from the device to the host.
adb_input
Simulates touch and keyboard input on the device.
adb_apps
Lists installed apps on the device.
adb_info
Fetches system information such as battery, model, and version.