📇 🏠 🍎 - Interact with iOS simulators: get simulator information, control UI interactions and inspect UI…
iOS Simulator MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A Model Context Protocol (MCP) server for interacting with iOS simulators. This server allows you to interact with iOS simulators by getting information about them, controlling UI interactions, and inspecting UI elements.
> **Security Notice**: Command injection vulnerabilities present in versions ;
}
json
{
"bundle_id": "com.example.app",
"terminate_running": true,
"env": {
"FOO": "bar",
"BAZ": "qux"
}
}
typescript
{
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
/** Bundle identifier of the app to terminate (e.g., com.apple.mobilesafari) */
bundle_id: string;
}
typescript
{
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
/** The URL or deep link to open (e.g., https://example.com or myapp://screen/detail) */
url: string;
}
typescript
{
/**
* Udid of target, can also be set with the IDB_UDID env var
* Format: UUID (8-4-4-4-12 hexadecimal characters)
*/
udid?: string;
}
Verify all accessibility elements on the current screen
Enter "QA Test" into the text input field and confirm the input is correct
Tap on coordinates x=250, y=400 and verify the expected element is triggered
Swipe from x=150, y=600 to x=150, y=100 and confirm correct behavior
Describe the UI element at position x=300, y=350 to ensure proper labeling and functionality
View the current simulator screen
Take a screenshot of the current simulator screen and save it to my_screenshot.png
Start recording a video of the simulator screen (saves to the default output directory, which is ~/Downloads unless overridden by IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR)
Stop the current simulator screen recording
Install the app at path/to/MyApp.app on the simulator
Launch the Safari app (com.apple.mobilesafari) on the simulator
bash
npx uri-scheme open "myapp://products/42" --ios
bash
xcrun simctl openurl booted "myapp://products/42"
Open the deep link myapp://products/42 in the simulator, then verify the product
details screen is shown
bash
# Open with your default editor (or use 'code', 'vim', etc.)
open ~/.cursor/mcp.json
# Or use Cursor's command if available
# cursor ~/.cursor/mcp.json
json
{
"mcpServers": {
// ... other servers might be listed here ...
"ios-simulator": {
"command": "npx",
"args": ["-y", "ios-simulator-mcp"]
}
}
}
json
{
"mcpServers": {
"ios-simulator": {
"command": "pnpm",
"args": ["dlx", "ios-simulator-mcp"]
}
}
}
bash
git clone https://github.com/joshuayoes/ios-simulator-mcp
cd ios-simulator-mcp
bash
npm install
# or, using pnpm (installs from the committed pnpm-lock.yaml):
pnpm install
bash
npm run build
# or:
pnpm run build