Xcode

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

Visit Xcode

How to install and configure Xcode

1. Installation To install the Xcode MCP server, use the following npm command: bash npm install @devyhan/xcode-mcp

2. Configuration To use this server with Claude Desktop, add the following configuration to your claude_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.

3. Available Tools The server provides the following tools for Xcode and iOS development: * xcode-project-info: Retrieves detailed information about an Xcode project or workspace (targets, configurations, schemes). * xcode-list-schemes: Lists all available schemes, targets, and configurations. * xcode-build: Builds an Xcode project/workspace with options for clean builds and custom output directories. * xcode-test: Runs tests with granular control (specific tests, test plans, or skipping tests). * xcode-archive: Creates archives (.xcarchive) and optionally exports them to IPA files. * xcode-codesign-info: Displays code signing identities and provisioning profile information. * swift-package-manager: Executes Swift Package Manager commands (init, update, resolve, reset, clean). * simctl-manager: Manages iOS Simulators (list, create, boot, shutdown, install app, etc.). * run-on-device: Builds, installs, and runs apps on physical iOS devices, including log streaming.

4. Usage Examples Here are examples of how the tools are used with specific parameters: Building a Project: * Project path: /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"

What you can do with Xcode

Use Case 1: Automated Testing and CI

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.

Use Case 2: Debugging Code Signing and Provisioning Hurdles Problem: Code signing is one of the most frustrating aspects of iOS development. "Missing provisioning profile" or "Certificate expired" errors are common, and finding which profile is missing or which identity is being used requires digging through deep Xcode settings. Solution: The 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.

Use Case 3: Hands-Free Physical Device Deployment Problem: Deploying an app to a physical device usually requires a developer to be at their desk, manually selecting the device in the Xcode toolbar and clicking "Run." Setting custom environment variables for a single run is even more tedious. Solution: The 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."

Use Case 4: Project Auditing and Onboarding Problem: When joining a large legacy project, it is difficult to understand the complex web of targets, build configurations, and schemes. Navigating the Xcode Project Navigator to find this information is time-consuming. Solution: The xcode-project-info…

Key facts

  • Developer Tools & Code Intelligence, DevOps, CI/CD & Version Control
  • automation, build, ios, macos, swift, xcode

Part of MCP Servers

Related MCP servers

  • MCP LaTeX Server — Create, edit, and manage LaTeX files. Requires an external LaTeX distribution like MiKTeX, TeX Live, or MacTeX.
  • MCP JSON — A collection of servers for file system operations, Google search, web automation, and executing terminal commands.
  • MCP Jupyter Complete — A server for Jupyter notebook manipulation with position-based operations and VS Code integration.
  • MCP LSP Go — An MCP server that connects AI assistants to Go's Language Server Protocol (LSP) for advanced code analysis.
  • MCP Manager — A full-stack application for managing Model Context Protocol (MCP) servers for Claude Desktop with a modern web interface.
  • MCP Lab — A development environment for building and testing custom MCP servers with AI and VS Code integration.
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories