XcodeProj MCP Server

The XcodeProj MCP Server acts as a digital bridge that allows AI assistants to understand and interact with Apple development projects just like a human developer would. Instead of a developer having to manually click through the Xcode interface to add files or change settings, they can simply ask an AI to handle the busywork. This makes it possible to manage complex iOS and macOS app tasks through natural language, turning an AI into a capable co-pilot that can organize and build project structures automatically. At a more technical level, this tool provides a robust programmatic interface for manipulating `.xcodeproj` files without requiring the Xcode IDE to be open. It enables AI clients to perform a wide range of actions, such as creating new projects from scratch, managing multi-target architectures, and organizing project hierarchies through groups and synchronized folders. It can even handle more intricate tasks like injecting custom build phases, configuring Info.plist settings, and modifying complex build configurations for different deployment environments. For developers integrating with LLM systems, this server is particularly powerful because it leverages the reliable tuist/xcodeproj library to ensure project integrity. It includes specialized tools for managing Swift Package dependencies and framework linking, all while maintaining a secure environment through path-restricted file operations. By running via Docker on macOS, it provides a structured and safe way for an AI to execute precise modifications, ensuring that generated code is not just written, but properly integrated, compiled, and configured within the existing project ecosystem.

Category: Developer Tools & Code Intelligence

Tags: ios, macos, project-management, swift, xcode

Visit XcodeProj MCP Server

How to install and configure XcodeProj MCP Server

1. Installation Prerequisites: * Docker * macOS (required for running the Xcode projects) Step 1: Pull the Docker Image Pull the pre-built Docker image from the GitHub Container Registry: bash docker pull ghcr.io/giginet/xcodeproj-mcp-server ---

2. Configuration

Claude Code Add the MCP server using the following command. Note that you must mount your current working directory to /workspace so the server can access your files. bash claude mcp add xcodeproj -- docker run --rm -i -v $PWD:/workspace ghcr.io/giginet/xcodeproj-mcp-server /workspace

Claude Desktop Add the following configuration to your claude_desktop_config.json file: File Path (macOS): ~/Library/Application Support/Claude/claude_desktop_config.json json { "mcpServers": { "xcodeproj": { "command": "docker", "args": [ "run", "--rm", "-i", "-v", "${workspaceFolder}:/workspace", "ghcr.io/giginet/xcodeproj-mcp-server", "/workspace" ] } } } ---

3. Available Tools

Project Management * create_xcodeproj: Create a new Xcode project. (Params: project_name, path, organization_name, bundle_identifier) * list_targets: List all targets in a project. (Params: project_path) * list_build_configurations: List all build configurations. (Params: project_path) * list_files: List all files in a specific target. (Params: project_path, target_name) * list_groups: List all groups in the project with hierarchical paths. (Params: project_path, target_name [optional])

File Operations * add_file: Add a file to the project. (Params: project_path, file_path, target_name, group_path) * remove_file: Remove a file from the project. (Params: project_path, file_path) * move_file: Move or rename a file within the project. (Params: project_path, source_path, destination_path) * add_synchronized_folder: Add a synchronized folder reference. (Params: project_path, folder_path, group_name, target_name) * create_group: Create a new group in the project navigator. (Params: project_path, group_name, parent_group_path)

Target Management * add_target: Create a new target. (Params: project_path, target_name, type, platform, bundle_identifier) * remove_target: Remove an existing target. (Params: project_path, target_name) * duplicate_target: Duplicate an existing target. (Params: project_path, source_target_name, new_target_name) * add_dependency: Add dependency between targets. (Params: project_path, target_name, dependency_name)

Build Configuration * get_build_settings: Get build settings for a target. (Params: project_path, target_name, configuration_name) * set_build_setting: Modify build settings. (Params: project_path, target_name, setting_name, value, configuration_name) * add_framework: Add framework dependencies. (Params: project_path, target_name, framework_name, embed) * add_build_phase: Add custom build phases (scripts, linting, etc.). (Params: project_path, target_name, phase_type, name, script)

Swift Package Management * add_swift_package: Add a Swift Package dependency. (Params: project_path, package_url, requirement, target_name, product_name) * list_swift_packages: List all Swift Package dependencies in the project. (Params: project_path) * remove_swift_package: Remove a Swift Package dependency. (Params: project_path, package_url, remove_from_targets) ---

