RH

r-huijts/xcode-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

386 stars 28 forks 品質 73 トレンド 19MIT

Xcode統合のためのMCPサーバー実装

概要

MCP(モデルコンテキストプロトコル)サーバーで、AIアシスタント向けの包括的なXcode統合を提供します。このサーバーは、AIエージェントがXcodeプロジェクトとやり取りし、iOSシミュレーターを管理し、複数のプロジェクトタイプに対するエラー処理とサポートを強化しながらXcode関連の様々なタスクを実行できるようにします。 - アクティブなプロジェクトを設定し、詳細なプロジェクト情報を取得 - テンプレート(iOS、macOS、watchOS、tvOS)から新しいXcodeプロジェクトを作成する - ターゲットおよびグループ仕様でXcodeプロジェクトにファイルを追加 - 関連するプロジェクトを見つけるためのワークスペースドキュメント解析 - プロジェクトおよびワークスペース内の利用可能なスキームを一覧化する - 異なるエンコーディングに対応したファイルの読み書き - base64エンコーディング/デコードによるバイナリファイルの処理 - パターンと正規表現を用いたファイル内のテキスト内容検索 - ファイルの存在確認とメタデータ取得 - ディレクトリ構造の自動作成 - カスタマイズ可能なオプションでプロジェクトを構築する - 詳細な故障報告付きテストを実行する - 潜在的な問題のコードを分析する - クリーンビルド...

概要(AI 翻訳)

MCP(モデルコンテキストプロトコル)サーバーで、AIアシスタント向けの包括的なXcode統合を提供します。このサーバーは、AIエージェントがXcodeプロジェクトとやり取りし、iOSシミュレーターを管理し、複数のプロジェクトタイプに対するエラー処理とサポートを強化しながらXcode関連の様々なタスクを実行できるようにします。

特徴

プロジェクトマネジメント

  • アクティブなプロジェクトを設定し、詳細なプロジェクト情報を取得すること
  • テンプレート(iOS、macOS、watchOS、tvOS)から新しいXcodeプロジェクトを作成する
  • ターゲットおよびグループ仕様のXcodeプロジェクトへのファイル追加
  • 関連するプロジェクトを探すためのワークスペース文書の解析
  • プロジェクトやワークスペースで利用可能なスキームの一覧

ファイル操作

  • 異なるエンコーディングに対応したファイルの読み書き
  • base64エンコーディング/デコードによるバイナリファイルの処理
  • パターンと正規表現を用いてファイル内のテキスト内容を検索すること
  • ファイルの存在確認とメタデータ取得
  • ディレクトリ構造を自動的に作成

ビルド&テスト

  • カスタマイズ可能なオプションを持つプロジェクトを構築する
  • 詳細な故障報告を伴うテスト実施
  • コードの潜在的な問題の分析
  • クリーンビルドディレクトリ
  • 配布のためのアーカイブプロジェクト

ココアポッド統合

  • プロジェクト内でのCocoaPodの初期化

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Xcode MCP Server

An MCP (Model Context Protocol) server providing comprehensive Xcode integration for AI assistants. This server enables AI agents to interact with Xcode projects, manage iOS simulators, and perform various Xcode-related tasks with enhanced error handling and support for multiple project types.

Features

Project Management

  • Set active projects and get detailed project information
  • Create new Xcode projects from templates (iOS, macOS, watchOS, tvOS)
  • Add files to Xcode projects with target and group specification
  • Parse workspace documents to find associated projects
  • List available schemes in projects and workspaces

File Operations

  • Read/write files with support for different encodings
  • Handle binary files with base64 encoding/decoding
  • Search for text content within files using patterns and regex
  • Check file existence and get file metadata
  • Create directory structures automatically

Build & Testing

  • Build projects with customizable options
  • Run tests with detailed failure reporting
  • Analyze code for potential issues
  • Clean build directories
  • Archive projects for distribution

CocoaPods Integration

  • Initialize CocoaPods in projects
  • Install and update pods
  • Add and remove pod dependencies
  • Execute arbitrary pod commands

Swift Package Manager

  • Initialize new Swift packages
  • Add and remove package dependencies with various version requirements
  • Update packages and resolve dependencies
  • Generate documentation for Swift packages using DocC
  • Run tests and build Swift packages

iOS Simulator Tools

  • List available simulators with detailed information
  • Boot and shut down simulators
  • Install and launch apps on simulators
  • Take screenshots and record videos
  • Manage simulator settings and state

Xcode Utilities

  • Execute Xcode commands via xcrun
  • Compile asset catalogs
  • Generate app icon sets from source images
  • Trace app performance
  • Export and validate archives for App Store submission
  • Switch between different Xcode versions

Installation

Prerequisites

  • macOS with Xcode 14.0 or higher installed
  • Node.js 16 or higher
  • npm or yarn
  • Swift 5.5+ for Swift Package Manager features
  • CocoaPods (optional, for CocoaPods integration)

Setup

Use the included setup script which automates the installation and configuration process:

# Make the script executable
chmod +x setup.sh

# Run the setup script
./setup.sh

What the Setup Script Does:

  1. Environment Verification:

    • Checks that you’re running on macOS
    • Verifies Xcode is installed and accessible
    • Confirms Node.js (v16+) and npm are available
    • Checks for Ruby installation
    • Verifies CocoaPods installation (offers to install if missing)
  2. Dependency Installation:

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "xcode": { "command": "node", "args": ["/path/to/xcode-mcp-server/dist/index.js"] } } }