Phone Control (Android ADB)

Phone Control (Android ADB)

hao-cyber

Controls Android phones remotely through ADB to make calls, send texts, take screenshots, manage apps, and retrieve system information.

Enables remote control of Android phones through ADB commands for making calls, sending texts, taking screenshots, managing contacts, launching apps, and retrieving system information.

211607 views36Local (stdio)

What it does

  • Make and end phone calls
  • Send and receive text messages
  • Record screen activity
  • Launch apps and control media playback
  • Set alarms and manage contacts
  • Retrieve system information and check device status

Best for

Automating phone testing and QA workflowsBuilding remote phone management toolsCreating automated notification and communication systemsDeveloping accessibility or remote assistance applications
Requires ADB setupReal phone hardware control10+ phone functions

About Phone Control (Android ADB)

Phone Control (Android ADB) is a community-built MCP server published by hao-cyber that provides AI assistants with tools and capabilities via the Model Context Protocol. Phone Control (Android ADB): Remotely manage Android phones with ADB—make calls, send texts, launch apps, manage contact It is categorized under communication, developer tools. This server exposes 21 tools that AI clients can invoke during conversations and coding sessions.

How to install

You can install Phone Control (Android ADB) in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

Phone Control (Android ADB) is released under the Apache-2.0 license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

Tools (21)

call_number

Make a phone call to the specified number. Initiates a call using Android's dialer app through ADB. The number will be dialed immediately without requiring user confirmation. Args: phone_number (str): The phone number to call. Country code will be automatically added if not provided. Returns: str: Success message with the number being called, or an error message if the call could not be initiated.

end_call

End the current phone call. Terminates any active phone call by sending the end call keycode through ADB. Returns: str: Success message if the call was ended, or an error message if the end call command failed.

check_device_connection

Check if an Android device is connected via ADB. Verifies that an Android device is properly connected and recognized by ADB, which is required for all other functions to work. Returns: str: Status message indicating whether a device is connected and ready, or an error message if no device is found.

send_text_message

Send a text message to the specified number. Uses the phone's messaging app with UI automation to send SMS. Process: Opens messaging app, fills recipient and content, automatically clicks send button, then auto-exits app. Args: phone_number (str): Recipient's phone number. Country code will be automatically added if not included. Example: "13812345678" or "+8613812345678" message (str): SMS content. Supports any text, including emojis. Example: "Hello, this is a test message" Returns: str: String description of the operation result: - Success: "Text message sent to {phone_number}" - Failure: Message containing error reason, like "Failed to open messaging app: {error}" or "Failed to navigate to send button: {error}"

receive_text_messages

Get recent text messages from the phone. Retrieves recent SMS messages from the device's SMS database using ADB and content provider queries to get structured message data. Args: limit (int): Maximum number of messages to retrieve (default: 5) Example: 10 will return the 10 most recent messages Returns: str: JSON string containing messages or an error message: - Success: Formatted JSON string with list of messages, each with fields: - address: Sender's number - body: Message content - date: Timestamp - formatted_date: Human-readable date time (like "2023-07-25 14:30:22") - Failure: Text message describing the error, like "No recent text messages found..."

📱 Phone MCP Plugin

Downloads

🌟 A powerful MCP plugin that lets you control your Android phone with ease through ADB commands.

Example

  • Based on today's weather by browser, automatically select and play netease music, no confirmation needed play_mucic_x2

  • Call Hao from the contacts. If he doesn't answer, send a text message telling him to come to Meeting Room 101. call_sms_x2

中文文档

⚡ Quick Start

📥 Installation

# Run directly with uvx (recommended, part of uv, no separate installation needed)
uvx phone-mcp

# Or install with uv
uv pip install phone-mcp

# Or install with pip
pip install phone-mcp

🔧 Configuration

AI Assistant Configuration

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

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

Alternatively, if you installed with pip:

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

Important: The path /usr/local/bin/python in the configuration above is the path to the Python interpreter. You need to modify it according to the actual Python installation location on your system. Here's how to find the Python path on different operating systems:

Linux/macOS: Run the following command in terminal:

which python3

or

which python

Windows: Run in Command Prompt (CMD):

where python

Or in PowerShell:

(Get-Command python).Path

Make sure to replace /usr/local/bin/python in the configuration with the full path, for example on Windows it might be C:\Python39\python.exe

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

Usage:

  • Use commands directly in Claude conversation, for example:
    Please call contact hao
    

⚠️ Before using, ensure:

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

🎯 Key Features

  • 📞 Call Functions: Make calls, end calls, receive incoming calls
  • 💬 Messaging: Send and receive SMS, get raw messages
  • 👥 Contacts: Access phone contacts, create new contacts with automated UI interaction
  • 📸 Media: Screenshots, screen recording, media control
  • 📱 Apps: Launch applications, launch specific activities with intents, list installed apps, terminate apps
  • 🔧 System: Window info, app shortcuts
  • 🗺️ Maps: Search POIs with phone numbers
  • 🖱️ UI Interaction: Tap, swipe, type text, press keys
  • 🔍 UI Inspection: Find elements by text, ID, class or description
  • 🤖 UI Automation: Wait for elements, scroll to find elements
  • 🧠 Screen Analysis: Structured screen information and unified interaction
  • 🌐 Web Browser: Open URLs in device's default browser
  • 🔄 UI Monitoring: Monitor UI changes and wait for specific elements to appear or disappear

🛠️ Requirements

  • Python 3.7+
  • Android device with USB debugging enabled
  • ADB tools

📋 Basic Commands

Device & Connection

# Check device connection
phone-cli check

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

Communication

# Make a call
phone-cli call 1234567890

# End current call
phone-cli hangup

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

# Get received messages (with pagination)
phone-cli messages --limit 10

# Get sent messages (with pagination)
phone-cli sent-messages --limit 10

# Get contacts (with pagination)
phone-cli contacts --limit 20

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

Media & Apps

# Take screenshot
phone-cli screenshot

# Record screen
phone-cli record --duration 30

# Launch app (may not work on all devices)
phone-cli app camera

# Alternative app launch method using open_app (if app command doesn't work)
phone-cli open_app camera

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

# List installed apps (basic info, faster)
phone-cli list-apps

# List apps with pagination
phone-cli list-apps --page 1 --page-size 10

# List apps with detailed info (slower)
phone-cli list-apps --detailed

# Launch specific activity (reliable method for all devices)
phone-cli launch com.android.settings/.Settings

# Launch app by package name (may not work on all devices)
phone-cli app com.android.contacts

# Alternative launch by package name (if app command doesn't work)
phone-cli open_app com.android.contacts

# Launch app by package and activity (most reliable method)
phone-cli launch com.android.dialer/com.android.dialer.DialtactsActivity

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

Screen Analysis & Interaction

# Analyze current screen with structured information
phone-cli analyze-screen

# Unified interaction interface
phone-cli screen-interact <action> [parameters]

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

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

# Tap element by content description
phone-cli screen-interact tap element_content_desc="Calendar"

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

# Press key
phone-cli screen-interact key keycode=back

# 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

# Scroll to find element
phone-cli screen-interact scroll method=text value="Settings" direction=down max_swipes=5

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

# Monitor UI until specific text appears
phone-cli monitor-ui --watch-for text_appears --text "Welcome"

# Monitor UI until specific element ID appears
phone-cli monitor-ui --watch-for id_appears --id "login_button"

# Monitor UI until specific element class appears
phone-cli monitor-ui --watch-for class_appears --class-name "android.widget.Button"

# Monitor UI changes with output as raw JSON
phone-cli monitor-ui --raw

Location & Maps

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

📚 Advanced Usage

App and Activity Launch

The plugin provides multiple ways to launch apps and activities:

  1. By App Name (Two Methods):

    # Method 1: Using app command (may not work on all devices)
    phone-cli app camera
    
    # Method 2: Using open_app command (alternative if app command fails)
    phone-cli open_app camera
    
  2. By Package Name (Two Methods):

    # Method 1: Using app command (may not work on all devices)
    phone-cli app com.android.contacts
    
    # Method 2: Using open_app command (alternative if app command fails)
    phone-cli open_app com.android.contacts
    
  3. By Package and Activity (Most Reliable Method):

    # This method works on all devices
    phone-cli launch com.android.dialer/com.android.dialer.DialtactsActivity
    

Note: If you encounter issues with the app or open_app commands, always use the launch command with the full component name (package/activity) for the most reliable operation.

Contact Creation with UI Automation

The plugin provides a way to create contacts through UI interaction:

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

This command will:

  1. Open the contacts app
  2. Navigate to the contact creation interface
  3. Fill in the name and phone number fields
  4. Save the contact automatically

Screen-Based Automation

The unified screen interaction interface allows intelligent agents to easily:

  1. Analyze screens: Get structured analysis of UI elements and text
  2. Make decisions: Based on detected UI patterns and available actions
  3. Execute interactions: Through a consistent parameter system

UI Monitoring and Automation

The plugin provides powerful UI monitoring capabilities to detect interface changes:

  1. Basic UI monitoring:

    # Monitor any UI changes with custom interval (seconds)
    phone-cli monitor-ui --interval 0.5 --duration 30
    
  2. Wait for specific elements to appear:

    # Wait for text to appear (useful for automated testing)
    phone-cli monitor-ui --watch-for text_appears --text "Login successful"
    
    # Wait for specific ID to appear
    phone-cli monitor-ui --watch-for id_appears --id "confirmation_dialog"
    
  3. Monitor elements disappearing:

    # Wait for text to disappear
    phone-cli monitor-ui --watch-for text_disappears --text "Loading..."
    
  4. Get detailed UI change reports:

    # Get raw JSON data with all UI change information
    phone-cli monitor-ui --raw
    

Tip: UI monitoring is especially useful for automation scripts to wait for loading screens to complete or confirm that actions have taken effect in the UI.

📚 Detailed Documentation

For complete documentation and configuration details, visit our GitHub repository.

🧰 Tool Documentation

Screen Interface API

The plugin provides a powerful screen interface with comprehensive APIs for interacting with the device. Below are the key functions and their parameters:

interact_with_screen

async def interact_wit

---

*README truncated. [View full README on GitHub](https://github.com/hao-cyber/phone-mcp).*

Alternatives

Related Skills

Browse all skills
pmbok-project-management

Comprehensive PMP/PMBOK project management methodologies and best practices. Use this skill when users need guidance on project management processes, templates, knowledge areas, process groups, tools, techniques, or certification preparation. Covers all 10 PMBOK Knowledge Areas and 5 Process Groups with practical templates, frameworks, and industry-standard approaches. Includes risk management, stakeholder engagement, schedule management, cost control, quality assurance, and resource planning.

29
penpot-uiux-design

Comprehensive guide for creating professional UI/UX designs in Penpot using MCP tools. Use this skill when: (1) Creating new UI/UX designs for web, mobile, or desktop applications, (2) Building design systems with components and tokens, (3) Designing dashboards, forms, navigation, or landing pages, (4) Applying accessibility standards and best practices, (5) Following platform guidelines (iOS, Android, Material Design), (6) Reviewing or improving existing Penpot designs for usability. Triggers: "design a UI", "create interface", "build layout", "design dashboard", "create form", "design landing page", "make it accessible", "design system", "component library".

19
ui-design-system

UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.

18
unity-editor-toolkit

Automate and control Unity Editor with 500+ commands, real-time WebSocket communication, and SQLite integration for efficient game development.

9
ai-sdk

Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".

6
desktop

Electron desktop development guide. Use when implementing desktop features, IPC handlers, controllers, preload scripts, window management, menu configuration, or Electron-specific functionality. Triggers on desktop app development, Electron IPC, or desktop local tools implementation.

6