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
bash docker pull ghcr.io/giginet/xcodeproj-mcp-server ---/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 /workspaceclaude_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" ] } } } ---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])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)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)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)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) ---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."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.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…Part of MCP Servers