The iOS Simulator MCP Server provides a way to interact with iOS simulators through the Model Context Protocol. It enables you to gather simulator information, control UI interactions, take screenshots, record videos, and inspect UI elements programmatically.
Before installing the iOS Simulator MCP server, ensure you have:
Edit your Cursor MCP configuration file:
open ~/.cursor/mcp.json
Add or update the mcpServers
section:
{
"mcpServers": {
"ios-simulator": {
"command": "npx",
"args": ["-y", "ios-simulator-mcp"]
}
}
}
Restart Cursor for the changes to take effect.
Clone the repository:
git clone https://github.com/joshuayoes/ios-simulator-mcp
cd ios-simulator-mcp
Install dependencies:
npm install
Build the project:
npm run build
Edit your Cursor MCP configuration file and add:
{
"mcpServers": {
"ios-simulator": {
"command": "node",
"args": ["/full/path/to/your/ios-simulator-mcp/build/index.js"]
}
}
}
Restart Cursor.
claude mcp add ios-simulator npx ios-simulator-mcp
claude mcp add ios-simulator --command node --args "/full/path/to/your/ios-simulator-mcp/build/index.js"
You can configure the server using these environment variables:
Variable | Description | Example |
---|---|---|
IOS_SIMULATOR_MCP_FILTERED_TOOLS |
Tools to exclude | screenshot,record_video,stop_recording |
IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR |
Default directory for output files | ~/Code/awesome-project/tmp |
Example configuration in your MCP settings:
{
"mcpServers": {
"ios-simulator": {
"command": "npx",
"args": ["-y", "ios-simulator-mcp"],
"env": {
"IOS_SIMULATOR_MCP_FILTERED_TOOLS": "screenshot,record_video,stop_recording",
"IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR": "~/Code/awesome-project/tmp"
}
}
}
}
// No parameters required
{
// Optional: Simulator UDID (can be set with IDB_UDID env var)
udid?: string; // Format: UUID (8-4-4-4-12 hexadecimal)
}
{
// Optional: Press duration in seconds
duration?: string;
// Optional: Simulator UDID
udid?: string;
// Required: Screen coordinates
x: number;
y: number;
}
{
// Optional: Simulator UDID
udid?: string;
// Required: Text to input (ASCII only)
text: string;
}
{
// Optional: Simulator UDID
udid?: string;
// Required: Starting coordinates
x_start: number;
y_start: number;
// Required: Ending coordinates
x_end: number;
y_end: number;
// Optional: Step size (default: 1)
delta?: number;
}
{
// Optional: Simulator UDID
udid?: string;
// Required: Screen coordinates
x: number;
y: number;
}
{
// Optional: Simulator UDID
udid?: string;
}
{
// Optional: Simulator UDID
udid?: string;
// Required: Output file path
output_path: string;
// Optional: Image format (default: png)
type?: "png" | "tiff" | "bmp" | "gif" | "jpeg";
// Optional: Display to capture
display?: "internal" | "external";
// Optional: Mask handling policy
mask?: "ignored" | "alpha" | "black";
}
{
// Optional: Output file path
output_path?: string;
// Optional: Video codec (default: hevc)
codec?: "h264" | "hevc";
// Optional: Display to capture
display?: "internal" | "external";
// Optional: Mask handling policy
mask?: "ignored" | "alpha" | "black";
// Optional: Force overwrite existing file
force?: boolean;
}
// No parameters required
Here are some example prompts you can use with AI assistants that support this MCP server:
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
Stop the current simulator screen recording
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "ios-simulator" '{"command":"npx","args":["-y","ios-simulator-mcp"]}'
See the official Claude Code MCP documentation for more details.
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 > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"ios-simulator": {
"command": "npx",
"args": [
"-y",
"ios-simulator-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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"ios-simulator": {
"command": "npx",
"args": [
"-y",
"ios-simulator-mcp"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect