Phone Control (Android ADB) MCP server

Enables remote control of Android phones through ADB commands for making calls, sending texts, taking screenshots, managing contacts, launching apps, and retrieving system information.
Back to servers
Setup instructions
Provider
hao
Release date
Apr 10, 2025
Language
Python
Package
Stats
5.1K downloads
125 stars

This MCP server provides a powerful way to control your Android phone through ADB commands, allowing AI assistants to interact with your phone for calls, messaging, contacts management, and more.

Installation

Quick Installation

# Run directly with uvx (recommended)
uvx phone-mcp

# Or install with uv
uv pip install phone-mcp

# Or install with pip
pip install phone-mcp

AI Assistant Configuration

Configure in your AI assistant configuration (Cursor, Trae, Claude, etc.):

{
    "mcpServers": {
        "phone-mcp": {
            "command": "uvx",
            "args": [
                "phone-mcp"
            ]
        }
    }
}

If you installed with pip instead:

{
    "mcpServers": {
        "phone-mcp": {
            "command": "/usr/local/bin/python",
            "args": [
                "-m",
                "phone_mcp"
            ]
        }
    }
}

Important: You need to modify the Python path according to your system:

  • Linux/macOS: Run which python3 or which python in terminal
  • Windows: Run where python in CMD or (Get-Command python).Path in PowerShell

Note: For Cursor, place this configuration in ~/.cursor/mcp.json

Prerequisites

Before using, ensure you have:

  • ADB properly installed and configured
  • USB debugging enabled on your Android device
  • Device connected to your computer via USB

Basic Commands

Device & Connection

# Check device connection
phone-cli check

# Get screen size
phone-cli screen-interact find method=clickable

Communication Functions

# Make a call
phone-cli call 1234567890

# End current call
phone-cli hangup

# Send SMS
phone-cli send-sms 1234567890 "Hello"

# Get received messages
phone-cli messages --limit 10

# Get contacts
phone-cli contacts --limit 20

# Create a new contact
phone-cli create-contact "John Doe" "1234567890"

Media & Apps

# Take screenshot
phone-cli screenshot

# Record screen
phone-cli record --duration 30

# Launch app
phone-cli app camera

# Alternative app launch method
phone-cli open_app camera

# Close app
phone-cli close-app com.android.camera

# List installed apps
phone-cli list-apps

# Launch specific activity
phone-cli launch com.android.settings/.Settings

# Open URL in default browser
phone-cli open-url google.com

Screen Analysis & Interaction

# Analyze current screen
phone-cli analyze-screen

# Tap at coordinates
phone-cli screen-interact tap x=500 y=800

# Tap element by text
phone-cli screen-interact tap element_text="Login"

# Swipe gesture (scroll down)
phone-cli screen-interact swipe x1=500 y1=1000 x2=500 y2=200 duration=300

# Input text
phone-cli screen-interact text content="Hello World"

# Find elements
phone-cli screen-interact find method=text value="Login" partial=true

# Wait for element
phone-cli screen-interact wait method=text value="Success" timeout=10

Location & Maps

# Search nearby POIs with phone numbers
phone-cli get-poi 116.480053,39.987005 --keywords restaurant --radius 1000

Advanced Usage

App Launch Methods

The plugin provides multiple ways to launch apps:

# By app name
phone-cli app camera
phone-cli open_app camera

# By package name
phone-cli app com.android.contacts
phone-cli open_app com.android.contacts

# By package and activity (most reliable)
phone-cli launch com.android.dialer/com.android.dialer.DialtactsActivity

Note: If you encounter issues, the launch command with full component name is most reliable.

UI Monitoring

Monitor UI changes and wait for specific elements:

# Monitor any UI changes
phone-cli monitor-ui --interval 0.5 --duration 30

# Wait for text to appear
phone-cli monitor-ui --watch-for text_appears --text "Login successful"

# Wait for text to disappear
phone-cli monitor-ui --watch-for text_disappears --text "Loading..."

# Get detailed UI change reports
phone-cli monitor-ui --raw

Contact Creation with UI Automation

# Create a new contact with UI automation
phone-cli create-contact "John Doe" "1234567890"

This command will automatically navigate through the contact creation interface.

Screen Interface API

The plugin provides a comprehensive API for screen interactions:

Actions and Parameters

  • Tap: phone-cli screen-interact tap x=100 y=200 or tap element_text="Login"
  • Swipe: phone-cli screen-interact swipe x1=500 y1=300 x2=500 y2=1200 duration=300
  • Text input: phone-cli screen-interact text content="Hello world"
  • Key press: phone-cli screen-interact key keycode="back"
  • Find elements: phone-cli screen-interact find method="text" value="Settings" partial=true
  • Wait for elements: phone-cli screen-interact wait method="text" value="Success" timeout=10
  • Scroll to find: phone-cli screen-interact scroll method="text" value="Privacy" direction="down" max_swipes=8

Screen Analysis

# Get detailed information about the current screen
phone-cli analyze-screen

This provides structured information about UI elements and text on the screen, useful for intelligent agents to make decisions.

For more detailed documentation and examples, visit the GitHub repository.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "phone-mcp" '{"command":"uvx","args":["phone-mcp"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "phone-mcp": {
            "command": "uvx",
            "args": [
                "phone-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "phone-mcp": {
            "command": "uvx",
            "args": [
                "phone-mcp"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later