This MCP server for iOS simulator provides a bridge between iOS simulators and the Model Context Protocol, enabling programmatic control of iOS simulators through standardized communication. It uses stdio as its transport mechanism, making it ideal for integration with Claude Desktop and other MCP-compatible clients.
# Clone the repository
git clone https://github.com/atom2ueki/mcp-server-ios-simulator.git
cd mcp-server-ios-simulator
# Install dependencies
npm install
Configuration is handled through environment variables:
SIMULATOR_DEFAULT_DEVICE=iPhone 16
SIMULATOR_DEFAULT_OS=18.2
SIMULATOR_TIMEOUT=30000
# Build the project
npm run build
# Start the server
npm start
The server provides two approaches for controlling iOS simulators:
These tools work directly with simulator UDIDs without requiring session management:
list-available-simulators
- List all available simulators with their UDIDsboot-simulator-by-udid
- Boot a simulator directly using its UDIDshutdown-simulator-by-udid
- Shutdown a simulator directly using its UDIDlist-booted-simulators
- List all currently booted simulatorsThis approach is best when you just want to boot, use, and shut down simulators directly.
These tools use a session layer that tracks simulators with custom session IDs:
list-simulator-sessions
- List all active simulator sessionscreate-simulator-session
- Create a new simulator sessionterminate-simulator-session
- Terminate a session (shuts down simulator and cleans up)create-and-boot-simulator
- Create a new simulator session and boot itboot-simulator
- Boot a simulator for an existing sessionshutdown-simulator
- Shutdown a simulator for an existing sessionThis approach is more suitable when tracking simulator metadata, referencing simulators by custom IDs, or using advanced management features.
install-app
- Install an application on a simulatorlaunch-app
- Launch an application on a simulatorterminate-app
- Terminate a running application on a simulatortake-screenshot
- Take a screenshot of the simulator screentap-coordinate
- Perform a tap at the specified coordinatesConfigure Claude Desktop to use this server as an MCP tool:
{
"mcpServers": {
"simulator": {
"command": "node",
"args": [
"/path/to/your/mcp-server-ios-simulator/dist/index.js"
]
}
}
}
/path/to/your
with the actual path to your installationUsing the tools from Claude Desktop:
Direct UDID Approach (Recommended):
First, list available simulators:
"Show me all available iOS simulators"
Boot a specific simulator by UDID:
"Boot the iOS simulator with UDID 5272EA61-5796-4372-86FE-3B33831D5CC1"
When finished, shut it down:
"Shut down the simulator with UDID 5272EA61-5796-4372-86FE-3B33831D5CC1"
Session-Based Approach (Advanced):
Only use this if you need session tracking features:
"Create a new simulator session for iPhone 16 Pro with iOS 18.2"
"Boot the simulator for session abc-123"
"Take a screenshot of the simulator for session abc-123"
"Terminate the simulator session abc-123"
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.