| name | ios-mcp-jailbreak-automation |
| description | Control jailbroken iOS devices via MCP tools for AI agents to inspect, automate, and manage iPhone applications and system functions |
| triggers | ["control my jailbroken iPhone with MCP","automate iOS device interactions","take screenshots and inspect UI on iOS","launch apps and simulate touches on iPhone","get device information from jailbroken iOS","run shell commands on jailbroken iPhone","manage clipboard and input text on iOS","install or uninstall apps on jailbroken device"] |
iOS MCP Jailbreak Automation
Skill by ara.so — MCP Skills collection.
iOS MCP is a Model Context Protocol (MCP) server that runs on jailbroken iPhones, enabling AI agents to directly control and inspect iOS devices through a comprehensive set of 34 automation tools.
What It Does
iOS MCP provides AI agents with the ability to:
- Touch & Gestures: Tap, swipe, long press, double tap, drag and drop at precise screen coordinates
- Hardware Buttons: Simulate physical buttons (Home, Power, Volume, Mute) via HID
- Text Input: Type text via clipboard injection or HID simulation, press special keys
- Screenshots: Capture screen as Base64 JPEG, get screen dimensions and orientation
- App Management: Launch, kill, install, uninstall apps; list running and installed apps
- Accessibility: Query UI element tree, get elements at specific coordinates
- Clipboard: Read and write clipboard content
- Device Control: Adjust brightness and volume
- Device Info: Get model, iOS version, battery, storage, memory, jailbreak type
- URL Handling: Open URLs or URL schemes
- Shell: Execute arbitrary shell commands
Installation
Requirements
- Jailbroken iOS device (iOS 13-18)
- Appropriate jailbreak type:
- rootful (iOS 13-18):
iphoneos-arm
- rootless (iOS 15-18):
iphoneos-arm64
- roothide (iOS 15-18):
iphoneos-arm64e
Install via Package Manager
- Open Cydia or Sileo on your jailbroken device
- Search for
iOS MCP
- Install the package (dependencies:
mobilesubstrate/ElleKit, preferenceloader)
- Respring SpringBoard
Verify Installation
After installation, verify the server is running:
curl http://<DEVICE_IP>:8090/health
Expected response:
{"status":"ok","server":"ios-mcp","version":"1.1.1"}
Configuration
- Open Settings → iOS MCP on your device
- Enable the MCP service
- Tap Copy MCP Prompt Snippet to get the connection configuration
- Paste the snippet into your AI agent's configuration
The server runs on port 8090 by default.
MCP Configuration
Add to your MCP settings (e.g., claude_desktop_config.json):
{
"mcpServers": {
"ios-mcp": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-fetch",
"http://<YOUR_IOS_DEVICE_IP>:8090/mcp"
]
}
}
}
Replace <YOUR_IOS_DEVICE_IP> with your device's local IP address.
Available MCP Tools
Touch & Gestures
tap_screen: Tap at specific coordinates
await mcp.call_tool("tap_screen", { x: 200, y: 400 });
swipe_screen: Swipe from one point to another
await mcp.call_tool("swipe_screen", {
from_x: 200,
from_y: 600,
to_x: 200,
to_y: 200,
duration: 0.3
});
long_press: Long press at coordinates
await mcp.call_tool("long_press", { x: 200, y: 400, duration: 1.0 });
double_tap: Double tap at coordinates
await mcp.call_tool("double_tap", { x: 200, y: 400 });
drag_and_drop: Drag from one point to another
await mcp.call_tool("drag_and_drop", {
from_x: 100,
from_y: 300,
to_x: 300,
to_y: 500,
duration: 0.5
});
Hardware Buttons
press_home: Press Home button
await mcp.call_tool("press_home", {});
press_power: Press Power button
await mcp.call_tool("press_power", {});
press_volume_up / press_volume_down: Press volume buttons
await mcp.call_tool("press_volume_up", {});
await mcp.call_tool("press_volume_down", {});
wake_and_home: Wake device and press Home (useful when screen is locked)
await mcp.call_tool("wake_and_home", {});
Text Input
input_text: Fast text input via clipboard
await mcp.call_tool("input_text", { text: "Hello from AI agent" });
type_text: Character-by-character typing via HID
await mcp.call_tool("type_text", { text: "Slow typing simulation" });
press_key: Press special keys
await mcp.call_tool("press_key", { key: "return" });
Screenshots & Screen Info
screenshot: Capture screen as Base64 JPEG
const result = await mcp.call_tool("screenshot", {});
get_screen_info: Get screen dimensions and orientation
await mcp.call_tool("get_screen_info", {});
App Management
launch_app: Launch app by bundle ID
await mcp.call_tool("launch_app", { bundle_id: "com.apple.mobilesafari" });
kill_app: Force quit app
await mcp.call_tool("kill_app", { bundle_id: "com.apple.mobilesafari" });
list_apps: List all installed apps
const apps = await mcp.call_tool("list_apps", {});
list_running_apps: List currently running apps
const running = await mcp.call_tool("list_running_apps", {});
get_frontmost_app: Get currently focused app
const frontmost = await mcp.call_tool("get_frontmost_app", {});
install_app: Install IPA file
await mcp.call_tool("install_app", { ipa_path: "/var/mobile/app.ipa" });
uninstall_app: Uninstall app
await mcp.call_tool("uninstall_app", { bundle_id: "com.example.app" });
UI Accessibility
get_ui_elements: Get UI element tree (accessibility hierarchy)
const uiTree = await mcp.call_tool("get_ui_elements", {});
get_element_at_point: Get UI element at specific coordinates
const element = await mcp.call_tool("get_element_at_point", { x: 200, y: 400 });
Clipboard
get_clipboard: Read clipboard content
const content = await mcp.call_tool("get_clipboard", {});
set_clipboard: Write to clipboard
await mcp.call_tool("set_clipboard", { text: "New clipboard content" });
Device Control
get_brightness / set_brightness: Control screen brightness
const brightness = await mcp.call_tool("get_brightness", {});
await mcp.call_tool("set_brightness", { level: 0.5 });
get_volume / set_volume: Control system volume
const volume = await mcp.call_tool("get_volume", {});
await mcp.call_tool("set_volume", { level: 0.7 });
Device Information
get_device_info: Get comprehensive device information
const info = await mcp.call_tool("get_device_info", {});
URL & Shell
open_url: Open URL or URL scheme
await mcp.call_tool("open_url", { url: "https://example.com" });
await mcp.call_tool("open_url", { url: "shortcuts://run-shortcut?name=MyShortcut" });
run_command: Execute shell command
const output = await mcp.call_tool("run_command", { command: "ls -la /var/mobile" });
Common Patterns
Workflow: Automate Safari Navigation
await mcp.call_tool("wake_and_home", {});
await mcp.call_tool("launch_app", { bundle_id: "com.apple.mobilesafari" });
await new Promise(resolve => setTimeout(resolve, 1000));
const screen = await mcp.call_tool("screenshot", {});
await mcp.call_tool("tap_screen", { x: 200, y: 100 });
await mcp.call_tool("input_text", { text: "https://example.com" });
await mcp.call_tool("press_key", { key: "return" });
Workflow: UI Inspection and Interaction
const uiTree = await mcp.call_tool("get_ui_elements", {});
function findButton(tree, label) {
if (tree.label === label && tree.type === "Button") {
return tree;
}
for (const child of tree.children || []) {
const found = findButton(child, label);
if (found) return found;
}
return null;
}
const button = findButton(uiTree, "Submit");
if (button && button.frame) {
const x = button.frame.x + button.frame.width / 2;
const y = button.frame.y + button.frame.height / 2;
await mcp.call_tool("tap_screen", { x, y });
}
Workflow: Install and Test App
const deviceInfo = await mcp.call_tool("get_device_info", {});
console.log(`Device: ${deviceInfo.model}, iOS: ${deviceInfo.ios_version}`);
await mcp.call_tool("install_app", { ipa_path: "/var/mobile/Documents/MyApp.ipa" });
await new Promise(resolve => setTimeout(resolve, 5000));
await mcp.call_tool("launch_app", { bundle_id: "com.example.myapp" });
const screenshot = await mcp.call_tool("screenshot", {});
await mcp.call_tool("tap_screen", { x: 200, y: 400 });
Workflow: Automated Testing Loop
async function runTest() {
await mcp.call_tool("launch_app", { bundle_id: "com.example.testapp" });
await mcp.call_tool("tap_screen", { x: 100, y: 200 });
await mcp.call_tool("input_text", { text: "Test Data" });
await mcp.call_tool("tap_screen", { x: 200, y: 500 });
const result = await mcp.call_tool("screenshot", {});
const ui = await mcp.call_tool("get_ui_elements", {});
await mcp.call_tool("kill_app", { bundle_id: "com.example.testapp" });
return { screenshot: result, ui };
}
Security & Best Practices
Important Security Notes
- No Authentication: The MCP server has no built-in authentication. Only use on trusted local networks.
- Lockscreen Protection: When device is locked or screen is off, interactive tools (tap, swipe, input, launch app, shell) are blocked. Only status queries, screenshots, and wake commands are allowed.
- Shell Command Risk:
run_command can execute arbitrary shell commands with device privileges. Use with extreme caution.
- Root Privilege: The
mcp-root helper provides root escalation for specific tools only.
Recommended Practices
- Network Security: Keep iOS MCP on a private, trusted network
- Firewall: Consider device firewall rules to limit access to port 8090
- Monitoring: Check server logs if unexpected behavior occurs
- Testing: Test automation workflows on non-production devices first
- Coordinates: Screen coordinates vary by device model and orientation - always verify with
get_screen_info
Troubleshooting
Server Not Responding
Problem: curl http://<DEVICE_IP>:8090/health fails
Solutions:
- Verify device IP address (Settings → Wi-Fi → (i) button)
- Ensure iOS MCP service is enabled in Settings → iOS MCP
- Respring SpringBoard after installation
- Check if firewall is blocking port 8090
- Ensure device and computer are on same network
Tools Return "Device Locked" Error
Problem: Tap, swipe, or input commands fail with lock error
Solutions:
- Device screen is locked or off
- Use
wake_and_home to unlock device first
- Status queries and screenshots still work when locked
Screenshot Returns Invalid Base64
Problem: Screenshot data cannot be decoded
Solutions:
- Check if screen is on (may return blank if off)
- Verify
screenshot tool returns valid JSON with image field
- Try
get_screen_info first to verify screen state
App Launch Fails
Problem: launch_app doesn't start the app
Solutions:
- Verify bundle ID is correct: use
list_apps to find exact bundle ID
- Check if app is already running: use
get_frontmost_app
- Ensure device is unlocked
- Some system apps may have restrictions
UI Elements Tree is Empty
Problem: get_ui_elements returns no elements
Solutions:
- App may not expose accessibility information
- Try on a different app (e.g., Settings, Safari)
- Ensure app is in foreground: use
get_frontmost_app to verify
Permission Errors with Shell Commands
Problem: run_command returns permission denied
Solutions:
- Check jailbreak type and permissions
- Some commands require root (automatically escalated via
mcp-root)
- Verify command syntax and paths are correct
Install App Fails
Problem: install_app returns error
Solutions:
- Verify IPA file exists at specified path
- Check IPA is valid and signed appropriately for jailbroken device
- Ensure sufficient storage space
- Path must be absolute (e.g.,
/var/mobile/Documents/app.ipa)
This skill enables AI agents to fully automate jailbroken iOS devices through MCP, providing comprehensive control over UI interactions, app management, device state, and shell access for advanced automation and testing workflows.