Logo IPhone MCP

IPhone MCP

Tổ chức
blitzdotdev

The MCP Server the lets AI use an iPhone

Nhà phát hànhblitzdotdev
Kho mãiPhone-mcp
Ngôn ngữTypeScript
Bản fork
16
Sao
92
Công cụ có sẵn
10
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    IPhone MCP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 10 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    92 sao và 16 bản fork từ kho mã được liên kết.

Website Discord npm

iPhone-mcp

MCP server that lets AI agents control real iPhones and iPhone simulators on MacOS. Works with Claude Code, Cursor, Codex, OpenCode, and any MCP-compatible AI agent.

Requirements

  • macOS
  • Xcode (install from App Store or xcode-select --install)
  • Node.js 18+
  • Homebrew

Installation

bash
npm install @blitzdev/iphone-mcp

Quick Start

Global (use in any project)

bash
npx @blitzdev/iphone-mcp --setup-all

This installs dependencies and configures @blitzdev/iphone-mcp for all your AI agents. It automatically sets up Claude Code, Cursor, Codex, OpenCode.

NOTE: For Cursor, you need to enable the blitz-iphone MCP server in Cursor Settings

Project-scoped (one project only)

bash
cd <your project>
npx @blitzdev/iphone-mcp --setup-here

This prompts you to choose which AI agents to configure (Claude Code, Cursor, Codex, OpenCode) and writes the config files into your project directory. @blitzdev/iphone-mcp will only be available when you open an agent inside that directory.

Then just ask

Open a new AI agent session and ask:

> scan the simulator screen and tell me what you see
> connect to my iPhone and test the login flow
> find bugs in my app — tap around, try edge cases, report anything weird

What can it do?

CapabilitySimulatorPhysical iPhone
Tap, swipe, type textYesYes
Press buttons (Home, Lock, Siri)YesYes
Scan UI elements with coordinatesYesYes
Take screenshotsYesYes
List & launch installed appsYesYes
Auto-detect devicesYesYes
Live screen viewer in browser--Yes

iPhones

Connect your iPhone via USB or make sure it's on the same Wi-Fi network (home/office networks work, public cafe Wi-Fi won't).

First-time setup — your iPhone needs:

  1. Developer Mode enabled (Settings > Privacy & Security > Developer Mode)
  2. Trust this computer when prompted on the phone

Then ask your agent:

> connect to my iPhone

The agent will build and install WebDriverAgent on your phone (takes 1-3 minutes the first time), then give you a URL like http://localhost:5152?udid=... — open it in your browser to see a live view of your phone screen.

Simulators

Boot any iPhone simulator, then ask your AI agent to interact with it. No extra setup needed beyond --setup-all or --setup-here.

> what apps are installed on the simulator?
> launch Safari and go to example.com
> take a screenshot

Example session

You:    test the checkout flow in my app
Agent:  Let me scan the simulator to see what's on screen.

        [calls scan_ui]

        I can see the home screen. Let me launch your app first.

        [calls launch_app with bundleId "com.myapp"]
        [calls get_screenshot]

        The app is open on the main screen. I see a "Shop" tab at the bottom.
        Let me tap it and walk through the checkout flow.

        [calls device_action: tap on "Shop" tab]
        [calls scan_ui]

        I see a list of products. Let me add one to cart...

MCP Tools reference

These are the tools your AI agent can call:

ToolWhat it does
get_execution_contextFind available simulators and iPhones
scan_uiFind tappable elements — buttons, links, text fields — with their coordinates
describe_screenFull UI element hierarchy (more detail than scan_ui)
device_actionTap, swipe, press buttons, type text, press keys
device_actionsRun multiple actions in sequence
get_screenshotSave a screenshot and return the file path
list_devicesList all simulators and physical devices
launch_appLaunch an app by bundle ID
list_appsList installed apps
setup_deviceBuild & install WebDriverAgent on a physical iPhone

Manual MCP configuration

If you'd rather configure things yourself:

Claude Code — add to ~/.claude.json (global) or .mcp.json (project):

json
{
  "mcpServers": {
    "blitz-iphone": {
      "command": "npx",
      "args": ["@blitzdev/iphone-mcp"]
    }
  }
}

Cursor — add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):

json
{
  "mcpServers": {
    "blitz-iphone": {
      "command": "npx",
      "args": ["@blitzdev/iphone-mcp"]
    }
  }
}

Codex — add to ~/.codex/config.toml (global) or .codex/config.toml (project):

toml
[mcp_servers.blitz-iphone]
command = "npx"
args = ["@blitzdev/iphone-mcp"]

OpenCode — add to opencode.json in your project root:

json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "blitz-iphone": {
      "type": "local",
      "command": ["npx", "-y", "@blitzdev/iphone-mcp"],
      "enabled": true
    }
  }
}

Troubleshooting

"No booted simulator found" — Open Simulator.app or run xcrun simctl boot "iPhone 16" first.

Physical device not detected — Make sure Developer Mode is on, the phone is connected via USB, and you've tapped "Trust" on the phone.

WDA build fails — Open Xcode > Settings > Accounts and make sure an Apple ID is signed in. Xcode needs a signing identity to build WDA.

"Connection refused" errors — The idb companion may have crashed. Run npx @blitzdev/iphone-mcp --setup-all again to re-initialize.

License

MIT

Cài đặt

TypingMind
{
  "mcpServers": {
    "iphone-mcp": {
      "command": "npx",
      "args": [
        "@blitzdev/iphone-mcp"
      ]
    }
  }
}

Công cụ có sẵn

  • describe_screen

    Get the full UI element hierarchy of the current screen. Returns ALL element types (buttons, text, images, containers, etc.) that are currently visible on screen.

    Filters applied automatically:

    • Off-screen elements are excluded
    • Generic unlabeled container nodes are excluded

    For finding tappable elements specifically, prefer scan_ui instead.

  • device_action

    Execute a single device action on the iPhone.

    Actions available:

    • tap: Tap at coordinates { x, y, duration? }
    • swipe: Swipe gesture { fromX, fromY, toX, toY, duration?, delta? }
    • button: Press button { button: 'HOME'|'LOCK'|'SIDE_BUTTON'|'APPLE_PAY'|'SIRI', duration? }
    • input-text: Type text { text }
    • key: Press key { key: number (HID keycode) | string (character), duration? }
    • key-sequence: Press key sequence { keySequence: (number|string)[] }

    Use describe_after to see the screen state after the action.

  • device_actions

    Execute multiple device actions in sequence on the iPhone.

    Each action in the array should have:

    • action: 'tap' | 'swipe' | 'button' | 'input-text' | 'key' | 'key-sequence'
    • params: Action-specific parameters

    Use describe_after to see the screen state after all actions complete.

  • get_screenshot

    Capture a screenshot of the current iPhone screen. Returns the file path to a PNG image.

  • scan_ui

    Find interactive UI elements (buttons, links, text fields, switches, icons, etc.) on the current screen. Returns only tappable/interactive elements with their coordinates.

    Use the "query" parameter to search for a specific element by label (e.g. "Add to Cart", "Settings"). When a query is provided:

    • First searches visible interactive elements matching the query
    • If not found on-screen, searches off-screen elements and warns you to scroll
    • If no interactive match, falls back to all visible interactive elements

    Without a query, returns all visible interactive elements on screen.

    Region options optimize scan time:

    • "top-left" / "top-right" / "bottom-left" / "bottom-right": ~250ms
    • "top-half" / "bottom-half": ~500ms
    • "full": ~1s (entire screen)

    For the complete element tree (all types), use describe_screen instead.

  • list_devices

    List all available iPhones and simulators.

  • get_execution_context

    Get the current execution context — which iPhone(s) or simulators are available.

    Call this first to discover available devices. Returns:

    • target: 'simulator' — one simulator booted, use the returned udid
    • target: 'device' — one physical device connected, use the returned udid. Inform user about viewer_url for screen viewing.
    • target: 'ambiguous' — multiple devices found. Ask the user which one to use.
    • target: 'none' — no devices. Tell user to boot a simulator or connect an iPhone.

    Pass the returned udid to all subsequent tool calls.

  • setup_device

    Build, install, and launch WebDriverAgent on a physical iPhone. This is required before any other tool can interact with a physical device.

    Call this when get_execution_context shows a physical device with wdaRunning: false. The process takes 1-3 minutes (building WDA, installing on device, establishing connection).

    Prerequisites:

    • iPhone connected via USB and trusted
    • Developer Mode enabled on iPhone (Settings > Privacy & Security > Developer Mode)
    • Apple ID signed into Xcode (Xcode > Settings > Accounts)

    After setup completes, use the returned udid for all subsequent tool calls. Also inform the user about the viewer_url where they can see the device screen.

  • launch_app

    Launch an app on the iPhone by bundle ID.

  • list_apps

    List installed apps on the iPhone.

Dùng MCP IPhone MCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối IPhone MCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm IPhone MCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của IPhone MCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "iphone-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@blitzdev/iphone-mcp"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của IPhone MCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của IPhone MCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng IPhone MCP giúp tôi làm việc này không?
IPhone MCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng IPhone MCP.

Câu hỏi thường gặp

Máy chủ MCP IPhone MCP dùng để làm gì?

IPhone MCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP IPhone MCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng IPhone MCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP IPhone MCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối IPhone MCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP IPhone MCP với TypingMind?

IPhone MCP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP IPhone MCP cung cấp những công cụ nào trong TypingMind?

IPhone MCP cung cấp 10 công cụ MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP IPhone MCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu IPhone MCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