hyperb1iss/droidmind
If you are the rightful owner of droidmind and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
DroidMind is a protocol server that enables AI assistants to control Android devices using the Model Context Protocol (MCP).
Tools
Functions exposed to the LLM to take actions
android-app
Perform various application management operations on an Android device.
This single tool consolidates various app-related actions. The 'action' parameter determines the operation.
Args:
serial: Device serial number.
action: The specific app operation to perform.
ctx: MCP Context for logging and interaction.
package (Optional[str]): Package name for the target application. Required by most actions.
apk_path (Optional[str]): Path to the APK file (local to the server). Used by install_app
.
reinstall (Optional[bool]): Whether to reinstall if app exists. Used by install_app
.
grant_permissions (Optional[bool]): Whether to grant all requested permissions. Used by install_app
.
keep_data (Optional[bool]): Whether to keep app data and cache directories. Used by uninstall_app
.
activity (Optional[str]): Optional activity name to start. Used by start_app
.
include_system_apps (Optional[bool]): Whether to include system apps. Used by list_packages
.
Returns: A string message indicating the result or status of the operation.
Available Actions and their specific argument usage:
action="install_app"
- Requires:
apk_path
- Optional:
reinstall
,grant_permissions
- Requires:
action="uninstall_app"
- Requires:
package
- Optional:
keep_data
- Requires:
action="start_app"
- Requires:
package
- Optional:
activity
- Requires:
action="stop_app"
- Requires:
package
- Requires:
action="clear_app_data"
- Requires:
package
- Requires:
action="list_packages"
- Optional:
include_system_apps
- Optional:
action="get_app_manifest"
- Requires:
package
- Requires:
action="get_app_permissions"
- Requires:
package
- Requires:
action="get_app_activities"
- Requires:
package
- Requires:
action="get_app_info"
- Requires:
package
- Requires:
android-device
Perform various device management operations on Android devices.
This single tool consolidates various device-related actions. The 'action' parameter determines the operation.
Args: action: The specific device operation to perform. ctx: MCP Context for logging and interaction. serial (Optional[str]): Device serial number. Required by most actions except connect/list. ip_address (Optional[str]): IP address for 'connect_device' action. port (Optional[int]): Port for 'connect_device' action (default: 5555). mode (Optional[str]): Reboot mode for 'reboot_device' action (default: "normal").
Returns: A string message indicating the result or status of the operation.
Available Actions and their specific argument usage:
action="list_devices"
- No specific arguments required beyond
ctx
.
- No specific arguments required beyond
action="connect_device"
- Requires:
ip_address
- Optional:
port
- Requires:
action="disconnect_device"
- Requires:
serial
- Requires:
action="reboot_device"
- Requires:
serial
- Optional:
mode
(e.g., "normal", "recovery", "bootloader")
- Requires:
action="device_properties"
- Requires:
serial
- Requires:
android-diag
Perform diagnostic operations like capturing bug reports or heap dumps.
Args: ctx: MCP Context. serial: Device serial number. action: The diagnostic action to perform. output_path: Optional. Path to save the output file. For bugreport: host path for adb to write the .zip. If empty, a temp file is used & summarized. For dump_heap: local path to save the .hprof. If empty, a temp file is used. include_screenshots: For CAPTURE_BUGREPORT. Default True. package_or_pid: For DUMP_HEAP. App package name or process ID. native: For DUMP_HEAP. True for native (C/C++) heap, False for Java. Default False. timeout_seconds: Max time for the operation. If 0, action-specific defaults are used (bugreport: 300s, dump_heap: 120s).
Returns: A string message indicating the result or path to the output.
android-file
Perform file and directory operations on an Android device.
This single tool consolidates various file system actions. The 'action' parameter determines the operation.
Args: serial: Device serial number. action: The specific file operation to perform. See available actions below. ctx: MCP Context for logging and interaction. path (Optional[str]): General path argument on the device. Used by: list_directory, delete_file, create_directory, file_exists, file_stats. Can also be used by read_file and write_file as an alternative to 'device_path'. local_path (Optional[str]): Path on the DroidMind server machine. Used by: push_file (source), pull_file (destination). device_path (Optional[str]): Path on the Android device. Used by: push_file (destination), pull_file (source), read_file (source), write_file (destination). If 'path' is also provided for read/write, 'device_path' takes precedence. content (Optional[str]): Text content to write. Used by: write_file. max_size (Optional[int]): Maximum file size in bytes for read_file (default: 100KB). Used by: read_file.
Returns: Union[str, bool]: A string message indicating the result or status for most actions. Returns a boolean for the 'file_exists' action.
Available Actions and their specific argument usage:
-
action="list_directory"
: Lists contents of a directory.- Requires:
path
(directory path on device). - Returns: Formatted string of directory contents.
- Requires:
-
action="push_file"
: Uploads a file from the local server to the device.- Requires:
local_path
(source on server),device_path
(destination on device). - Returns: String message confirming upload.
- Requires:
-
action="pull_file"
: Downloads a file from the device to the local server.- Requires:
device_path
(source on device),local_path
(destination on server). - Returns: String message confirming download.
- Requires:
-
action="delete_file"
: Deletes a file or directory from the device.- Requires:
path
(path to delete on device). - Returns: String message confirming deletion.
- Requires:
-
action="create_directory"
: Creates a directory on the device.- Requires:
path
(directory path to create on device). - Returns: String message confirming creation.
- Requires:
-
action="file_exists"
: Checks if a file or directory exists on the device.- Requires:
path
(path to check on device). - Returns:
True
if exists,False
otherwise.
- Requires:
-
action="read_file"
: Reads the contents of a file from the device.- Requires:
device_path
(orpath
) for the file on device. - Optional:
max_size
(defaults to 100KB). - Returns: String containing file contents or error message.
- Requires:
-
action="write_file"
: Writes text content to a file on the device.- Requires:
device_path
(orpath
) for the file on device,content
(text to write). - Returns: String message confirming write.
- Requires:
-
action="file_stats"
: Gets detailed statistics for a file or directory.- Requires:
path
(path on device). - Returns: Markdown-formatted string of file/directory statistics.
- Requires:
android-log
Perform various log retrieval operations on an Android device.
This single tool consolidates various log-related actions. The 'action' parameter determines the operation.
Args:
serial: Device serial number.
action: The specific log operation to perform.
ctx: MCP Context for logging and interaction.
package (Optional[str]): Package name for get_app_logs
action.
lines (int): Number of lines to fetch for logcat actions (default: 1000).
filter_expr (Optional[str]): Logcat filter expression for get_device_logcat
.
buffer (Optional[str]): Logcat buffer for get_device_logcat
(default: "main").
format_type (Optional[str]): Logcat output format for get_device_logcat
(default: "threadtime").
max_size (Optional[int]): Max output size for get_device_logcat
(default: 100KB).
Returns: A string message containing the requested logs or status.
Available Actions and their specific argument usage:
action="get_device_logcat"
- Optional:
lines
,filter_expr
,buffer
,format_type
,max_size
.
- Optional:
action="get_app_logs"
- Requires:
package
. - Optional:
lines
.
- Requires:
action="get_anr_logs"
- No specific arguments beyond
serial
andctx
.
- No specific arguments beyond
action="get_crash_logs"
- No specific arguments beyond
serial
andctx
.
- No specific arguments beyond
action="get_battery_stats"
- No specific arguments beyond
serial
andctx
.
- No specific arguments beyond
android-screenshot
Get a screenshot from a device.
Args: serial: Device serial number ctx: MCP context quality: JPEG quality (1-100, lower means smaller file size)
Returns: The device screenshot as an image
android-shell
Run a shell command on the device.
Args: serial: Device serial number command: Shell command to run max_lines: Maximum lines of output to return (default: 1000) Use positive numbers for first N lines, negative for last N lines Set to None for unlimited (not recommended for large outputs) max_size: Maximum output size in characters (default: 100000) Limits total response size regardless of line count
Returns: Command output
android-ui
Perform various UI interaction operations on an Android device.
Args: ctx: MCP Context. serial: Device serial number. action: The UI action to perform. x: X coordinate (for tap). y: Y coordinate (for tap). start_x: Starting X coordinate (for swipe). start_y: Starting Y coordinate (for swipe). end_x: Ending X coordinate (for swipe). end_y: Ending Y coordinate (for swipe). duration_ms: Duration of the swipe in milliseconds (default: 300). text: Text to input (for input_text). keycode: Android keycode to press (for press_key). package: Package name (for start_intent). activity: Activity name (for start_intent). extras: Optional intent extras (for start_intent).
Returns: A string message indicating the result of the operation.
Prompts
Interactive templates invoked by user choice
debug_app_crash
Generate a prompt to debug an app crash.
Args: app_package: The package name of the crashed app
analyze_battery_usage
Generate a prompt to analyze battery usage.
analyze_device_performance
Generate a prompt to analyze overall device performance.
analyze_network_issues
Generate a prompt to diagnose network connectivity problems.
optimize_app_startup
Generate a prompt to analyze and optimize app startup time.
Args: app_package: The package name of the app to optimize
analyze_app_permissions
Generate a prompt to analyze an app's permission usage.
Args: app_package: The package name of the app to analyze
create_ui_test_script
Generate a prompt to create a UI test script for an app.
Args: app_package: The package name of the app to test
analyze_ui_accessibility
Generate a prompt to evaluate app accessibility.
Args: app_package: The package name of the app to evaluate
system_cleanup
Generate a prompt for system cleanup and optimization.
security_audit
Generate a prompt for performing a device security audit.
Resources
Contextual data attached and managed by the client