MCP Servers

A collection of Model Context Protocol servers, templates, tools and more.

X
Xcodeproj MCP Server

A Model Context Protocol Server to manipulate *.xcodeproj

Created 6/1/2025
Updated 5 days ago
Repository documentation and setup instructions

xcodeproj-mcp-server

GitHub Workflow Status (with event) Swift 6.1 Xcode 16.4 SwiftPM Platforms License

[!WARNING] This product is in the development phase. It will be released soon.

A Model Context Protocol (MCP) server for manipulating Xcode project files (.xcodeproj) using Swift.

Adding Post Build Phase for all targets

Overview

xcodeproj-mcp-server is an MCP server that provides tools for programmatically manipulating Xcode project files. It leverages the tuist/xcodeproj library for reliable project file manipulation and implements the Model Context Protocol using the swift-sdk.

This server enables AI assistants and other MCP clients to:

  • Create new Xcode projects
  • Manage targets, files, and build configurations
  • Modify build settings
  • Add dependencies and frameworks
  • Automate common Xcode project tasks

How to set up for Claude Desktop and Claude Code

Prerequisites

  • macOS 14.0 or later
  • Xcode 16.4 or later

Installation

First, clone the repository and build the project in release mode:

git clone https://github.com/giginet/xcodeproj-mcp-server.git
cd xcodeproj-mcp-server
swift build -c release

Configuration for Claude Desktop

Add the following to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "xcodeproj": {
      "command": "/path/to/xcodeproj-mcp-server/.build/release/xcodeproj-mcp-server"
    }
  }
}

Replace /path/to/xcodeproj-mcp-server with the actual path where you cloned the repository.

Configuration for Claude Code

# Add MCP server using the local executable
$ claude mcp add --name xcodeproj --command "/path/to/xcodeproj-mcp-server/.build/release/xcodeproj-mcp-server"

Replace /path/to/xcodeproj-mcp-server with the actual path where you cloned the repository.

Available Tools

Project Management

  • create_xcodeproj - Create a new Xcode project

    • Parameters: project_name, path, organization_name, bundle_identifier
  • list_targets - List all targets in a project

    • Parameters: project_path
  • list_build_configurations - List all build configurations

    • Parameters: project_path
  • list_files - List all files in the project

    • Parameters: project_path

File Operations

  • add_file - Add a file to the project

    • Parameters: project_path, file_path, target_name, group_path
  • remove_file - Remove a file from the project

    • Parameters: project_path, file_path
  • move_file - Move or rename a file within the project

    • Parameters: project_path, source_path, destination_path
  • create_group - Create a new group in the project navigator

    • Parameters: project_path, group_name, parent_group_path

Target Management

  • add_target - Create a new target

    • Parameters: project_path, target_name, type, platform, bundle_identifier
  • remove_target - Remove an existing target

    • Parameters: project_path, target_name
  • duplicate_target - Duplicate an existing target

    • Parameters: project_path, source_target_name, new_target_name
  • add_dependency - Add dependency between targets

    • Parameters: project_path, target_name, dependency_name

Build Configuration

  • get_build_settings - Get build settings for a target

    • Parameters: project_path, target_name, configuration_name
  • set_build_setting - Modify build settings

    • Parameters: project_path, target_name, setting_name, value, configuration_name
  • add_framework - Add framework dependencies

    • Parameters: project_path, target_name, framework_name, embed
  • add_build_phase - Add custom build phases

    • Parameters: project_path, target_name, phase_type, name, script

Utility

  • open_xcodeproj - Open an Xcode project in Xcode
    • Parameters: project_path, wait (optional)

License

This project is licensed under the MIT License.

Quick Setup
Installation guide for this server

Installation Command (package not published)

git clone https://github.com/giginet/xcodeproj-mcp-server
Manual Installation: Please check the README for detailed setup instructions and any additional dependencies required.

Cursor configuration (mcp.json)

{ "mcpServers": { "giginet-xcodeproj-mcp-server": { "command": "git", "args": [ "clone", "https://github.com/giginet/xcodeproj-mcp-server" ] } } }