MCP 服务器是一个基于 idb 工具的 iOS 模拟器自动化控制服务。它借助自然语言处理技术,把用户指令转化为可执行的操作命令,进而实现对 iOS 模拟器的全面掌控。
在开始使用前,请确保你已经安装了以下工具:
git clone https://github.com/your-repository/mcp-server-simulator-ios-idb.git
cd mcp-server-simulator-ios-idb
运行下面的命令来安装项目所需的 npm 包:
npm install
使用 Node.js 执行主程序文件以启动服务器:
node index.js
该服务器提供了丰富的 iOS 模拟器控制功能,主要涵盖以下几个方面:
# 创建新的模拟器会话
curl -X POST http://localhost:3000/api/simulator/session
# 启动应用
curl -X POST http://localhost:3000/api/app/start \
-d '{"bundleId":"com.example.app"}'
# 捕获截图
curl -X GET http://localhost:3000/api/capture/screenshot
const mcp = new MCPClient('ws://localhost:3001');
async function launchApp() {
try {
await mcp.sendCommand({
type: 'app_launch',
payload: { bundleId: 'com.example.app' }
});
console.log('应用已启动');
} catch (error) {
console.error('启动失败:', error);
}
}
感谢所有为该项目做出贡献的开发者和用户。
本项目遵循 MIT 许可证,具体内容如下:
MIT License
Copyright (c) [年份] [作者姓名]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
欢迎通过 GitHub 提交 issue 或 pull request,与我们共同完善这个项目。