Mcp Ios

io.github.dockndevai由 GitHub 账号 dockndevai 发布v0.1.0更新于 Oct 24, 2026

Drive iPhone/iPad via Appium/WebDriverAgent from AI agents — safe-by-default, read-only by default.

已验证STDIO仅桌面浏览器自动化开发者工具

概览

AI 生成的概览

通过 Appium 与 WebDriverAgent 操控连接的 iPhone 或 iPad,让助手查看屏幕,并在开启后执行点击、输入和启动应用等操作。

可以做什么
  • 检查设备:列出目标设备、读取设备信息、当前应用和已安装应用
  • 截取屏幕:获取以图片形式返回的截图并读取元素树
  • 控制界面:点击、滑动、输入文字、按硬件按键、启动应用和打开网址
  • 在设备上运行快捷指令
  • 在管理员模式下管理应用:安装、终止和重置应用,破坏性操作需人工确认
适用场景
适合在 Mac 上让助手查看或操作自己的 iPhone 或 iPad,例如自动化测试、了解屏幕内容,或在自有设备上执行少量应用操作。只需查看时建议使用只读模式。
运行要求
需在 Mac 上通过 npx 以 Node.js 本地运行,并需要运行中的 Appium 服务器与 XCUITest 驱动、Xcode 及命令行工具、已签名到设备的 WebDriverAgent,以及通过 USB 或同一网络连接并开启开发者模式的 iPhone 或 iPad。通过 IOS_APPIUM_URL、IOS_UDID、IOS_MODE 等变量配置;未声明账号或 API 密钥。
安装前请注意
读写和管理员模式允许助手在真实设备上点击、输入、启动应用、打开网址以及安装、终止或重置应用,可能改动或删除应用数据。终止和重置仅在支持 elicitation 的客户端中请求人工确认,否则依赖 IOS_ALLOW_MANAGE 开关。受保护应用不会被终止或卸载,默认会向 stderr 写入审计日志。除非确需控制,否则保持只读模式。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Ios,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

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:

RouteControl levelNeedsNotes
Appium + WebDriverAgent (XCUITest) ✅ (this server)Full UI: tap, type, swipe, read elements, screenshots, launch appsA Mac with Xcode; iPhone connected by USB (or same-network); WDA signed to the deviceThe real "phone-use". Built for automation/QA — perfect for a personal agent on your own device.
ShortcutsRun user-defined actions (set alarm, send message, toggles)Shortcuts app; a URL/x-callback bridgeNo arbitrary UI control, but great for safe, specific actions. Exposed here via run_shortcut.
MDMPolicy/config, app installEnrollmentDevice 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.

Setup (Appium route)

bash
brew install nodenpm i -g appiumappium 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 deviceappium        # 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

ConcernFlagDefaultEffect
What can the server do?IOS_MODEread-onlyread-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.
Which apps are read-only forever?IOS_PROTECTED_APPScom.apple.Preferences, com.apple.springboardInspectable/launchable but never terminated, reset, or uninstalled.
Can it install/terminate/reset apps?IOS_ALLOW_MANAGEfalseThe admin tools need this and admin mode; otherwise they aren't even advertised.
Interactive confirmation(automatic)—terminate_app and reset_app prompt the human to approve the exact bundle ID via MCP elicitation before running; clients without elicitation fall back to the IOS_ALLOW_MANAGE gate.
Preview without touching the deviceIOS_DRY_RUNfalseWrite/admin tools validate + log intent, then return.
Audit trailIOS_AUDIT_LOGtrueEmits 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 (the last two confirm via elicitation; protected apps refused)

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)

bash
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:

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:

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)

bash
npm installnpm run buildnode dist/index.js   # with the environment variables set, and `appium` running

Develop

bash
npm run devnpm 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

来源:README.md,提交 913f23c

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Oct 14, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分