2.2 KiB
2.2 KiB
MCP for iOS in VS Code
You are here: AI Docs Home > MCP for iOS in VS Code
Contents
- Overview
- Prerequisites
- XcodeBuildMCP Setup
- Xcode Native MCP Setup
- Example Prompts
- Troubleshooting
- Next Steps
Overview
This guide covers how to set up MCP (Model Context Protocol) automation for iOS development in VS Code. Complete the VS Code Initial Setup first.
Prerequisites
- macOS with Xcode 26.3+ installed (for native MCP) or Xcode 13+ (for XcodeBuildMCP)
- VS Code with GitHub Copilot and Copilot Chat enabled (see setup guide)
- Node.js 18+ (for XcodeBuildMCP)
- This repo opened in VS Code (workspace root)
XcodeBuildMCP Setup (External Tool)
- Install XcodeBuildMCP:
brew tap getsentry/xcodebuildmcp brew install xcodebuildmcp - Ensure
.xcodebuildmcp/config.yamlis present and configured for your workspace, scheme, and simulator. (What is config.yaml? See reference and sample.) - Add or update
.vscode/mcp.json:{ "servers": { "XcodeBuildMCP": { "command": "xcodebuildmcp", "args": ["mcp"] } } } - Restart VS Code. Copilot Chat will discover MCP tools.
Xcode Native MCP Setup (Xcode 26.3+)
- Open Xcode.
- Go to Settings > Intelligence tab.
- Enable Model Context Protocol (toggle on Xcode Tools or Allow external connections).
- Add or update
.vscode/mcp.json:{ "servers": { "XcodeNative": { "command": "xcrun", "args": ["mcpbridge"] } } } - Restart VS Code. Copilot Chat will discover the native MCP server.
Example Prompts
- "Build and run ToyotaOneApp on the iPhone 17 Pro Max simulator."
- "Run all UI tests and summarize failures."
- "Take a screenshot of the home screen."
Troubleshooting
- If MCP tools are not available, confirm
.vscode/mcp.jsonis present and correct. - For XcodeBuildMCP, check
.xcodebuildmcp/config.yamlfor correct paths and scheme. - Simulator not found? Boot it in Xcode or Simulator.app first.
Next Steps
- For general VS Code setup, see VS Code Initial Setup.
- For iOS basics, see iOS Setup.