DS DevShelfHub Projects · AI tools
Articles / Mobile MCP: Let AI Agents Control iOS and Android Apps via Model Context Protocol

AI Tools

Mobile MCP: The Open-Source Server That Gives AI Agents Full Control Over iOS and Android Apps

By DevShelfHub

A complete technical guide to Mobile MCP — the open-source Model Context Protocol server that lets AI coding agents control native iOS and Android apps. Covers the accessibility-first architecture, all 21 MCP tools, platform support, real-world use cases, deployment modes (stdio, SSE server, headless CI), comparison with Appium and Playwright, installation guide, and a full FAQ.

Mobile MCP: The Open-Source Server That Gives AI Agents Full Control Over iOS and Android Apps

Introduction

Mobile apps have always been the hardest part of AI automation. Web automation tools like Playwright and Puppeteer handle browsers cleanly. But native iOS and Android apps? You're dealing with platform-specific SDKs, device-specific toolchains, accessibility APIs that differ between OSes, and the constant tension between simulators and real hardware. Every serious mobile testing team has a dedicated setup that took months to get right.

Mobile MCP ( github.com/mobile-next/mobile-mcp, Apache 2.0) changes this equation. It's a Model Context Protocol (MCP) server that gives any compatible AI agent — Claude, Cursor, GitHub Copilot, Gemini CLI, and 10+ more — direct, structured control over iOS and Android apps on simulators, emulators, and real physical devices. Same API, both platforms, any device.

With 5,200+ GitHub stars, 49 releases, and integration support for 13+ AI assistants, it has become one of the most-adopted MCP servers in the ecosystem. This article covers exactly how it works, what you can do with it, and when it's the right tool.

Key takeaways

  • One API, both platforms. The same MCP tools control iOS apps via WebDriverAgent and Android apps via ADB + UIAutomator — no platform-specific code in your agent.
  • Accessibility-first design. It reads native accessibility trees (no computer vision required), making interactions fast, deterministic, and cheap on tokens.
  • Works on real devices and virtual ones. iOS simulators, Android emulators, physical iPhones, and physical Android phones — all supported.
  • MCP-native: installs in 30 seconds with npx, integrates with 13+ AI assistants via standard MCP config.
  • Apache 2.0: Free for commercial use. Headless and SSE server modes for CI/CD and remote team workflows.

The problem: mobile apps are automation dead zones for AI agents

AI agents that work with web apps can use browser-native tools: Playwright MCP, browser use, Puppeteer, and a dozen others give them a clean interface to the DOM. But ask an AI agent to open the Instagram app, search for a specific post, and screenshot the comments section — and you hit a wall immediately.

Why native mobile automation has been painful

  • Two completely different toolchains. iOS automation requires Xcode, WebDriverAgent, xcrun, and xctest. Android requires ADB, UIAutomator, and the Android SDK. Different APIs, different commands, different failure modes.
  • No standard protocol. Appium provides a WebDriver API but requires a running server process, complex capabilities configuration, and session management — all before you can tap a button.
  • AI agents can't use traditional test frameworks. Appium, XCTest, and Espresso were designed for deterministic test scripts written by humans, not for AI agents that decide what to do next based on what they see on screen.
  • Computer-vision-only tools are fragile and expensive. Tools that just take screenshots and ask an LLM "where should I tap?" work but burn tokens, are slow, and fail when UI elements are small or overlapping.

Mobile MCP solves this by wrapping the native platform toolchains (WebDriverAgent for iOS, ADB + UIAutomator for Android) in a clean, unified MCP interface. The AI agent speaks MCP — a standard it already knows — and Mobile MCP translates those calls into the right platform-native operations.

How Mobile MCP works: the architecture

Mobile MCP is a TypeScript MCP server (94.9% TypeScript, 5.1% JavaScript) that sits between your AI agent and the mobile device. When the agent calls a tool like mobile_launch_app, Mobile MCP translates that into the appropriate platform-native command and returns a structured result the agent can reason about directly.

1

Agent calls MCP tool

Your AI agent (Claude, Cursor, etc.) calls one of Mobile MCP's tools via the MCP protocol: mobile_list_elements_on_screen, mobile_click_on_screen_at_coordinates, etc. The call includes parameters like coordinates or app bundle IDs.

2

Platform routing

Mobile MCP detects the target device type and routes to the appropriate platform layer. iOS devices connect through WebDriverAgent and Xcode command-line tools. Android devices connect through ADB (Android Debug Bridge) and UIAutomator.