4. Example Prompts * "Create a new Xcode project named 'MyApp' with the bundle identifier 'com.example.myapp'." * "Add the Swift file 'Networking.swift' to the 'AppCore' target in the 'Models' group." * "Add a new build phase to the 'MainApp' target that runs a SwiftLint script." * "Add the 'Alamofire' Swift Package dependency to my project and link it to the main target." * "List all build configurations for the project located at './MyProject.xcodeproj'."

What you can do with XcodeProj MCP Server

Use Case 1: Automated Project Bootstrapping and Scaffolding Problem: Manually setting up a new Xcode project with a specific organization name, bundle identifier, and a standardized folder hierarchy (e.g., MVVM folders) is a repetitive and error-prone process. Solution: The XcodeProj MCP allows an AI assistant to programmatically generate the project file and folder structure in seconds. This ensures consistency across team projects and eliminates the need to click through Xcode’s "New Project" wizard. Example: A developer tells Claude: "Create a new iOS project named 'QuickTask' with bundle ID 'com.dev.quicktask'. Set up groups for 'Models', 'Views', and 'ViewModels', and add a 'Core' framework target."

Use Case 2: Integrating Build Tools and Linters Across Multiple Targets Problem: Large projects often have dozens of targets. Manually adding a SwiftLint or SwiftFormat build phase to every single target is tedious, and it’s easy to miss one, leading to inconsistent code quality across the codebase. Solution: Using the add_build_phase tool, an AI can iterate through all targets in the project and inject a custom shell script build phase to ensure every target follows the same linting rules. Example: "Claude, find all app and framework targets in this project and add a 'SwiftLint' build phase that runs the command swiftlint --fix before compilation."

Use Case 3: Streamlining AI-Driven Code Generation Problem: When an AI assistant generates new Swift files or assets for a user, the user still has to manually drag those files into the Xcode Project Navigator and ensure they are assigned to the correct build targets. Solution: The AI can use the add_file and create_group tools to not only write the code but also officially register those files within the .xcodeproj structure, making them immediately ready for compilation. Example: After the AI generates a new NetworkService.swift file, it automatically calls add_file to place it in the 'Services' group and link it to the main 'App' target without the user touching the mouse.

Use Case 4: Bulk Configuration and Dependency Management Problem: Updating build settings (like changing the iOS Deployment Target to a newer version) or adding a common Swift Package dependency to multiple targets at once requires deep navigation into Xcode's settings tabs. Solution: The MCP provides set_build_setting and add_swift_package tools, allowing for global or target-specific updates via simple natural language commands. Example: "Claude, update the 'IPHONEOS_DEPLOYMENT_TARGET' to 17.0 for all targets in the project, and add the 'Alamofire' Swift…

Key facts

  • Open Source
  • https://github.com/giginet/xcodeproj-mcp-server
  • Developer Tools & Code Intelligence, Files, Documents & PDFs
  • ios, macos, project-management, 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 MD2PDF Server — MCP MD2PDF Server is an MCP server that enables automated conversion of Markdown documents into formatted PDF files with full…

How do I install XcodeProj MCP Server?

You can install the server by pulling its container image from the GitHub Container Registry using Docker or Apple container CLI. You then register the container command in your Claude Code or Claude Desktop configuration, ensuring your project workspace is mounted to the container's workspace path.

What can XcodeProj MCP Server do?

It provides programmatic manipulation of Xcode project files. You can create new projects, add or remove targets, register source files into specific groups, alter build settings, add Swift Package dependencies, and inject custom build script phases without opening Xcode.

Which MCP clients work with XcodeProj MCP Server?

It works with MCP-compliant clients such as Claude Desktop and Claude Code. Additionally, it can be integrated directly inside Xcode's CodingAssistant environment to support agents like Claude Code and Codex.

What are the prerequisites for running this server?

The server requires macOS and a container runtime. You can run it using Docker or Apple's native container tool on Apple silicon Macs. It also enforces security by restricting file access to the specified workspace directory.

Is XcodeProj MCP Server open source?

Yes, it is open source and licensed under the MIT license. You can view the source code and build instructions on GitHub at https://github.com/giginet/xcodeproj-mcp-server.

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