iflow-mcp_phone-mcp

v0.3.6
iflow-mcp_phone-mcp Checked 2 days ago Published 1 year ago

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

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

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.

ParameterTypeDescription
phone_number *string

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 descript…

ParameterTypeDescription
message *string
phone_number *string

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 conten…

ParameterTypeDescription
limitinteger

get_sent_messages

Get recently sent text messages from the phone. Retrieves sent SMS messages from the device's SMS database. This provides a complete list of messages that were successfully sent from this device. Args: limit (int): Maximum number of sent messages to retrieve (default: 5) Returns: str: JSON string containing sent messages with: - from: Sender phone number (device owner) - to: Recipient phone number - text: Message content - date: Timestamp - formatted_date: Human-readable date time (like "2023-07…

ParameterTypeDescription
limitinteger

start_screen_recording

Start recording the phone's screen. Records the screen activity for the specified duration and saves the video to the phone's storage. Automatically creates directories if they don't exist. Args: duration_seconds (int): Recording duration in seconds (default: 30, max: 180 seconds due to ADB limitations) Returns: str: Success message with the path to the recording, or an error message if the recording could not be started.

ParameterTypeDescription
duration_secondsinteger

play_media

Simulate media button press to play/pause media. This function sends a keyevent that simulates pressing the media play/pause button, which can control music, videos, or podcasts that are currently playing. Returns: str: Success message, or an error message if the command failed.

set_alarm

Set an alarm on the phone. Creates a new alarm with the specified time and label using the default clock application. Args: hour (int): Hour in 24-hour format (0-23) minute (int): Minute (0-59) label (str): Optional label for the alarm (default: "Alarm") Returns: str: Success message if the alarm was set, or an error message if the alarm could not be created.

ParameterTypeDescription
hour *integer
minute *integer
labelstring

receive_incoming_call

Handle an incoming phone call. Checks for any incoming calls and provides options to answer or reject the call. This function first checks if there's an incoming call, then can either answer it or reject it based on the action parameter. Returns: str: Information about any incoming call including the caller number, or a message indicating no incoming calls.

get_contacts

Retrieve contacts from the phone. Core function for accessing the contacts database on the device. Fetches contact information including names and phone numbers. Returns data in structured JSON format. Args: limit (int): Number of contacts to retrieve, defaults to 20 Returns: str: JSON string with contact data or error message

ParameterTypeDescription
limitstring

create_contact

Create a new contact on the phone. Opens the contact creation UI with pre-filled name and phone number, allowing the user to review and save the contact. Args: name (str): The contact's full name phone_number (str): The contact's phone number (For testing, 10086 is recommended) email (str, optional): The contact's email address Returns: str: Success message if the contact UI was launched, or an error message if the operation failed. Note: When testing this feature, it's recommended to use 10086 as the test phone n…

ParameterTypeDescription
name *string
phone_number *string
emailstring

get_current_window

Get information about the current active window on the device. Retrieves details about the currently focused window, active application, and foreground activities on the device using multiple methods for reliability. Returns: str: JSON string with current window details or error message

get_app_shortcuts

Get application shortcuts for installed apps. Retrieves shortcuts (quick actions) available for Android apps. If package_name is provided, returns shortcuts only for that app, otherwise lists all apps with shortcuts. Args: package_name (str, optional): Specific app package to get shortcuts for Returns: str: JSON string with app shortcuts information or error message

ParameterTypeDescription
package_namestring

launch_app_activity

Launch an app using package name and optionally an activity name This function uses adb to start an application on the device either by package name or by specifying both package and activity. It provides reliable app launching across different Android devices and versions. Args: package_name (str): The package name of the app to launch (e.g., "com.android.contacts") activity_name (str): The specific activity to launch. If not provided, launches the app's main activity. Defaults to None. Returns: s…

ParameterTypeDescription
package_name *string
activity_namestring

list_installed_apps

List installed applications on the device with pagination support. Args: only_system (bool): If True, only show system apps only_third_party (bool): If True, only show third-party apps page (int): Page number (starts from 1) page_size (int): Number of items per page basic (bool): If True, only return basic info (faster loading, default behavior) Returns: str: JSON string containing: { "status": "success" or "error", "message": Error message if status is error, "total_count": To…

ParameterTypeDescription
basicstring
only_systemstring
only_third_partystring
pagestring
page_sizestring

terminate_app

Force stop an application on the device. Args: package_name (str): Package name of the app to terminate Returns: str: Success or error message

ParameterTypeDescription
package_name *string

open_url

Open a URL in the device's default browser. Args: url (str): URL to open Returns: str: Success or error message

ParameterTypeDescription
url *string

analyze_screen

Analyze the current screen and provide structured information about UI elements This function captures the current screen state and returns a detailed analysis of the UI elements, their attributes, and suggests possible interactions. Args: include_screenshot (bool, optional): Whether to include base64-encoded screenshot in the result. Default is False to reduce response size. max_elements (int, optional): Maximum number of UI elements to process. Default is 50 to limit processing…

ParameterTypeDescription
include_screenshotboolean
max_elementsinteger

interact_with_screen

Execute screen interaction actions Unified interface for screen interactions including tapping, swiping, key pressing, text input, and element search. Args: action (str): Action type, one of: - "tap": Tap screen at specified coordinates - "swipe": Swipe screen from one position to another - "key": Press a system key - "text": Input text - "find": Find UI element(s) - "wait": Wait for element to appear - "scroll": Scroll to find element params (Dict[str, Any]): Para…

ParameterTypeDescription
action *string
params *object

mcp_monitor_ui_changes

Monitor the UI for changes with MCP compatible parameters. This is a simplified version of monitor_ui_changes that doesn't use callback functions, making it compatible with MCP's JSON schema requirements. Args: interval_seconds (float): Time between UI checks (seconds) max_duration_seconds (float): Maximum monitoring time (seconds) watch_for (str): What to watch for - "any_change", "text_appears", "text_disappears", "id_appears", "id_disappears", "class_appears", "content_desc_appears" target_text (str): Text to watch f…

ParameterTypeDescription
interval_secondsnumber
max_duration_secondsnumber
target_classstring
target_content_descstring
target_idstring
target_textstring
watch_forstring