Provides comprehensive automation and control tools for Android devices and emulators, including touch interactions, text input, navigation, screenshot capture, and hardware button control for testing and app interaction
Android MCP Server
A lightweight MCP (Model Context Protocol) server for Android operating system automation. This server provides tools to interact directly with Android devices, enabling automated testing, app interaction, and device control.
Features
Device Control: Click, long click, swipe, drag, and type on Android devices
State Management: Get device state with optional visual screenshots
Navigation: Press hardware buttons and access notifications
Automation: Wait functionality for timing control
Emulator Support: Works with both physical devices and Android emulators
Prerequisites
Python 3.13 or higher
uv package manager
Android device or emulator with USB debugging enabled
ADB (Android Debug Bridge) installed and accessible
Installation
1. Install uv (if not already installed)
2. Set up the project
3. Verify installation
Usage
Running the server
For physical devices:
For Android emulator:
Device Setup
Enable Developer Options on your Android device:
Go to Settings > About phone
Tap "Build number" 7 times
Enable USB Debugging:
Go to Settings > Developer options
Enable "USB debugging"
Connect device and verify ADB connection:
adb devices
MCP Server Configuration
Add the following configuration to your MCP client settings (e.g., Claude Desktop, Cline, etc.):
Note: Update the path in the configuration to match your actual project location.
Configuration Options
For physical devices: Remove the
--emulator
flag from the argsCustom device: Add
--device <device_id>
to specify a particular devicealwaysAllow: Pre-approve specific tools to avoid repeated permission prompts
Available Tools
Tool | Description | Parameters |
Click-Tool | Click on specific coordinates |
|
State-Tool | Get device state with optional screenshot |
|
Long-Click-Tool | Long press on coordinates |
|
Swipe-Tool | Swipe between coordinates |
|
Type-Tool | Type text at coordinates |
|
Drag-Tool | Drag and drop between coordinates |
|
Press-Tool | Press hardware buttons |
|
Notification-Tool | Access notification panel | None |
Wait-Tool | Wait for specified duration |
|
Troubleshooting
Common Issues
Device not found:
Ensure USB debugging is enabled
Check
adb devices
outputTry different USB cables/ports
Permission denied:
Allow USB debugging permission on device
Check device authorization in
adb devices
Connection timeout:
Restart ADB:
adb kill-server && adb start-server
Reconnect device
Python version issues:
Ensure Python 3.13+ is installed
Use
uv python install 3.13
if needed
Emulator Setup
If using Android emulator:
Start Android emulator (usually accessible as
emulator-5554
)Verify connection:
adb connect emulator-5554
Use
--emulator
flag when running the server
Development
Project Structure
Dependencies
mcp: Model Context Protocol framework
uiautomator2: Android device automation
pillow: Image processing for screenshots
ipykernel: Jupyter kernel support
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
A lightweight MCP server for Android operating system automation. This server provides tools to interact directly with Android devices and app interaction with control
Related MCP Servers
- -securityAlicense-qualityA server enabling programmatic control over Android devices through ADB, providing capabilities like screenshot capture, UI layout analysis, and package management that can be accessed by MCP clients like Claude Desktop.Last updated -553Apache 2.0
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that enables AI assistants to control and interact with Android devices, allowing for device management, app debugging, system analysis, and UI automation through natural language commands.Last updated -8243Apache 2.0
- -securityFlicense-qualityA FastMCP framework-based server providing Android device automation control capabilities, enabling UI interactions, device management, and application control through natural language.Last updated -10
- AsecurityAlicenseAqualityAn MCP server that integrates with Apktool to provide live reverse engineering support for Android applications using Claude and other LLMs through the Model Context Protocol.Last updated -13223Apache 2.0