Logo lookin-mcp-ios

lookin-mcp-ios

Cộng đồng
eval3

MCP Server for iOS UI inspection — lets any AI agent (Claude Code, Cursor, Codex, etc.) inspect live iOS app UI hierarchy, attributes, and screenshots via LookinServer, no Lookin.app required.

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

    lookin-mcp-ios 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.

  • 5 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ở

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

lookin-mcp-ios

MCP Server for iOS UI inspection — lets any AI agent (Claude Code, Cursor, Codex, etc.) inspect live iOS app UI hierarchy, attributes, and screenshots via LookinServer, no Lookin.app required. It discovers LookinServer on ports 47190–47199.


Prerequisites

  • iOS App integrated with LookinServerMCP, running on simulator or device
  • Node.js 18+

iOS Integration

Add the following to your Podfile:

ruby
pod 'LookinServerMCP', :configurations => ['Debug']

Only included in Debug builds — safe to leave in your Podfile permanently.


How It Works

Device Support

The MCP Server supports both iOS simulators and physical devices:

iOS Simulator:

AI Agent (Claude Code / Cursor / Codex / ...)
    ↓ stdio (MCP protocol)
lookin-mcp-ios (Node.js)
    ↓ HTTP local port
LookinServer (embedded in iOS App)

Physical Device:

AI Agent (Claude Code / Cursor / Codex / ...)
    ↓ stdio (MCP protocol)
lookin-mcp-ios (Node.js)
    ↓ native usbmuxd socket (/var/run/usbmuxd)
    ↓ ephemeral local TCP proxy → discovered device port 47190–47199
LookinServer (embedded in iOS App)

Device Selection

  • Single device: Automatically connects when the app starts
  • Multiple devices: Prompts user to select device via lookin_connect_device tool
  • Device events: Automatically reconnects when a physical device is unplugged (falls back to simulator)

Installation

Claude Code

bash
claude mcp add --scope user lookin -- npx -y lookin-mcp-ios

Cursor

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json in your project root:

json
{
  "mcpServers": {
    "lookin": {
      "command": "npx",
      "args": ["-y", "lookin-mcp-ios"]
    }
  }
}

Codex

Add to ~/.codex/config.yaml:

yaml
mcp_servers:
  - name: lookin
    command: npx
    args:
      - -y
      - lookin-mcp-ios

Tools

lookin_list_devices

Lists all connectable iOS targets: USB physical devices and booted simulators.

Parameters: None

Response: JSON object containing:

  • activeTarget — currently connected target (type: "simulator" or "physical")
  • devices — array of available devices, each with:
    • udid — unique device identifier
    • name — device name (e.g. "iPhone 15 Pro")
    • type — device type ("simulator" or "physical")
  • hint — usage instructions

Example response:

json
{
  "activeTarget": { "type": "simulator" },
  "devices": [
    { "udid": "ABC123...", "name": "iPhone 16 Pro", "type": "simulator" },
    { "udid": "XYZ789...", "name": "John's iPhone", "type": "physical" }
  ],
  "hint": "Found 2 device(s). Use lookin_connect_device with a udid to connect."
}

lookin_connect_device

Switch the connection target to a physical device or simulator.

Parameters:

ParameterTypeRequiredDescription
targetstringYesDevice UDID (from lookin_list_devices) or "simulator" to use the default simulator

Response: Confirmation message and connection status


lookin_get_hierarchy

Returns the full UI view hierarchy tree of the running iOS app.

Parameters:

ParameterTypeRequiredDescription
includeSystemViewsbooleanNoReserved parameter, no filtering effect when connected directly to LookinServer
maxDepthnumberNoMaximum hierarchy depth. Returns all levels if omitted

Example response:

json
{"appName":"Demo","totalViews":12,"hierarchy":[{"oid":4393842688,"className":"UIWindow","frame":[0,0,390,844],"children":[{"oid":4393842944,"className":"MyViewController","frame":[0,0,390,844],"children":[]}]}]}

Node fields:

  • oid — unique view identifier, used as input for other tools
  • className — class name
  • frame — position and size [x, y, width, height]
  • hidden — only present when true
  • alpha — only present when not 1.0

lookin_get_attributes

Returns all UI attributes of a specified view.

Parameters:

