adb_mcp_server
Android ADB MCP 服务器 - 通过Claude或其他MCP客户端远程控制Android设备
claude mcp add --transport stdio wolfcoming-adb_mcp_server python -m src.adb_server \ --env PYTHONUNBUFFERED="1"
How to use
This MCP server implements an Android ADB control surface over the MCP protocol. It enables remote management of connected Android devices, including screen operations (screenshot, taps, swipes), input actions (text input, key presses), app management (install/uninstall/start apps), and system/network/file tools (device info, IP, file transfers, wifi status). Advanced tooling supports UI inspection, performance analysis, screen recording, and enhanced app launching that can handle permission prompts. Clients such as Claude for Desktop or other MCP clients can send structured commands to remotely operate a device connected to the host machine. Start by launching the server via Python, connect with your MCP client, and then invoke the available commands under the respective tool categories (Device, Screen, Input, Apps, System, Network, File, Advanced).
Typical usage patterns include listing devices, taking screenshots, installing an APK, starting a specific app, transferring files, and performing UI tests or performance analysis. The server exposes a consistent set of tool commands like list_devices, take_screenshot, tap_screen, swipe_left, input_text, install_apk, start_app, get_screen_resolution, get_ip_address, ping, scan_ports, upload_file, download_file, dump_ui_hierarchy, run_ui_test, collect_device_logs, analyze_performance, take_screen_recording, and enhanced_start_app. These can be invoked from your MCP client by sending the corresponding command name and parameters, often with coordinates, file paths, or package names as required.
How to install
Prerequisites:
- Python 3.10 or higher
- ADB installed and added to system PATH
- A USB-enabled Android device connected to the host computer
Installation steps:
# Clone the repository
git clone https://github.com/wolfcoming/adb_mcp_server.git
cd adb_mcp_server
# Install Python dependencies
pip install -r requirements.txt
# Ensure ADB server is running
adb start-server
Configure and run the MCP server (example):
# Run the server using the MCP Python module entry point
python -m src.adb_server
Note: Depending on your environment, you may want to run the server in a virtual environment or specify a working directory where the repository resides. The MCP client (e.g., Claude for Desktop) should be configured to point to the server using the path to the Python module as shown in the examples in the README.
Additional notes
Tips and notes:
- Ensure ADB is authorized for the host computer on the connected device; check with adb devices and authorize prompts on the device.
- If you encounter Permission Denied errors when performing certain actions, try using enhanced_start_app from the Advanced Tools section.
- The server exposes a wide range of capabilities; for complex workflows, you may need to chain multiple commands (e.g., dump_ui_hierarchy followed by run_ui_test).
- When configuring clients (Claude for Desktop or Cursor), provide the cwd pointing to the adb_mcp_server directory so the module can be resolved correctly.
- Some actions may require elevated permissions on the device (root access) to perform certain operations like enhanced app startup or advanced UI testing.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP