Configuration
The iOS Simulator MCP server can be configured using environment variables. This allows you to customize its behavior without modifying the source code, such as filtering out unneeded tools or specifying a default directory for output files.
Environment Variables
Variable | Description | Example |
---|---|---|
IOS_SIMULATOR_MCP_FILTERED_TOOLS |
A comma-separated list of tool names to disable. The server will not register these tools, and they will not be available to the MCP client. | screenshot,record_video,stop_recording |
IOS_SIMULATOR_MCP_DEFAULT_OUTPUT_DIR |
Specifies a default directory for output files like screenshots and videos. If not set, ~/Downloads is used as the fallback. This is useful if the AI agent has restricted file system access. |
~/Code/awesome-project/tmp |
Example Client Configuration
You can set these environment variables in your MCP client's configuration file. Here is an example for ~/.cursor/mcp.json
that disables three tools and sets a custom output directory.
{
"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"
}
}
}
}