home / mcp / xcodeproj mcp server

Xcodeproj MCP Server

Provides programmatic access to manipulate Xcode project files and configurations via MCP endpoints.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "giginet-xcodeproj-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "$PWD:/workspace",
        "ghcr.io/giginet/xcodeproj-mcp-server",
        "/workspace"
      ]
    }
  }
}

You can programmatically create and manage Xcode project files using a dedicated MCP server. This server exposes a set of endpoints you can call from an MCP client to automate project setup, targets, files, build configurations, and dependencies, all by manipulating .xcodeproj structures through a stable library.

How to use

You interact with the MCP server through an MCP client. Start by connecting to the local or remote MCP endpoint that you configured. Use the available actions to create projects, add targets, manage files and groups, adjust build settings, and wire up dependencies. You can perform common workflows like scaffolding a multi-target project, adding a new Swift file to a target, including a folder as a synchronized resource, and inserting custom build phases for tools like code formatters and linters.

How to install

Prerequisites you need before starting: Docker and macOS if you plan to run Xcode projects locally.

Install the MCP server by pulling the pre-built Docker image and running it inside a container. The following commands will fetch the image and prepare it for use:

docker pull ghcr.io/giginet/xcodeproj-mcp-server

Configure your MCP client to connect to the server

If you are using Claude Code, add the MCP server by running a command that launches the server inside Docker and connects it to your workspace. You mount your current working directory into the container so the MCP server can access your Xcode projects.

$ claude mcp add xcodeproj -- docker run --rm -i -v $PWD:/workspace ghcr.io/giginet/xcodeproj-mcp-server /workspace

If you are using Claude Desktop, place the following configuration in your Claude Desktop config file to point to the same Docker-based MCP server. This example uses macOS path conventions.

{
  "mcpServers": {
    "xcodeproj": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "${workspaceFolder}:/workspace",
        "ghcr.io/giginet/xcodeproj-mcp-server",
        "/workspace"
      ]
    }
  }
}

Available tools

create_xcodeproj

Create a new Xcode project with a given project name, path, organization name, and bundle identifier.

list_targets

List all targets in a specified project to understand current structure.

list_build_configurations

List all build configurations available in the project.

list_files

List all files registered under a specific target.

list_groups

List groups in the project along with their hierarchical paths, optionally filtered by target.

add_file

Add a file to a target within a project at a specified path and optional group.

remove_file

Remove a file from the project.

move_file

Move or rename a file within the project structure.

add_synchronized_folder

Add a synchronized folder reference to the project, linking a filesystem directory to the project navigator.

create_group

Create a new group in the project navigator under a specified parent group.

add_target

Create a new target with a specific type, platform, and bundle identifier.

remove_target

Remove an existing target from the project.

duplicate_target

Duplicate an existing target under a new target name.

add_dependency

Add a dependency from one target to another within the project.

get_build_settings

Retrieve build settings for a given target and configuration.

set_build_setting

Modify a build setting for a target within a specific configuration.

add_framework

Add a framework to a target, with an option to embed it.

add_build_phase

Attach a custom build phase to a target, including scripts and phase type.

add_swift_package

Add a Swift Package dependency to a target or project.

list_swift_packages

List all Swift Package dependencies used by the project.

remove_swift_package

Remove a Swift Package dependency from the project.