Android MCP Server
Provides tools for controlling Android devices via ADB, including screenshot capture, UI analysis, app management, file transfer, and debugging.
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., "@Android MCP Servertake a screenshot of the current screen"
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.
Android MCP Server
π€ An MCP (Model Context Protocol) server designed for Android development, enabling AI assistants to directly control Android devices for screenshots, UI analysis, app management, and more.
Table of Contents
Related MCP server: scrcpy-mcp
Introduction
This project is built on the FastMCP framework and communicates with Android devices via ADB (Android Debug Bridge). It exposes 19 practical tools to AI assistants (such as Claude, CodeBuddy, etc.), covering the complete Android development and debugging workflow:
Screenshot β UI Analysis β Interaction β Logcat β App Management β File TransferPrerequisites
Python >= 3.11
uv package manager
ADB installed and added to PATH (
adb --versionworks)Android device connected or emulator running (
adb devicesrecognizes it)USB Debugging enabled on the Android device
Installation
# Clone the project
git clone https://github.com/huarangmeng/AndroidMcpServer
cd AndroidMcpServer
# Install dependencies
uv syncDependencies
Package | Version | Purpose |
| >= 1.2.0 | MCP framework |
| >= 10.3.0 | Screenshot processing |
Configuration
CodeBuddy
Add the following to ~/.codebuddy/mcp.json:
{
"mcpServers": {
"android_mcp": {
"command": "/Users/<your-username>/.local/bin/uv",
"args": [
"run",
"--project", "/path/to/AndroidMcpServer",
"python",
"/path/to/AndroidMcpServer/main.py",
"--mode", "stdio",
"--temp-dir", "/tmp/android_mcp"
],
"transportType": "stdio"
}
}
}Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"android_mcp": {
"command": "uv",
"args": [
"run",
"--project", "/path/to/AndroidMcpServer",
"python",
"/path/to/AndroidMcpServer/main.py",
"--mode", "stdio",
"--temp-dir", "/tmp/android_mcp"
]
}
}
}HTTP Mode
# Start HTTP server
uv run main.py --mode streamable-http --temp-dir /tmp/android_mcp --port 3001
# Service URL: http://localhost:3001/mcpTools
A total of 19 tools in 5 categories:
πΈ Screenshot & UI Analysis
Tool | Description |
| Capture device screenshot (auto-scaled to 50%) |
| Get XML UI hierarchy with attribute filtering |
π±οΈ Interaction
Tool | Parameters | Description |
|
| Tap at coordinates |
|
| Swipe gesture |
|
| Long press |
|
| Send text to focused input (English only) |
|
| System keys: BACK / HOME / RECENT_APPS |
π± App Management
Tool | Parameters | Description |
|
| Launch app |
|
| Force stop app |
|
| Clear app data |
|
| Install APK |
|
| List installed apps |
|
| Grant runtime permission |
π Debugging & Diagnostics
Tool | Parameters | Description |
|
| Get last 100 logcat lines |
| β | Get device model, OS version, etc. |
| β | Get current foreground Activity |
|
| View app memory usage |
π File Operations
Tool | Parameters | Description |
|
| Pull file from device |
|
| Push file to device |
Debugging
Use MCP Inspector for local debugging:
# Install MCP Inspector
npm install -g @modelcontextprotocol/inspector
# Start with config file
npx @modelcontextprotocol/inspector --config mcp-inspector-config.json --server android-stdioOr start manually:
# stdio mode
uv run main.py --mode stdio --temp-dir /tmp/android_mcp
# HTTP mode
uv run main.py --mode streamable-http --temp-dir /tmp/android_mcp --port 3001References
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
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/huarangmeng/AndroidMcpServer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server