r-

r-huijts/xcode-mcp-server

๐Ÿ“‡ ๐Ÿ  ๐ŸŽ Xcode integration for project management, file operations, and build automation

#Xcode#project management#build automation
Publisherr-huijts/xcode-mcp-server
Submitted date4/19/2025

Xcode MCP Server Overview

Title

Xcode MCP Server โ€“ A Model Context Protocol (MCP) server for seamless Xcode integration with AI assistants, enabling project management, file operations, build/testing, CocoaPods & Swift Package Manager support, and iOS simulator control.

How to Use

Installation

Prerequisites

  • macOS with Xcode 14.0+
  • Node.js 16+ & npm/yarn
  • Swift 5.5+ (for Swift Package Manager)
  • CocoaPods (optional, for CocoaPods integration)

Setup Options

  1. Automated Setup (Recommended)

    • Run setup.sh to verify dependencies, install packages, and configure settings.
    • Supports Claude Desktop integration.
  2. Manual Setup

    • Clone the repo, install dependencies (npm install), and configure .env.
    • Best for custom environments or CI/CD pipelines.

Starting the Server

  • Production: npm start
  • Development (auto-restart): npm run dev

Configuration

  • Environment variables (.env file) or command-line arguments.
  • Key settings:
    • PROJECTS_BASE_DIR (required)
    • PORT (default: 3000)
    • DEBUG (logging)

Connecting to AI Assistants

  1. Launch the server.
  2. Configure AI tools to use http://localhost:3000.
  3. Access all Xcode functionalities via MCP.

Key Features

Project Management

  • Create projects (iOS/macOS/watchOS/tvOS), manage schemes, and parse workspaces.

File Operations

  • Read/write files (text/binary), search content, and manage directories.

Build & Testing

  • Build projects, run tests, analyze code, clean builds, and archive for distribution.

CocoaPods & Swift Package Manager

  • Initialize, add/remove dependencies, update pods, and generate Swift documentation.

iOS Simulator Tools

  • List, boot, and manage simulators; install apps, take screenshots, and record videos.

Xcode Utilities

  • Execute xcrun commands, compile assets, generate app icons, and switch Xcode versions.

Use Cases

  1. AI-Assisted Development โ€“ Let AI assistants interact with Xcode projects, automate repetitive tasks.
  2. Automated Testing โ€“ Run tests, analyze failures, and generate reports.
  3. Dependency Management โ€“ Handle CocoaPods & Swift Package Manager via AI commands.
  4. Simulator Automation โ€“ Control simulators for app testing and debugging.
  5. CI/CD Integration โ€“ Script project builds, archiving, and validation for pipelines.

The Xcode MCP Server bridges AI and Xcode, streamlining iOS/macOS development with powerful automation and integration capabilities. ๐Ÿš€

Visit More

View All