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

  • https://github.com/devyhan/xcode-mcp
  • 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 — MCP LaTeX Server is an MCP server that provides tools for creating, editing, validating, and compiling LaTeX documents directly through…
  • MCP JSON — MCP JSON is an MCP server collection that bundles tools for file system operations, Google search, browser-based web automation, and…
  • MCP Jupyter Complete — MCP Jupyter Complete is an MCP server that provides tools for manipulating Jupyter notebook files through position-based cell operations and…
  • MCP LSP Go — MCP LSP Go is an MCP server that connects AI assistants to the official Go Language Server Protocol implementation, gopls,…
  • MCP Manager — MCP Manager is an MCP server management tool that connects directly to your Claude Desktop environment, enabling users to discover,…
  • MCP Lab — MCP Lab is an MCP server development environment designed for building, testing, and debugging custom Model Context Protocol servers integrated…

How do I install Xcode MCP Server?

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.

What can Xcode MCP Server do?

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.

Which MCP clients work with Xcode MCP Server?

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.

Can Xcode MCP Server deploy apps to physical devices?

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.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories