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
Install it globally or locally via npm using the command npm install @devyhan/xcode-mcp. Then, register the executable in your client configuration file, such as Claude Desktop's config, using npx with the arguments @devyhan/xcode-mcp and -y. Restart your client once configured.
The server provides tools to inspect Xcode project configurations, execute builds, run focused tests, generate archives, and export IPAs. It also manages Swift Package Manager packages, controls iOS simulators via simctl, and deploys applications directly to physical hardware with live log streaming.
The server works with any Model Context Protocol compliant client running on macOS, including Claude Desktop. Because it invokes local macOS developer utilities like xcodebuild and simctl, it requires a host machine with macOS and Xcode installed.
Yes. The run-on-device tool builds, installs, and launches apps on connected physical hardware. It supports device identification by UUID or name, allows setting runtime environment variables, handles automatic retries on failure, and streams console logs back to the MCP client.