Phone MCP Plugin

by hao-cyber
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Enables controlling Android phones through ADB, allowing functions like making calls, sending messages, accessing contacts, taking screenshots, recording screens, opening apps, and performing system operations.

  • Offers specific installation instructions for Fedora users to install the required ADB tools via the package manager.

  • Provides macOS users with Homebrew installation instructions for the required Android platform tools.

📱 电话 MCP 插件

🌟 强大的 MCP 插件,可让您通过 ADB 命令轻松控制您的 Android 手机。

中文詳細

⚡ 快速入门

📥 安装

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

🔧 配置

光标设置

~/.cursor/mcp.json中配置:

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

克劳德·塞普

添加到 Claude 配置:

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

用法:

  • 在 Claude 对话中直接使用命令,例如:
    Please call contact hao

⚠️ 使用前,请确保:

  • ADB 已正确安装和配置
  • 您的 Android 设备上已启用 USB 调试
  • 设备通过 USB 连接到计算机

🎯 主要特点

  • 📞通话功能:拨打电话、结束通话、接听来电
  • 💬消息传递:发送和接收短信,获取原始消息
  • 👥联系人:访问手机联系人
  • 📸媒体:截图、屏幕录制、媒体控制
  • 📱应用程序:启动应用程序、设置闹钟、列出已安装的应用程序、终止应用程序
  • 🔧系统:窗口信息、应用程序快捷方式
  • 🗺️地图:通过电话号码搜索兴趣点
  • 🖱️ UI 交互:点击、滑动、输入文本、按键
  • 🔍 UI 检查:通过文本、ID、类或描述查找元素
  • 🤖 UI 自动化:等待元素、滚动查找元素、监视 UI 变化
  • 🧠屏幕分析:结构化的屏幕信息和统一的交互
  • 🌐 Web 浏览器:在设备的默认浏览器中打开 URL

🛠️ 要求

  • Python 3.7+
  • 已启用 USB 调试的 Android 设备
  • ADB 工具

📋 基本命令

设备和连接

# Check device connection phone-cli check # Get screen size phone-cli screen-interact find method=clickable

沟通

# 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

媒体和应用程序

# 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 phone-cli list-apps --filter camera --third-party # Launch specific activity phone-cli launch com.android.settings/.Settings # Open URL in default browser phone-cli open-url google.com

屏幕分析与交互

# Analyze current screen with structured information phone-cli analyze-screen # Unified interaction interface phone-cli screen-interact <action> [parameters] # Tap on element by text phone-cli screen-interact tap element_text="Login" # 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

位置和地图

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

📚 高级用法

屏幕驱动自动化

统一的屏幕交互界面,让智能座席能够轻松:

  1. 分析屏幕:获取 UI 元素和文本的结构化分析
  2. 做出决策:基于检测到的 UI 模式和可用的操作
  3. 执行交互:通过一致的参数系统
  4. 监控变化:持续观察UI变化并自动响应

📚 文档

如需完整的文档和配置详细信息,请访问我们的GitHub 存储库

📄 许可证

Apache 许可证,版本 2.0

-
security - not tested
A
license - permissive license
-
quality - not tested

MCP 插件,使 AI 助手能够控制 Android 手机,允许通过自然语言命令执行拨打电话、发送消息、截屏和访问联系人等功能。

  1. ⚡ Quick Start
    1. 📥 Installation
    2. 🔧 Configuration
  2. 🎯 Key Features
    1. 🛠️ Requirements
      1. 📋 Basic Commands
        1. Device & Connection
        2. Communication
        3. Media & Apps
        4. Screen Analysis & Interaction
        5. Location & Maps
      2. 📚 Advanced Usage
        1. Screen-Driven Automation
      3. 📚 Documentation
        1. 📄 License
          ID: t1dxykaybp