Content
# Android ADB MCP Server



This is an Android ADB server based on the MCP protocol, allowing remote control of Android devices connected to a computer via Claude for Desktop or other MCP clients.
## Features
- **Device Management**: List connected Android devices
- **Screen Operations**: Take screenshots, tap, swipe (up, down, left, right)
- **Input Operations**: Text input, key press simulation
- **App Management**: Install/uninstall apps, launch apps
- **System Operations**: Get screen resolution and other device information
- **Network Tools**: Get network status, port scanning, WIFI management
- **File Tools**: File upload/download, file management
- **Advanced Tools**: UI testing, performance analysis, screen recording, log collection, enhanced app launching
## Prerequisites
1. Python 3.10 or higher
2. ADB installed and added to the system path
3. Android device with USB debugging enabled and connected to the computer
## Installation
```bash
# Clone this repository
git clone https://github.com/wolfcoming/adb_mcp_server.git
cd adb_mcp_server
# Install dependencies
pip install -r requirements.txt
# Ensure ADB server is started
adb start-server
```
## Usage
### Configure in Claude for Desktop
1. Install [Claude for Desktop](https://claude.ai/desktop)
2. Configure MCP server:
- Find the Claude for Desktop configuration file, usually at `~/Library/Application Support/Claude/claude_desktop_config.json`
- Add the following configuration:
```json
{
"mcpServers": {
"android_adb": {
"command": "python",
"args "-m",
"src.adb_server"
],
"cwd": "/path/to/adb_mcp_server"
}
}
}
```
3. Restart Claude for Desktop
### Configure in Cursor
1. Find the Cursor configuration file, usually at `~/.cursor/mcp.json`
2. Add the following configuration:
```json
{
"mcpServers": {
"android_adb": {
"command": "python",
"args": [
"-m",
"src.adb_server"
],
"cwd": "/path/to/adb_mcp_server"
}
}
}
```
3. Restart Cursor
## Supported Tools
### Device Management
- `list_devices`: List all connected Android devices
### Screen Operations
- `take_screenshot`: Capture device screen
- `tap_screen`: Tap on a specific location on the screen
- `swipe_up`: Swipe up
- `swipe_down`: Swipe down
- `swipe_left`: Swipe left
- `swipe_right`: Swipe right
### Input Operations
- `input_text`: Input text
- `press_key`: Press a specific key
- `press_back`: Press back key
- `press_home`: Press home key
### App Management
- `start_app`: Launch an app
- `install_apk`: Install an APK
- `uninstall_app`: Uninstall an app
### System Operations
- `get_screen_resolution`: Get screen resolution
### Network Tools
- `get_ip_address`: Get device IP address
- `ping`: Test network connection
- `scan_ports`: Scan specific ports
- `get_wifi_status`: Get WIFI status
- `connect_wifi`: Connect to a WIFI network
### File Tools
- `list_files`: List files in a directory
- `upload_file`: Upload a file to the device
- `download_file`: Download a file from the device
- `create_file`: Create a file
- `delete_file`: Delete a file
### Advanced Tools
- `dump_ui_hierarchy`: Get UI hierarchy
- `run_ui_test`: Perform UI test steps
- `check_element_exists`: Check if a UI element exists
- `tap_element_by_text`: Tap on a UI element by text
- `collect_device_logs device logs
- `analyze_performance`: Analyze app performance
-_recording`: Record device screen video
- `enhanced`: Enhanced app launch function, bypassing permission restrictions
## Example for Desktop, you it like this:
```
related
"I want to see the connected Android devices"
"Please take of my Android device"
# App operations
"Please install this: /path/to/app.apk"
"Please launch the settingscom.android.settings)"
"Please use enhanced launch to open the China News, even with permission issues"
# Input and interaction
"Please the screen coordinates (500, 500)"
"Please swipe up screen"
"Please tap button with the text 'Settings' File operations
"Please list the files in the /sd directory on the device"
"Please download the /sdcard/DCIM/pic.jpg file from the device computer"
# Network operations
"Please check the WIFI status of the device"
"Please connect to theWifi' network"
# Advanced features
"Please analyze the performance 'com.example.app' app for 30 seconds"
"Please 10-second screen video"
"Please collect recent device logs"
```
- If you encounter ensure the ADB server is started (`adb start-server`)
- Ensure the Android device has authorized your computer debugging
- Some operations may require root permissions
- If youPermission Denial" issues, useenhanced_start_app` advanced tool
## Contribution
Feel free to submit issues and contribute code! Please submit Pull Requests or create Issues.
## License
MIT © [wolfcoming](https://github.com/wolfcoming)
Connection Info
You Might Also Like
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
awesome-mcp-servers
A collection of MCP servers.
git
A Model Context Protocol server for Git automation and interaction.
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
Appwrite
Build like a team of hundreds