ParameterTypeRequiredDescription
oidnumberYesView ID (from lookin_get_hierarchy)

Response: Attributes grouped by group → section → attribute, each containing:

  • identifier — attribute identifier
  • setterSelector — setter method name, e.g. setBackgroundColor:
  • attrType — value type enum
  • value — current value

attrType values:

ValueType
14BOOL
12float
13double
5NSInteger
20CGRect
17CGPoint
19CGSize
22UIEdgeInsets
23UIColor (RGBA array, 0~1)
25enum int
26enum long
24NSString

lookin_get_screenshot

Captures a screenshot of a specified view from the live iOS app rendering.

Parameters:

ParameterTypeRequiredDescription
oidnumberNoView ID. If omitted, automatically uses the root window for a full-screen screenshot

Response: MCP image content in PNG format, viewable directly by the AI agent.


Typical Workflow

1. lookin_list_devices           → list available iOS targets (simulators and physical devices)
2. lookin_connect_device(target) → select the target device (if multiple devices available)
3. lookin_get_hierarchy          → get the view tree and find the target view's oid
4. lookin_get_attributes(oid)    → inspect all attributes of that view
5. lookin_get_screenshot(oid)    → capture a screenshot to see the current UI state

If only one device is available, steps 1-2 are handled automatically at startup.

Cài đặt

TypingMind
{
  "mcpServers": {
    "lookin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "lookin-mcp-ios"
      ]
    }
  }
}

Công cụ có sẵn

  • lookin_get_hierarchy

    Get the UI view hierarchy tree of the current iOS app. Each node contains oid, className, frame([x,y,w,h]), hidden/alpha only appear for non-default values. oid can be passed to other lookin_* tools to query attributes or screenshots. Note: when directly connected to LookinServer, all views are returned (system views are not distinguished), includeSystemViews parameter has no filtering effect.

  • lookin_get_attributes

    Query all UI attributes of a specified view node, including color, font, frame, alpha, hidden, constraints, etc. First use lookin_get_hierarchy to get the oid of the target view. Returned attributes are classified by group (AttributeGroup) and section (Section), each attribute contains:

    • identifier: attribute identifier
    • setterSelector: setter method name to modify this attribute, pass to lookin_modify_attribute
    • attrType: value type enum (14=BOOL, 12=float, 13=double, 5=NSInteger, 20=CGRect, 17=CGPoint, 19=CGSize, 22=UIEdgeInsets, 23=UIColor, 25=enum int, 26=enum long, 24=NSString)
    • value: current value
  • lookin_get_screenshot

    Get a screenshot of the specified view (PNG format, base64 encoded). oid is optional. If not provided, automatically takes a full-screen screenshot of the root view (window). Each call is rendered in real-time from the iOS app, no need to refresh cache in advance. Returns imageBase64 field containing base64-encoded PNG image data.

  • lookin_list_devices

    List all connectable iOS targets: USB physical devices and booted simulators. Shows the active connection target. Call this to get a UDID before switching targets. Uses macOS built-in usbmuxd for physical devices and xcrun simctl for simulators.

  • lookin_connect_device

    Switch the lookin-mcp connection target. Pass a device UDID (from lookin_list_devices) to connect to a USB physical device — this automatically discovers the device port and starts USB port forwarding. Pass 'simulator' to switch back to the iOS simulator. After switching, the connection is verified automatically.

Dùng MCP lookin-mcp-ios 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 lookin-mcp-ios, 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 lookin-mcp-ios 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 lookin-mcp-ios.
  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": {
    "lookin-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "lookin-mcp-ios"
      ]
    }
  }
}
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 lookin-mcp-ios, 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 lookin-mcp-ios.
  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 lookin-mcp-ios giúp tôi làm việc này không?
lookin-mcp-ios
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng lookin-mcp-ios.

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

Máy chủ MCP lookin-mcp-ios dùng để làm gì?

lookin-mcp-ios 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 lookin-mcp-ios 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 lookin-mcp-ios 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 lookin-mcp-ios 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 lookin-mcp-ios, 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 lookin-mcp-ios với TypingMind?

lookin-mcp-ios 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 lookin-mcp-ios cung cấp những công cụ nào trong TypingMind?

lookin-mcp-ios cung cấp 5 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 lookin-mcp-ios 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 lookin-mcp-ios 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 👇