Skip to main content

A phone control plugin for MCP that allows you to control your Android phone through ADB commands to connect any human

Project description

📱 Phone MCP Plugin

Downloads

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

中文文档

⚡ Quick Start

📥 Installation

pip install phone-mcp
# or use uvx
uvx phone-mcp

🔧 Configuration

Cursor Setup

Configure in ~/.cursor/mcp.json:

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

Claude Setup

Add to Claude configuration:

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

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
  • 📸 Media: Screenshots, screen recording, media control
  • 📱 Apps: Launch applications, set alarms, 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, monitor UI changes
  • 🧠 Screen Analysis: Structured screen information and unified interaction
  • 🌐 Web Browser: Open URLs in device's default browser

🛠️ 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"

# Check messages
phone-cli messages --limit 10

# Get contacts
phone-cli contacts --limit 20

Media & Apps

# Take screenshot
phone-cli screenshot

# Record screen
phone-cli record --duration 30

# Launch app
phone-cli 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
phone-cli launch com.android.settings/.Settings

# 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

# 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 changes
phone-cli monitor-ui --interval 1 --duration 60

Location & Maps

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

📚 Advanced Usage

Screen-Driven Automation

The unified screen interaction interface allows intelligent agents to easily:

  1. Analyze the screen: Get a 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
  4. Monitor changes: Continuously observe UI changes and respond automatically

📚 Documentation

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

📄 License

Apache License, Version 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phone_mcp-0.3.2.tar.gz (77.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phone_mcp-0.3.2-py2.py3-none-any.whl (76.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file phone_mcp-0.3.2.tar.gz.

File metadata

  • Download URL: phone_mcp-0.3.2.tar.gz
  • Upload date:
  • Size: 77.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for phone_mcp-0.3.2.tar.gz
Algorithm Hash digest
SHA256 43d33a64093dcf8f03c8b8e00fb5fa85beb48d54a2cdcda757bee5cc17173841
MD5 446e665817b472a6c6fad989d1d7e933
BLAKE2b-256 b19a0f85fb37b00aff868addf2f142ffb3e0c1482cb1bc1e3c7ea6dd3bc5cb37

See more details on using hashes here.

Provenance

The following attestation bundles were made for phone_mcp-0.3.2.tar.gz:

Publisher: python-publish.yml on hao-cyber/phone-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file phone_mcp-0.3.2-py2.py3-none-any.whl.

File metadata

  • Download URL: phone_mcp-0.3.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 76.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for phone_mcp-0.3.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f9027bfdb361b612f8fdf06d5e60dac540b3f008cd9fd07f030ad0e4b942eb74
MD5 b2c53ee2bb104cab3a8a543d236a5d43
BLAKE2b-256 6c26f55d020c9db88d96e87a29b84b5a9ae84f7d452ebfcbda05351d38d61ee4

See more details on using hashes here.

Provenance

The following attestation bundles were made for phone_mcp-0.3.2-py2.py3-none-any.whl:

Publisher: python-publish.yml on hao-cyber/phone-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page