Related MCP Server Resources

Explore more AI models, providers, and integration options:

  • Explore AI Models
  • Explore AI Providers
  • Explore MCP Servers
  • LangDB Pricing
  • Documentation
  • AI Industry Blog
  • Agent Twitter Client MCP
  • Remote MCP Server
  • TxtAi Memory Vector Server
  • ERPNext MCP Server
  • Neo N3 MCP Server
Back to MCP Servers
MCP Android Agent

MCP Android Agent

Public
nim444/mcp-android-server-python

Automate and control Android devices via natural language with a Model Context Protocol server offering app management, UI interactions, device info retrieval, screen control, and integration with AI agents for testing, automation, and remote device management.

python
0 tools
May 30, 2025
Updated Jun 4, 2025

Supercharge Your AI with MCP Android Agent

MCP Server

Unlock the full potential of MCP Android Agent through LangDB's AI Gateway. Get enterprise-grade security, analytics, and seamless integration with zero configuration.

Unified API Access
Complete Tracing
Instant Setup
Get Started Now

Free tier available • No credit card required

Instant Setup
99.9% Uptime
10,000+Monthly Requests

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.

Quick Demo

!Demo


!Demo

Requirements

  • Python 3.13 or higher
  • Android Debug Bridge (adb) installed and in PATH
  • Connected Android device with USB debugging enabled
  • uiautomator2 compatible Android device

Features

  • Start, stop, and manage apps by package name
  • Retrieve installed apps and current foreground app
  • Tap, swipe, scroll, drag, and perform UI interactions
  • Get device info, screen resolution, battery status, and more
  • Capture screenshots or last toast messages
  • Programmatically unlock, wake, or sleep the screen
  • Clear app data and wait for activities
  • Includes a health check and adb diagnostic tool

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

Installation

1. Clone the repo

git clone https://github.com/nim444/mcp-android.git cd mcp-android

2. Create and activate virtual environment

# Using uv (https://github.com/astral-sh/uv) uv venv source .venv/bin/activate # On Windows: .venv\\Scripts\\activate

3. Install dependencies

uv pip install

Running the Server

Option 1: Using uvicorn (Recommended)

uvicorn server:app --factory --host 0.0.0.0 --port 8000

Option 2: Using MCP stdio (For AI agent integration)

python server.py

Usage

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.json
  • macOS: ~/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 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:

  1. Create a .vscode/mcp.json file in your workspace:
{ "servers": { "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.

After adding the configuration, you can manage the server using:

  • Command Palette → MCP: List Servers to view and manage configured servers
  • Command Palette → MCP: Start Server to start the server
  • The server's tools will be available in VS Code's agent mode chat

!Vscode

UI Inspector

The project includes support for uiauto.dev, a powerful UI inspection tool for viewing and analyzing your device's interface structure.

  1. Install the UI inspector:
uv pip install uiautodev
  1. Start the inspector:
uiauto.dev
  1. Open your browser and navigate to

!Ui

Available MCP Tools

Tool NameDescription
mcp_healthCheck if the MCP server is running properly
connect_deviceConnect to an Android device and get basic info
get_installed_appsList all installed apps with version and package info
get_current_appGet info about the app currently in the foreground
start_appStart an app by its package name
stop_appStop an app by its package name
stop_all_appsStop all currently running apps
screen_onTurn on the screen
screen_offTurn off the screen
get_device_infoGet detailed device info: serial, resolution, battery, etc.
press_keySimulate hardware key press (e.g. home, back, menu, etc.)
unlock_screenUnlock the screen (turn on and swipe if necessary)
check_adbCheck if ADB is installed and list connected devices
wait_for_screen_onWait asynchronously until the screen is turned on
clickTap on an element by text, resourceId, or description
long_clickPerform a long click on an element
send_textInput text into currently focused field (optionally clearing before)
get_element_infoGet info on UI elements (text, bounds, clickable, etc.)
swipeSwipe from one coordinate to another
wait_for_elementWait for an element to appear on screen
screenshotTake and save a screenshot from the device
scroll_toScroll until a given element becomes visible
dragDrag an element to a specific screen location
get_toastGet the last toast message shown on screen
clear_app_dataClear user data/cache of a specified app
wait_activityWait until a specific activity appears
dump_hierarchyDump the UI hierarchy of the current screen as XML

License

This project is licensed under the MIT License - see the LICENSE file for details.

Publicly Shared Threads0

Discover shared experiences

Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!

Share your threads to help others
Related MCPs5
  • Agent Twitter Client MCP
    Agent Twitter Client MCP

    Model Context Protocol server enabling AI models to interact with Twitter through cookie, username/p...

    Added May 30, 2025
  • Remote MCP Server
    Remote MCP Server

    Remote Model Context Protocol server with Cloudflare Workers and Xano integration offering tool mana...

    Added May 30, 2025
  • TxtAi Memory Vector Server
    TxtAi Memory Vector Server

    Model Context Protocol server offering advanced semantic search, persistent memory management, tag-b...

    Added May 30, 2025
  • ERPNext MCP Server
    ERPNext MCP Server

    Model Context Protocol server enabling seamless integration with ERPNext via API, offering authentic...

    Added May 30, 2025
  • Neo N3 MCP Server
    Neo N3 MCP Server

    Production-ready Model Context Protocol server offering seamless Neo N3 blockchain integration with ...

    Added May 30, 2025