3

Accessibility tree extraction (primary path)

Whenever possible, Mobile MCP reads the native accessibility tree — the structured hierarchy of UI elements that every iOS and Android app exposes for assistive technologies. This returns elements with labels, bounds, enabled state, and interaction hints. No screenshot analysis needed. No computer vision. Fast and deterministic.

4

Screenshot fallback (when accessibility unavailable)

When an app's accessibility tree is sparse or unavailable (some games, canvas-heavy apps, video players), Mobile MCP captures a screenshot and passes it to the LLM for visual analysis. The LLM determines the target coordinates and Mobile MCP executes a coordinate-based tap.

5

Structured result returned

Results come back as structured data the agent can immediately act on: element lists with coordinates, screenshots as base64, orientation as a string, installed apps as a list of bundle IDs. No manual parsing, no fragile regex over shell output.

AI Agent (Claude / Cursor / Copilot / …)
         │  MCP protocol
         ▼
  ┌─────────────────────────────────────────┐
  │          Mobile MCP Server              │
  │   npx @mobilenext/mobile-mcp@latest     │
  │                                         │
  │  ┌────────────────────────────────┐     │
  │  │  Accessibility Tree (primary)  │     │
  │  │  Fast · Deterministic · Free   │     │
  │  └────────────┬───────────────────┘     │
  │               │ (fallback if unavail.)  │
  │  ┌────────────▼───────────────────┐     │
  │  │  Screenshot + LLM analysis     │     │
  │  │  Coordinate-based taps         │     │
  │  └────────────────────────────────┘     │
  └──────┬──────────────────┬──────────────┘
         │                  │
    WebDriverAgent        ADB + UIAutomator
    (Xcode · xcrun)       (Android SDK)
         │                  │
    iOS Devices          Android Devices
    Real + Simulator     Real + Emulator

The accessibility-first design: why it matters

The central design choice in Mobile MCP is to prefer native accessibility trees over screenshots. This deserves explanation because it's the key difference between Mobile MCP and simpler screenshot-based automation tools.

Screenshot-only approach

  • LLM must visually parse where elements are
  • High token usage — full image per step
  • Fragile with small buttons, overlapping UI
  • Slow — round trip to vision model on every action
  • Non-deterministic — same screen may get different coordinates

Accessibility tree approach

  • Returns structured data: label, bounds, enabled, type
  • Minimal tokens — text hierarchy, not image bytes
  • Works even when elements are visually tiny or hidden
  • Fast — local parsing of accessibility API output
  • Deterministic — same screen always returns same data

Every iOS and Android app exposes an accessibility tree for screen readers like VoiceOver and TalkBack. Mobile MCP taps into the same API. If an app has good accessibility labels (most production apps do), your AI agent gets a fully structured map of the current screen state without ever looking at a pixel. The screenshot fallback exists for edge cases — games, video apps, canvas UIs — where accessibility data is minimal.

// Example: mobile_list_elements_on_screen result
[
  {
    "label": "Sign In",
    "type": "Button",
    "bounds": { "x": 80, "y": 340, "width": 240, "height": 48 },
    "enabled": true,
    "accessible": true
  },
  {
    "label": "Email address",
    "type": "TextField",
    "bounds": { "x": 40, "y": 260, "width": 320, "height": 44 },
    "value": "",
    "enabled": true
  }
]
// Agent can act directly on this — no vision model needed

Complete MCP tools reference

Category Tool name What it does
Device Managementmobile_list_available_devicesEnumerate all connected simulators, emulators, and physical devices
mobile_get_screen_sizeReturn display dimensions in pixels (width × height)
mobile_get_orientationDetect current portrait / landscape state
mobile_set_orientationSwitch device orientation programmatically
App Managementmobile_list_appsList all installed applications with bundle / package IDs
mobile_install_appDeploy .apk, .ipa, .app, or .zip packages to the target device
mobile_launch_appStart an app by its package name or bundle identifier
mobile_terminate_appForce-stop a running application
mobile_uninstall_appRemove an application by its ID
Screen Interactionmobile_take_screenshotCapture the current display state as an image
mobile_save_screenshotPersist the captured image to the filesystem
mobile_list_elements_on_screenExtract all UI elements from the accessibility tree with coordinates, labels, and types
mobile_click_on_screen_at_coordinatesTap at a specific x,y pixel position
mobile_double_tap_on_screenExecute a double-tap gesture at coordinates
mobile_long_press_on_screen_at_coordinatesExecute an extended touch (long press) for context menus
mobile_swipe_on_screenDirectional swipe gesture (up / down / left / right)
mobile_get_crashRetrieve latest crash logs for diagnostic purposes
Input & Navigationmobile_type_keysEnter text into the focused element, with optional form submission
mobile_press_buttonActivate device buttons: HOME, BACK, VOLUME_UP, VOLUME_DOWN, ENTER
mobile_open_urlLaunch a URL in the device's default browser or a deep-link in an app
mobile_list_crashesList all available crash log files for review

Supported platforms and devices

Platform Status Underlying technology Prerequisite
iOS Simulator✓ SupportedWebDriverAgent, xcrun simctlXcode command-line tools
iOS Real Device✓ SupportedWebDriverAgent, xctestXcode + provisioning profile
Android Emulator✓ SupportedADB, UIAutomatorAndroid Platform Tools, AVD Manager
Android Real Device✓ SupportedADB, UIAutomatorAndroid Platform Tools, USB debugging on

All four combinations work through the same MCP tool names. The agent doesn't need to know whether it's talking to a simulator or a real device — the server handles the routing transparently.

Real-world use cases

AI-driven mobile testing and QA

Instead of writing Espresso or XCUITest scripts for every UI flow, you describe the test to your AI agent in natural language: "Launch the app, sign in with test@example.com, navigate to the payment screen, and verify the total matches the cart." The agent uses Mobile MCP to execute each step on the actual device, screenshots the result, and reports pass/fail with evidence.

No test code to maintain. No script to update when the UI changes. The agent adapts to UI changes by re-reading the accessibility tree on each step.

Multi-step agent workflows

Agents can execute complex, multi-step workflows that span multiple apps and system state:

  • Open YouTube, search for a topic, find a video, like it, copy the link, switch to a messaging app, paste the link, send the message
  • Open App Store, find an app, install it, launch it, complete onboarding, leave a review
  • Open a booking app, search for availability, select an option, fill payment details, confirm booking, screenshot the confirmation
  • Open settings, toggle Wi-Fi, open a target app, perform actions, toggle Wi-Fi back on
  • Launch multiple apps in sequence and capture screenshots for a visual regression report

Data extraction and mobile scraping

The mobile_list_elements_on_screen tool returns structured data from the accessibility tree — which means you can extract content from apps that don't have public APIs, or where the web version differs from the native experience. Product prices, review scores, feed content, profile data — whatever is visible in the app is accessible as structured text.

Regression testing for mobile app releases

Before shipping a new app version, an agent can run through a checklist of critical user journeys across multiple device types (iPhone 15, iPhone SE, Pixel 9, Samsung Galaxy) using different simulators/emulators, capturing screenshots at each step and flagging visual regressions against a golden baseline.

Demo and presentation automation

Run a prepared demo script on a real device — the agent navigates through the app, performs actions, and the human presenter can narrate without touching the device. Useful for investor demos, user research sessions, and product walkthroughs.

Supported AI assistants (13+)

Mobile MCP speaks standard MCP, so it works with any MCP-compatible AI client. The repository includes platform-specific installation instructions for each of the following:

Platform Integration method
Claude Codeclaude mcp add mobile-mcp -- npx -y @mobilenext/mobile-mcp@latest
Claude DesktopAdd JSON block to claude_desktop_config.json
CursorOne-click install button in MCP marketplace or manual .cursor/mcp.json
GitHub Copilot/mcp add CLI command
WindsurfMCP server configuration in Windsurf settings
Gemini CLIDirect CLI registration via gemini mcp add
Codex (OpenAI)TOML configuration support in Codex config file
ClineJSON MCP settings file integration
AmpVS Code extension configuration panel
Kiro.kiro/settings/mcp.json configuration
OpenCode~/.config/opencode/opencode.json
GooseExtension install with custom settings
Qodo GenVSCode / IntelliJ chat panel integration

The standard JSON config works across most platforms:

{
  "mcpServers": {
    "mobile-mcp": {
      "command": "npx",
      "args": ["-y", "@mobilenext/mobile-mcp@latest"]
    }
  }
}

Installation and quick start

Prerequisites: Node.js v22+, and the platform tools for your target device type.

  • iOS: Xcode + Xcode command-line tools (xcode-select --install)
  • Android: Android Platform Tools (brew install android-platform-tools on macOS, or download from developer.android.com)

Claude Code (one command)

claude mcp add mobile-mcp -- npx -y @mobilenext/mobile-mcp@latest

All other platforms (JSON config)

{
  "mcpServers": {
    "mobile-mcp": {
      "command": "npx",
      "args": ["-y", "@mobilenext/mobile-mcp@latest"]
    }
  }
}

Start a simulator and try it

# Boot an iOS simulator (headless, no GUI)
xcrun simctl boot "iPhone 16"

# Then ask your AI agent:
# "List available devices"
# → mobile_list_available_devices

# "Launch the Settings app"
# → mobile_launch_app { "bundleId": "com.apple.Preferences" }

# "Take a screenshot and list the elements on screen"
# → mobile_take_screenshot + mobile_list_elements_on_screen

Android emulator workflow

# Start Android emulator
emulator -avd Pixel_9_API_35 -no-window &

# Verify ADB can see the device
adb devices

# Then through your AI agent:
# "Install the app from /path/to/app.apk"
# → mobile_install_app { "path": "/path/to/app.apk" }

# "Launch the app and take a screenshot"
# → mobile_launch_app + mobile_take_screenshot

Deployment modes

stdio mode (default)

Standard MCP stdio transport. Runs as a child process of the AI assistant. No network port. Best for individual developer use.

npx @mobilenext/mobile-mcp@latest

SSE / HTTP server mode

Binds to a port (default 3000). Multiple clients connect to http://<host>:3000/mcp. Useful for team setups or remote device farms.

npx @mobilenext/mobile-mcp@latest --listen 3000

Headless mode

Run simulators / emulators without GUI display. Suitable for CI/CD pipelines where no display is available.

xcrun simctl boot "iPhone 16" && npx @mobilenext/mobile-mcp@latest

Authentication (SSE mode)

# Set a bearer token for the server
MOBILEMCP_AUTH=my-secret-token npx @mobilenext/mobile-mcp@latest --listen 3000

# Clients must send: Authorization: Bearer my-secret-token

Telemetry opt-out

Mobile MCP collects anonymous usage telemetry via PostHog by default. Disable it completely:

MOBILEMCP_DISABLE_TELEMETRY=1 npx @mobilenext/mobile-mcp@latest

Mobile MCP vs. alternatives

Tool Primary use AI agent friendly? iOS + Android? Real devices?
Mobile MCPAI agent mobile controlYes — MCP nativeYes — unified APIYes
AppiumScripted UI test automationWith wrappers onlyYes — WebDriverYes
Playwright (Mobile)Browser automation + mobile webVia Playwright MCPWeb only, not nativeBrowser-based only
XCUITestiOS UI test scriptingNot designed for AIiOS onlyYes
EspressoAndroid UI test scriptingNot designed for AIAndroid onlyYes
Screenshot + LLMVision-based controlYes — directYesYes

Mobile MCP's core advantage over screenshot-only approaches is the accessibility tree path. Its advantage over Appium/XCUITest/Espresso is the AI-native MCP interface — no session management, no capabilities configuration, no test framework boilerplate. Its limitation versus Appium is that Appium is more mature for complex scripted test suites and has better existing ecosystem tooling (reporting, CI integrations, cloud device farms).

Pros and cons

Advantages

  • +Unified iOS + Android API — no platform-specific agent code
  • +Accessibility-first: deterministic, fast, minimal token usage
  • +Works on real devices and virtual ones interchangeably
  • +MCP-native: 30-second install, works with 13+ AI assistants
  • +Apache 2.0 — free for commercial use, no vendor lock-in
  • +SSE server mode for team device farms and remote workflows
  • +Headless mode for CI/CD pipeline integration
  • +Screenshot fallback for apps with limited accessibility support
  • +Crash log retrieval built in for debugging workflows
  • +Active development: 49 releases, Slack community, public roadmap

Limitations

  • Requires local platform toolchain setup (Xcode or Android SDK) — not zero-config for all environments
  • macOS required for iOS simulator support (Xcode is macOS-only)
  • Accessibility tree quality depends on the target app — games, WebGL, and canvas apps may need screenshot fallback
  • No built-in test reporting or assertion framework — agent provides those
  • Real device provisioning for iOS (provisioning profiles, code signing) adds setup complexity
  • No native support for cloud device farms (BrowserStack, LambdaTest) in current release
  • Still pre-1.0 (v0.0.59) — API may change between minor versions

Frequently asked questions

Do I need to install anything besides Node.js?
Yes. For iOS: Xcode and Xcode command-line tools (xcode-select --install). For Android: Android Platform Tools (adb) from the Android SDK or via brew. Mobile MCP itself installs via npx with no global install required. Node.js v22 or higher is required.
Does it work with physical iPhones and Android phones?
Yes, both are supported. For physical iPhones, you need a valid provisioning profile and the device must be trusted on the Mac running Mobile MCP. For Android physical devices, you need USB debugging enabled in developer options, and ADB must be able to see the device via adb devices.
What is the accessibility tree and why does it matter?
Every iOS and Android app exposes a structured hierarchy of UI elements to the operating system for accessibility purposes (screen readers like VoiceOver and TalkBack use it). Mobile MCP reads this same data, getting element labels, types, bounds, and interaction state as structured text — without needing to analyse a screenshot. This is faster, uses fewer tokens, is deterministic (same screen always returns the same data), and works even when UI elements are visually small or overlapping.
What happens when an app doesn't have good accessibility labels?
Mobile MCP falls back to screenshot-based coordinate interactions. It takes a screenshot, passes it to the LLM, which determines where to tap, and Mobile MCP executes the coordinate-based tap. This path is slower and uses more tokens but handles apps where the accessibility tree is sparse — common with games, video players, and canvas-heavy UIs.
Can I run Mobile MCP in CI/CD without a display?
Yes. Boot simulators/emulators without a GUI before running Mobile MCP: xcrun simctl boot "iPhone 16" for iOS, emulator -avd MyAVD -no-window for Android. Then run Mobile MCP in its standard stdio or SSE mode. This is the headless operation mode documented for CI workflows.
How does Mobile MCP differ from Appium?
Appium is designed for deterministic, human-written test scripts using the WebDriver protocol. It's mature, has broad ecosystem support, and integrates with cloud device farms (BrowserStack, LambdaTest). Mobile MCP is designed for AI agent-driven workflows using the MCP protocol — no test framework, no session management boilerplate, and it integrates directly with AI assistants like Claude and Cursor. Appium is better for existing test automation pipelines; Mobile MCP is better when an AI agent needs to make real-time decisions about what to do based on screen state.
Is Mobile MCP production-ready?
It is at v0.0.59 (as of June 2026), meaning the API is still evolving. Many teams use it in production for internal automation workflows, but you should pin to a specific version (@mobilenext/mobile-mcp@0.0.59) in CI to avoid unexpected breaking changes. The core tool set has been stable across recent releases. The project has an active Slack community and public roadmap on GitHub.
Can multiple AI assistants connect to the same Mobile MCP instance?
Yes, with SSE server mode. Start the server with --listen 3000 and bind to 0.0.0.0:3000 for network access. Set MOBILEMCP_AUTH for bearer token security. Multiple AI clients can then connect to http://<host>:3000/mcp, making this suitable for a shared team device farm where different developers' AI assistants all connect to one server managing shared devices.
Does it support installing .ipa files on real iPhones?
Yes. mobile_install_app supports .apk (Android), .ipa (iOS real device), .app (iOS simulator), and .zip packages. For .ipa installation on a real iPhone, the device must be registered in your provisioning profile or you need an enterprise distribution certificate. The ad-hoc distribution limitations from Apple apply.

Final verdict

Mobile MCP occupies a unique and important position in the AI tooling landscape. Mobile apps have always been the hardest surface for automation — and they've been essentially inaccessible to AI agents until now. Mobile MCP bridges this gap cleanly: one MCP server, both platforms, real devices and virtual ones, with an accessibility-first design that makes interactions faster and cheaper than screenshot-only alternatives.

Use Mobile MCP if you…

  • Want AI agents to interact with native iOS or Android apps
  • Need mobile QA automation without maintaining test scripts
  • Use Claude Code, Cursor, Copilot, Gemini CLI, or any other MCP client
  • Want to run automation on both simulators and real devices
  • Need to extract structured data from apps without public APIs
  • Want CI/CD integration with headless device automation

Consider alternatives if you…

  • Need mature test reporting, CI integrations, and cloud device farm support
  • Only need browser-based mobile testing (use Playwright instead)
  • Require a stable, versioned API for long-lived test suites (pre-1.0 caveats apply)
  • Work primarily on Windows (iOS simulation requires macOS)

For any team that uses AI coding assistants and ships mobile apps, Mobile MCP deserves a serious look. The 30-second install, clean MCP interface, and accessibility-first design mean the barrier to getting value is low — boot a simulator, add the MCP config, and ask your AI agent to run through a user flow. The results speak for themselves.