This MCP server acts as a powerful bridge between Apple’s Xcode development environment and AI assistants like Claude. It allows developers to manage their iOS and macOS projects through simple, natural language commands rather than navigating complex menus or remembering intricate terminal commands. By integrating directly into an AI’s workflow, it transforms a standard LLM into a specialized coding partner that can understand a project's structure and perform essential development tasks on behalf of the user. Beyond simple project navigation, the tool provides a comprehensive suite of utilities for building, testing, and archiving applications. It can retrieve detailed project metadata, list available schemes, and execute clean builds with custom configurations. Developers can also use it to manage Swift Package Manager dependencies and handle the often-tedious process of code signing and provisioning profile management, making it significantly easier to prepare apps for distribution or debugging. For power users, this server unlocks advanced automation via `simctl` for simulator management and even supports real device deployment with intelligent error handling and automatic retry logic. It allows an AI to launch specific test plans, skip certain tests, or export archives to IPA files using specific plist configurations. This level of control enables AI systems to not only write code but also verify it through automated test suites and deploy it to hardware, creating a seamless, end-to-end development cycle driven by model-context interactions.
Category: Developer Tools & Code Intelligence
Tags: automation, build, ios, macos, swift, xcode
bash npm install @devyhan/xcode-mcpclaude_desktop_config.json file (typically located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS): json { "mcpServers": { "xcode-mcp": { "command": "npx", "args": [ "@devyhan/xcode-mcp", "-y" ] } } } After updating the configuration, restart Claude Desktop./Users/username/Projects/MyApp/MyApp.xcodeproj * Scheme: MyAppScheme * Configuration: Debug * Destination: platform=iOS Simulator,name=iPhone 14 * Clean: true Running Tests: * Project path: /Users/username/Projects/MyApp/MyApp.xcodeproj * Scheme: MyAppScheme * Destination: platform=iOS Simulator,name=iPhone 14 * OnlyTesting: ["MyAppTests/LoginTests"] Running on a Physical Device: * Project path: /Users/username/Projects/MyApp/MyApp.xcodeproj * Scheme: MyAppScheme * Device: "Your-iPhone" * StreamLogs: true * EnvironmentVars: "DEBUG_MODE=1,API_URL=https://test-api.example.com"CD Troubleshooting Problem: Developers often need to run specific subsets of tests during development but find the Xcode UI cumbersome for isolated test execution. Additionally, when tests fail in a CI environment, it can be hard to replicate the exact configuration locally. Solution: The xcode-test tool allows users to trigger granular test runs via natural language. An AI agent can use this tool to run specific test classes, use specific test plans, and save result bundles to a designated path for analysis. Example: A developer can ask Claude: "Run the LoginFlowTests on an iPhone 15 simulator. If they fail, tell me which assertions didn't match." The MCP executes the xcodebuild command with the -only-testing parameter and reports the outcome.
xcode-codesign-info tool provides a comprehensive snapshot of the system's certificates, the project's signing settings, and installed provisioning profiles. Example: A developer tells the AI: "My build is failing with a signing error. Can you check my project settings and see if I have a valid distribution profile for this Bundle ID?" The AI uses the MCP to retrieve the info, compares the Bundle ID against installed .mobileprovision files, and identifies the mismatch.run-on-device tool automates the build-install-launch cycle for physical hardware. It even supports Korean device names and allows for passing environment variables directly through the command. Example: A developer says: "Build the Beta scheme and install it on my device named 'John's iPhone'. Set the API_ENDPOINT environment variable to `https:/staging.api.com` and start streaming the logs to this chat."
xcode-project-info…Part of MCP Servers