Token导航 LogoToken导航TokenDH.com
Lookin MCP logo
开发工具未说明官方级别未说明来源级核验

Lookin MCP

MCP Server

MCP Server for iOS UI inspection允许AI代理通过LookinServer检查实时iOS应用的UI层次结构、属性和截图,无需使用Lookin.app。

工具数

4

提示词数

0

GitHub Stars

10

资源数

0
开发工具TypeScriptClaudeClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

hepiao3

提供方

hepiao3

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

查找mcp ios

用于iOS UI检查的MCP服务器——允许任何AI代理(Claude Code、Cursor、Codex等)通过LookinServer检查实时iOS应用程序UI层次结构、属性和屏幕截图,无需Lookin.app。

______________________________________________________________________

先决条件

iOS集成

将以下内容添加到您的 Podfile:

pod 'LookinServerMCP', :configurations => ['Debug']
仅包含在调试版本中——可以安全地永久保留在您的播客文件中。

______________________________________________________________________

运作原理

设备支持

MCP服务器支持iOS模拟器和物理设备:

iOS模拟器:

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

物理设备:

AI Agent (Claude Code / Cursor / Codex / ...)
    ↓ stdio (MCP protocol)
lookin-mcp-ios (Node.js)
    ↓ native usbmuxd socket (/var/run/usbmuxd)
    ↓ TCP proxy on :47191
LookinServer (embedded in iOS App)

设备选择

  • 单一设备:应用程序启动时自动连接
  • 多个设备:提示用户通过以下方式选择设备 lookin_connect_device 工具
  • 设备事件:拔下物理设备时自动重新连接(退回模拟器)

______________________________________________________________________

安装

克劳德代码

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

光标

添加 ~/.cursor/mcp.json (全球)或 .cursor/mcp.json 在项目根目录中:

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

法典

添加 ~/.codex/config.yaml:

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

______________________________________________________________________

工具

lookin_list_devices

列出所有可连接的iOS目标:USB物理设备和启动的模拟器。

参数:

答复: JSON对象包含:

  • activeTarget --当前连接的目标(类型: "simulator""physical")
  • devices --可用设备阵列,每个设备具有:

- udid --唯一设备标识符 - name --设备名称(例如“iPhone 15 Pro”) - type --设备类型("simulator""physical")

  • hint --使用说明

示例响应:

{
  "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

将连接目标切换到物理设备或模拟器。

参数:

参数类型必填说明
targetstring设备UDID(来自 lookin_list_devices)或 "simulator" 使用默认模拟器

答复: 确认消息和连接状态

______________________________________________________________________

lookin_get_hierarchy

返回正在运行的iOS应用程序的完整UI视图层次结构树。

参数:

参数类型必填说明
includeSystemViewsboolean保留参数,直接连接到LookinServer时没有过滤效果
maxDepthnumber最大层次深度。如果省略,则返回所有级别

示例响应:

{"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":[]}]}]}

节点字段:

  • oid --唯一视图标识符,用作其他工具的输入
  • className --类名
  • frame --位置和大小 [x, y, width, height]
  • hidden --仅在以下情况下出现 true
  • alpha --仅在非1.0时存在

______________________________________________________________________

lookin_get_attributes

返回指定视图的所有UI属性。

参数:

参数类型必填说明
oidnumberYes视图ID(来自 lookin_get_hierarchy)

答复: 按组分组的属性→ 部分→ 属性,每个属性包含:

  • identifier --属性标识符
  • setterSelector --setter方法名称,例如。 setBackgroundColor:
  • attrType --值类型枚举
  • value --当前值

attrType值:

类型
14打球
12浮动
13双倍
5更密集
20正确
17CGPoint
19CGSize
22UIEdgeInsets
23UIColor(RGBA数组,0~1)
25枚举整数
26枚举长度
24NSString

______________________________________________________________________

lookin_get_screenshot

从实时iOS应用程序渲染中捕获指定视图的屏幕截图。

参数:

参数类型必填说明
oidnumberNoView ID。如果省略,将自动使用根窗口进行全屏截图

答复: PNG格式的MCP图像内容,可由AI代理直接查看。

______________________________________________________________________

典型工作流程

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
如果只有一个设备可用,则步骤1-2在启动时自动处理。

目录标签

目录标签

开发工具TypeScriptClaudeiOS开发本地部署UI检查AI工具集成

支持客户端

ClaudeCursor

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP