byr-huijts· 3 MCP servers
An MCP (Model Context Protocol) server providing comprehensive Xcode integration for AI assistants. This server enables AI agents to interact with Xcode projects, manage iOS simulators, and perform various Xcode-related tasks with enhanced error handling and support for multiple
$git clone https://github.com/r-huijts/xcode-mcp-serverInstalls into the current project.
Install xcode-mcp-server by running `git clone https://github.com/r-huijts/xcode-mcp-server`, then use it for the current task and follow its documentation at https://github.com/r-huijts/xcode-mcp-server.
| 1 | [](https://mseep.ai/app/r-huijts-xcode-mcp-server) |
| 2 | |
| 3 | # Xcode MCP Server |
| 4 | |
| 5 | An MCP (Model Context Protocol) server providing comprehensive Xcode integration for AI assistants. This server enables AI agents to interact with Xcode projects, manage iOS simulators, and perform various Xcode-related tasks with enhanced error handling and support for multiple project types. |
| 6 | |
| 7 | ## Features |
| 8 | |
| 9 | ### Project Management |
| 10 | - Set active projects and get detailed project information |
| 11 | - Create new Xcode projects from templates (iOS, macOS, watchOS, tvOS) |
| 12 | - Add files to Xcode projects with target and group specification |
| 13 | - Parse workspace documents to find associated projects |
| 14 | - List available schemes in projects and workspaces |
| 15 | |
| 16 | ### File Operations |
| 17 | - Read/write files with support for different encodings |
| 18 | - Handle binary files with base64 encoding/decoding |
| 19 | - Search for text content within files using patterns and regex |
| 20 | - Check file existence and get file metadata |
| 21 | - Create directory structures automatically |
| 22 | |
| 23 | ### Build & Testing |
| 24 | - Build projects with customizable options |
| 25 | - Run tests with detailed failure reporting |
| 26 | - Analyze code for potential issues |
| 27 | - Clean build directories |
| 28 | - Archive projects for distribution |
| 29 | |
| 30 | ### CocoaPods Integration |
| 31 | - Initialize CocoaPods in projects |
| 32 | - Install and update pods |
| 33 | - Add and remove pod dependencies |
| 34 | - Execute arbitrary pod commands |
| 35 | |
| 36 | ### Swift Package Manager |
| 37 | - Initialize new Swift packages |
| 38 | - Add and remove package dependencies with various version requirements |
| 39 | - Update packages and resolve dependencies |
| 40 | - Generate documentation for Swift packages using DocC |
| 41 | - Run tests and build Swift packages |
| 42 | |
| 43 | ### iOS Simulator Tools |
| 44 | - List available simulators with detailed information |
| 45 | - Boot and shut down simulators |
| 46 | - Install and launch apps on simulators |
| 47 | - Take screenshots and record videos |
| 48 | - Manage simulator settings and state |
| 49 | |
| 50 | ### Xcode Utilities |
| 51 | - Execute Xcode commands via xcrun |
| 52 | - Compile asset catalogs |
| 53 | - Generate app icon sets from source images |
| 54 | - Trace app performance |
| 55 | - Export and validate archives for App Store submission |
| 56 | - Switch between different Xcode versions |
| 57 | |
| 58 | ## Installation |
| 59 | |
| 60 | ### Prerequisites |
| 61 | |
| 62 | - macOS with Xcode 14.0 or higher installed |
| 63 | - Node.js 16 or higher |
| 64 | - npm or yarn |
| 65 | - Swift 5.5+ for Swift Package Manager features |
| 66 | - CocoaPods (optional, for CocoaPods integration) |
| 67 | |
| 68 | ### Setup |
| 69 | |
| 70 | #### Option 1: Automated Setup (Recommended) |
| 71 | |
| 72 | Use the included setup script which automates the installation and configuration process: |
| 73 | |
| 74 | ```bash |
| 75 | # Make the script executable |
| 76 | chmod +x setup.sh |
| 77 | |
| 78 | # Run the setup script |
| 79 | ./setup.sh |
| 80 | ``` |
| 81 | |
| 82 | **What the Setup Script Does:** |
| 83 | |
| 84 | 1. **Environment Verification**: |
| 85 | - Checks that you're running on macOS |
| 86 | - Verifies Xcode is installed and accessible |
| 87 | - Confirms Node.js (v16+) and npm are available |
| 88 | - Checks for Ruby installation |
| 89 | - Verifies CocoaPods installation (offers to install if missing) |
| 90 | |
| 91 | 2. **Dependency Installation**: |
| 92 | - Runs `npm install` to install all required Node.js packages |
| 93 | - Executes `npm run build` to compile the TypeScript code |
| 94 | |
| 95 | 3. **Configuration Setup**: |
| 96 | - Creates a `.env` file if one doesn't exist |
| 97 | - Prompts for your projects base directory |
| 98 | - Asks if you want to enable debug logging |
| 99 | - Saves your configuration preferences |
| 100 | |
| 101 | 4. **Claude Desktop Integration** (Optional): |
| 102 | - Offers to configure the server for Claude Desktop |
| 103 | - Creates or updates the Claude Desktop configuration file |
| 104 | - Sets up the proper command and arguments to launch the server |
| 105 | |
| 106 | **When to Use the Setup Script:** |
| 107 | |
| 108 | - First-time installation to ensure all prerequisites are met |
| 109 | - When you want guided configuration with interactive prompts |
| 110 | - If you want to quickly set up Claude Desktop integration |
| 111 | - To verify your environment has all necessary components |
| 112 | |
| 113 | The script will guide you through the configuration process with clear prompts and helpful feedback. |
| 114 | |
| 115 | #### Option 2: Manual Setup |
| 116 | |
| 117 | **When to Use Manual Setup:** |
| 118 | |
| 119 | - You |