这个工具是一个使用idb控制iOS模拟器的低级别服务器。它借助自然语言处理(NLP)或直接命令,实现与iOS模拟器的交互,为开发者提供了便捷的操控体验。
本工具使用简单,通过以下步骤即可快速开启使用之旅。
使用npm进行安装:
npm install mcp-server-simulator-ios-idb
然后运行服务器:
node index.js
在项目的根目录下创建或更新.env文件,添加以下内容:
MCP_SERVERS=ios-simulator
IOS_SIMULATOR_SERVER_PATH=/path/to/mcp-server-simulator-ios-idb/dist/index.js
通过以下代码连接到服务器:
const result = await useMcpTool({
serverName: "ios-simulator",
toolName: "process-instruction",
arguments: {
instruction: "打开 safari 浏览器"
}
});
start_simulator
stop_simulator
restart_simulator
take_screenshot /path/to/output.png
start_recording /path/to/output.mp4
stop_recording
get_system_logs
get_app_logs com.example.app
start_debug com.example.app
stop_debug
debug_status
describe_elements
describe_point 100,200
input_text "Hello World"
系统由三个主要组件组成:
本项目采用MIT许可证,具体条款见LICENSE文件。
感谢facebook/idb项目,使得这个工具得以实现。特别鸣谢开源社区的所有贡献者。