MCP Android Agent
Provides tools for automating Android devices, including app management, UI interaction, scrolling and gestures, screen and orientation control, system operations, notifications, watchers, device management, and UI inspection, enabling AI agents to control Android devices through natural language.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Android Agentcheck device battery level and screen resolution"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Android Agent
This project provides an MCP (Model Context Protocol) server for automating Android devices using uiautomator2. It's designed to be easily plugged into AI agents like GitHub Copilot Chat, Claude, or Open Interpreter to control Android devices through natural language.
Requirements
Python 3.10 or higher (tested on 3.10, 3.11, 3.12, 3.13)
Android Debug Bridge (adb) installed and in PATH
Connected Android device with USB debugging enabled
uiautomator2 compatible Android device
Related MCP server: Android Mobile MCP
Features
🚀 63 Total Tools Available
App Management
Install/uninstall apps from APK files or URLs
Start, stop, and manage apps by package name
Retrieve installed apps, current foreground app, and detailed app info
Clear app data and wait for activities
UI Interaction
Standard Selectors: Click, long-click, double-click by text/resourceId/description
XPath Support: Complex UI queries with XPath selectors
Coordinate-based: Direct click/double-click at specific coordinates
Send text, swipe, drag, scroll interactions
Advanced Scrolling & Gestures
Scroll forward/backward, to beginning/end
Fast fling gestures
Pinch-in/pinch-out (zoom) gestures
Screen & Orientation Control
Programmatically unlock, wake, or sleep the screen
Set/get screen orientation (portrait, landscape, etc.)
Lock/unlock screen rotation
System Operations
Execute ADB shell commands
Push/pull files to/from device
Clipboard operations (get/set)
Notifications & Popups
Open notification drawer and quick settings
Auto-dismiss system popups
Watchers
Start/stop/remove UI watchers for automatic popup handling
Device Management
Get device info, screen resolution, battery status, WiFi IP
Health check and UIAutomator service reset
ADB diagnostic tools
UI Inspection
Dump UI hierarchy (XML)
Get element information and properties
Capture screenshots and toast messages
Use Cases
Perfect for:
AI agents that need to interact with real devices
Remote device control setups
Automated QA tools
Android bot frameworks
UI testing and automation
Device management and monitoring
Running the Server
Quick Start (Recommended)
MCP stdio mode (for Claude Desktop, VS Code agent mode):
./start.shHTTP mode (for development/testing):
./start-http.shManual Start
Option 1: MCP stdio mode (For AI agent integration)
source .venv/bin/activate
python3 server.pyOption 2: HTTP mode with uvicorn (For development/testing)
source .venv/bin/activate
uvicorn server:app --factory --host 0.0.0.0 --port 8000Usage
An MCP client is needed to use this server. The Claude Desktop app is an example of an MCP client. To use this server with Claude Desktop:
Locate your Claude Desktop configuration file
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Add the Android MCP server configuration to the mcpServers section
{
"mcpServers": {
"mcp-android": {
"type": "stdio",
"command": "bash",
"args": [
"-c",
"cd /path/to/mcp-adb && source .venv/bin/activate && python -m server"
]
}
}
}Replace /path/to/mcp-adb with the absolute path to where you cloned this repository. For example: /Users/username/Projects/mcp-adb
Using with Claude Code CLI
Quick Setup - The server is pre-configured for Claude Code in this repository:
The configuration exists in
.claude/mcp-servers.jsonStart Claude Code in this directory - it will auto-detect the server
See CLAUDE_CODE_SETUP.md for global configuration and troubleshooting
Using with VS Code
You can also use this MCP server with VS Code's agent mode (requires VS Code 1.99 or newer). To set up:
Create a
.vscode/mcp.jsonfile in your workspace:
{
"servers": {
"mcp-android": {
"type": "stdio",
"command": "bash",
"args": [
"-c",
"cd /path/to/mcp-adb && source .venv/bin/activate && python -m server"
]
}
}
}Available MCP Tools
Tool Name | Description |
| Check if the MCP server is running properly |
| Connect to an Android device and get basic info |
| List all installed apps with version and package info |
| Get info about the app currently in the foreground |
| Start an app by its package name |
| Stop an app by its package name |
| Stop all currently running apps |
| Turn on the screen |
| Turn off the screen |
| Get detailed device info: serial, resolution, battery, etc. |
| Simulate hardware key press (e.g. |
| Unlock the screen (turn on and swipe if necessary) |
| Check if ADB is installed and list connected devices |
| Wait asynchronously until the screen is turned on |
| Tap on an element by |
| Perform a long click on an element |
| Input text into currently focused field (optionally clearing before) |
| Get info on UI elements (text, bounds, clickable, etc.) |
| Swipe from one coordinate to another |
| Wait for an element to appear on screen |
| Take and save a screenshot from the device |
| Scroll until a given element becomes visible |
| Drag an element to a specific screen location |
| Get the last toast message shown on screen |
| Clear user data/cache of a specified app |
| Wait until a specific activity appears |
| Dump the UI hierarchy of the current screen as XML |
License
This project is licensed under the MIT License - see the LICENSE file for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/manuelsiuro/mcp-android-server-python'
If you have feedback or need assistance with the MCP directory API, please join our Discord server