Android MCP Server

Android MCP Server

An MCP server designed for Android development, enabling AI assistants to directly control Android devices for screenshots, UI analysis, app management, and more.

Category
Visit Server

README

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


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 Transfer

Prerequisites

  • Python >= 3.11
  • uv package manager
  • ADB installed and added to PATH (adb --version works)
  • Android device connected or emulator running (adb devices recognizes it)
  • USB Debugging enabled on the Android device

Installation

# Clone the project
git clone https://github.com/huarangmeng/AndroidMcpServer
cd AndroidMcpServer

# Install dependencies
uv sync

Dependencies

Package Version Purpose
mcp[cli] >= 1.2.0 MCP framework
Pillow >= 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/mcp

Tools

A total of 19 tools in 5 categories:

πŸ“Έ Screenshot & UI Analysis

Tool Description
get_screenshot Capture device screenshot (auto-scaled to 50%)
get_ui_dump Get XML UI hierarchy with attribute filtering

πŸ–±οΈ Interaction

Tool Parameters Description
tap_screen x, y Tap at coordinates
swipe_screen x1,y1,x2,y2,duration_ms Swipe gesture
long_press x, y, duration_ms Long press
send_text text_to_send Send text to focused input (English only)
perform_system_action action System keys: BACK / HOME / RECENT_APPS

πŸ“± App Management

Tool Parameters Description
launch_app package_name Launch app
force_stop_app package_name Force stop app
clear_app_data package_name Clear app data
install_apk apk_path, replace_existing Install APK
get_app_list include_system_apps List installed apps
grant_permission package_name, permission Grant runtime permission

πŸ” Debugging & Diagnostics

Tool Parameters Description
get_logcat_output app_package, log_level Get last 100 logcat lines
get_device_info β€” Get device model, OS version, etc.
get_current_activity β€” Get current foreground Activity
get_memory_info package_name View app memory usage

πŸ“‚ File Operations

Tool Parameters Description
pull_file device_path, local_path Pull file from device
push_file local_path, device_path 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-stdio

Or 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 3001

References

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured