Skip to main content
Glama

mcp-ios

CI CodeQL License: MIT npm

A Model Context Protocol server to drive an iPhone/iPad — the iOS counterpart to mcp-android. Read this first: iOS is fundamentally more locked down than Android or macOS, so this server takes the only legitimate route to real UI control.

The honest landscape

A stock iPhone does not allow a background app to see and control other apps the way Android's Accessibility service (or macOS) does. Apple's sandbox forbids it. So there is no on-device "iOS-use" agent like the Mac/Android ones. The viable routes, in order of capability:

Route

Control level

Needs

Notes

Appium + WebDriverAgent (XCUITest) ✅ (this server)

Full UI: tap, type, swipe, read elements, screenshots, launch apps

A Mac with Xcode; iPhone connected by USB (or same-network); WDA signed to the device

The real "phone-use". Built for automation/QA — perfect for a personal agent on your own device.

Shortcuts

Run user-defined actions (set alarm, send message, toggles)

Shortcuts app; a URL/x-callback bridge

No arbitrary UI control, but great for safe, specific actions. Exposed here via run_shortcut.

MDM

Policy/config, app install

Enrollment

Device management, not interactive control.

This server implements the Appium/WDA route: it runs on a Mac, talks to a local Appium server driving WebDriverAgent on the tethered iPhone, and exposes the same safe-by-default MCP shape as the rest of the suite. A set_alarm-style action can also go through Shortcuts (run_shortcut) when the device isn't tethered.

If you want control from the phone itself with nothing attached, that isn't possible on iOS — use mcp-android on the Fold 7 for that experience, or the Shortcuts subset here.

Related MCP server: ios-device-mcp

Setup (Appium route)

brew install node
npm i -g appium
appium driver install xcuitest
# Xcode + command line tools installed; sign WebDriverAgent to your device once (Xcode)
# Connect the iPhone by USB, Trust the Mac, enable Developer Mode on the device
appium        # starts the Appium server (default http://127.0.0.1:4723)

The server creates the XCUITest session lazily on the first tool call, so it starts even before Appium or the device are up — the first call that needs the device returns a clear "start appium / sign WDA / connect the device" message if it can't connect.

Security model

Concern

Flag

Default

Effect

What can the server do?

IOS_MODE

read-only

read-only exposes inspection only; read-write adds UI control; admin adds app management. Tools above the mode are never registered.

Which apps are in scope?

IOS_APP_ALLOWLIST

(all)

When set, launching/managing any other bundle ID is refused. install_app checks the bundle ID read from the .ipa/.app (before the approval prompt, also in dry-run) and refuses a bundle whose ID cannot be read. open_url and run_shortcut count as launching the stock app that handles them (Safari for http(s), Phone for tel:, Mail for mailto:, FaceTime, Maps, and com.apple.shortcuts), so those must be allowlisted too; an IOS_EXTRA_URL_SCHEMES scheme (handler unknown) is refused while an allowlist is set.

Which apps are read-only forever?

IOS_PROTECTED_APPS

com.apple.Preferences, com.apple.springboard

Inspectable/launchable but never terminated, reset, or uninstalled. install_app counts as replacing the app: a bundle whose ID is protected is refused, and so is one whose ID cannot be read (the protected list is non-empty by default).

Which URLs can open_url open?

IOS_EXTRA_URL_SCHEMES

(none)

Only http, https, tel, mailto, facetime and maps URLs are opened; other schemes (shortcuts:, prefs:/App-Prefs:, itms-services:, custom app schemes, ...) are refused, as are URLs containing control characters. Comma-separated list adds more. The check runs before the dry-run branch.

Can it install/terminate/reset apps?

IOS_ALLOW_MANAGE

false

The admin tools need this and admin mode; otherwise they aren't even advertised.

Interactive confirmation

(automatic)

—

install_app, terminate_app and reset_app prompt the human to approve via MCP elicitation before running. The prompt shows the tool, the exact arguments and a fingerprint; for install_app also the bundle path, the bundle ID/version read from it, the device, and whether it replaces an installed app. The target's version (the app's installed version, or the .ipa/.app file's size + mtime + inode) and the device are pinned across the prompt and the action is refused if they changed; a prompt nobody answers is a refusal. IOS_DRY_RUN returns before the prompt.

Require a human

IOS_REQUIRE_HUMAN_APPROVAL

false

When true, install_app / terminate_app / reset_app are refused if the client cannot elicit (instead of falling back to the IOS_ALLOW_MANAGE gate alone).

Preview without touching the device

IOS_DRY_RUN

false

Write/admin tools validate + log intent, then return.

Audit trail

IOS_AUDIT_LOG

true

Emits a JSON line to stderr per guarded operation.

Connection: IOS_APPIUM_URL (default http://127.0.0.1:4723), IOS_UDID (target device), IOS_BUNDLE_ID (optional default app). See .env.example for all variables and docs/CLIENTS.md for the full per-client install guide.

Tools

Read (read-only+): list_targets, device_info, screenshot, page_source (element tree), current_app, list_apps

Write (read-write+): tap, swipe, input_text, press_button (home/volume), launch_app, open_url, run_shortcut (via Shortcuts)

Admin (admin + IOS_ALLOW_MANAGE): install_app, terminate_app, reset_app (all three confirm via elicitation; install_app takes a local .ipa/.app path only, not a URL; protected apps refused for terminate/reset)

Every tool also advertises MCP tool annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) so hosts can decide what to auto-approve.

screenshot returns an MCP image content block so the agent can see the screen before acting.

Quickstart — add to your agent

Published on npm as @dockndevai/mcp-ios. No clone or build needed — your MCP client runs it on demand with npx. It must run on the Mac with a running Appium server. Start in read-only mode.

Claude Code (CLI)

claude mcp add ios -e IOS_APPIUM_URL="http://127.0.0.1:4723" -e IOS_MODE="read-only" -- npx -y @dockndevai/mcp-ios

Claude Desktop · Cursor · Windsurf — same block in claude_desktop_config.json, .cursor/mcp.json, or ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "ios": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-ios"
      ],
      "env": {
        "IOS_APPIUM_URL": "http://127.0.0.1:4723",
        "IOS_MODE": "read-only"
      }
    }
  }
}

VS Code (GitHub Copilot, Agent mode) — in .vscode/mcp.json:

{
  "servers": {
    "ios": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-ios"
      ],
      "env": {
        "IOS_APPIUM_URL": "http://127.0.0.1:4723",
        "IOS_MODE": "read-only"
      }
    }
  }
}

Example prompts

  • "Take a screenshot of my phone and tell me what's on screen."

  • "Open Safari and go to news.ycombinator.com." (needs read-write)

  • "Run my 'Good morning' Shortcut." (needs read-write)

Run from source (development)

npm install
npm run build
node dist/index.js   # with the environment variables set, and `appium` running

Develop

npm run dev
npm test          # security policy + elicitation confirmation (pure; no device needed)
npm run typecheck

The policy and elicitation tests are pure and run anywhere. The device-driving path can't be smoke-tested without a Mac + Xcode + signed WDA + a tethered iPhone, so it's built against your real device setup.

Publishing

This server ships a server.json for the official MCP registry and an mcpName for npm ownership validation. See PUBLISHING.md for publishing to npm and listing on the MCP registry, Smithery, Glama, Cursor, and PulseMCP.

License

MIT

Available Tools

6 tools
current_appCurrent appB

The app (bundle ID / process) currently in the foreground.

Inputs: no named parameters.

device_infoDevice infoA

Session capabilities and device info (model, iOS version, screen) reported by WebDriverAgent.

Inputs: no named parameters.

list_appsList appsB

List installed apps (best-effort; depends on the WebDriverAgent build).

Inputs: no named parameters.

list_targetsList targetsB

Show the configured Appium connection (URL, target UDID, default bundle ID) and, best-effort, the devices/simulators attached to this Mac.

Inputs: no named parameters.

page_sourceElement treeA

Dump the current screen's XCUITest element tree (XML) with labels, types, and bounds — use it to find exact tap coordinates.

Inputs: no named parameters.

screenshotScreenshotA

Capture the current screen as a PNG image so you can see what's on the phone before acting.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 6 tools

    Disambiguation4/5

    Most tools are clearly distinct (screenshot vs page_source vs current_app vs list_apps). However, list_targets and device_info overlap somewhat: both report device/connection information, which could cause an agent to pick the wrong one when it just wants device details.

    Naming Consistency3/5

    All names use snake_case, which is consistent, but the naming convention mixes verb_noun (list_targets, list_apps) with noun phrases (device_info, screenshot, page_source, current_app). It is readable but not a predictable verb-first pattern throughout.

    Tool Count4/5

    Six tools is a reasonable, well-scoped set for an inspection-oriented iOS/Appium bridge, and each tool earns its place. It is slightly thin for full iOS automation, but the count itself is not excessive or trivial.

    Completeness2/5

    The surface is inspection-only: there are no interaction tools such as tap, type text, swipe, launch/terminate app, or navigation. Since screenshot and page_source are explicitly framed as preparation 'before acting,' the absence of any acting tools is a significant gap that will block agent workflows.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables agents to control a physical iPhone from macOS through local phone tools, including USB capture, Bluetooth HID, and AssistiveTouch interactions. It also exposes relay tools for remote access over Streamable HTTP with optional OAuth.
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables controlling a real iPhone or iPad over USB for app development testing, including building and installing apps, launching with console logs, inspecting the accessibility tree, tapping, swiping, typing, taking screenshots, managing app files, and recording audio.
      29
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to operate a real iPhone from a Mac by reading the screen over USB and sending taps, swipes, typing, and app launches over Bluetooth, with every action returning a fresh screenshot so the agent can verify its work. Runs as a local MCP server, so agents can test iOS apps on physical devices and automate everyday phone tasks.
      40 npm
      10
      MIT
    • A
      license
      B
      quality
      F
      maintenance
      Enables AI agents to see and operate a real USB-connected iPhone from a Linux Docker host — taking screenshots with region zoom, reading the element tree, tapping, swiping, long-pressing, typing text, pressing hardware buttons, listing/launching/terminating apps, and opening URLs. Automatically recovers from replugs and crashes, re-signs its automation agent before expiry, and falls back to a signing-free HID path on newer iOS.
      13
      MIT