Skip to main content
Glama
Xcode-Studio-MCP

Xcode-Studio-MCP

by kevinswint

xcode-studio-mcp

Xcode + iOS Simulator用統合MCPサーバー — Claude Code、Codex、Cursor、または任意のMCPクライアントからiOSアプリのビルド、デプロイ、スクリーンショット撮影、操作が可能です。

Swiftで構築。シングルバイナリ。Node/Pythonランタイムは不要です。

License: MIT Swift 6.0+ MCP

なぜこれが必要なのか

現在、AIエージェントでiOS開発の全ループを行うには2〜3個の別々のツールが必要です。xcode-studio-mcpはそれらを1つに統合します:

Write code → Build → Deploy to Simulator → Screenshot → Tap/Type → Verify

ツール

ツール

説明

xcode_build

構造化されたエラー出力(ファイル、行、列、重大度、メッセージ)でXcodeプロジェクトをビルドする

xcode_run

iOSシミュレーターでアプリをビルドして起動する

simulator_screenshot

シミュレーターの画面をPNG画像としてキャプチャする

simulator_tap

シミュレーター画面のx,y座標をタップする

simulator_type

現在フォーカスされているフィールドにテキストを入力する

simulator_describe

現在の画面のアクセシビリティツリーを取得する (JSON)

Related MCP server: xcforge

ツールパラメータ

xcode_build

パラメータ

必須

説明

project_path

はい

Xcodeプロジェクトディレクトリ、.xcodeproj、または .xcworkspace へのパス

scheme

いいえ

ビルドスキーム(省略時は自動検出)

configuration

いいえ

Debug(デフォルト)または Release

destination

いいえ

ビルド先(デフォルトは起動中のシミュレーター)

xcode_run

パラメータ

必須

説明

project_path

はい

Xcodeプロジェクトへのパス

bundle_identifier

はい

アプリのバンドルID (例: com.example.MyApp)

scheme

いいえ

ビルドスキーム(自動検出)

simulator_udid

いいえ

ターゲットシミュレーター(デフォルトは起動中のもの)

simulator_screenshot

パラメータ

必須

説明

simulator_udid

いいえ

ターゲットシミュレーター(デフォルトは起動中のもの)

simulator_tap

パラメータ

必須

説明

x

はい

X座標

y

はい

Y座標

duration

いいえ

長押し用の保持時間(秒)

simulator_udid

いいえ

ターゲットシミュレーター

simulator_type

パラメータ

必須

説明

text

はい

入力するテキスト

simulator_udid

いいえ

ターゲットシミュレーター

simulator_describe

パラメータ

必須

説明

simulator_udid

いいえ

ターゲットシミュレーター

クイックスタート

前提条件

  • XcodeがインストールされたmacOS

  • UI操作ツール (tap, type, describe) を使用する場合:

    brew tap facebook/fb && brew install idb-companion
    pip3 install fb-idb

ビルド

git clone https://github.com/kevinswint/xcode-studio-mcp.git
cd xcode-studio-mcp
swift build -c release

Claude Codeの設定

Claude CodeのMCP設定に追加してください:

{
  "mcpServers": {
    "xcode-studio-mcp": {
      "command": "/path/to/xcode-studio-mcp/.build/release/XcodeStudioMCP"
    }
  }
}

ワークフロー例

You: Build and run my app at ~/Projects/MyApp
Claude: [calls xcode_build] Build succeeded with 0 errors
        [calls xcode_run] App launched (PID 12345)
        [calls simulator_screenshot] Here's what the app looks like...
        [calls simulator_describe] I can see a "Sign In" button and email/password fields
        [calls simulator_tap] Tapped the email field
        [calls simulator_type] Typed "test@example.com"
        [calls simulator_screenshot] Here's the current state...

アーキテクチャ

┌─────────────────────────────┐
│     MCP Protocol Layer      │  stdio transport (Swift MCP SDK)
├─────────────────────────────┤
│   Tool Implementations      │  6 tools, structured error output
├──────────┬──────────────────┤
│ xcodebuild│  simctl  │  idb │  native process calls
│  wrapper  │  wrapper │ CLI  │
└──────────┴──────────┴──────┘

Swiftで構築されており、Node/Pythonランタイムへの依存関係はゼロです(idb CLIはUI操作ツールにのみ必要です)。

ロードマップ

  • v0.1 (現在): コアビルド + シミュレーターツール

  • v1.0: セマンティックUIナビゲーション(「サインインボタンをタップ」)、ビジュアル差分、Xcodeプロジェクトファイルの操作、複合操作、SwiftUIプレビューキャプチャ

関連プロジェクト

プロジェクト

何をするものか

違い

XcodeBuildMCP

ビルド + テストのみ

シミュレーターのUI操作なし

mobile-mcp

クロスプラットフォームのシミュレーターUI

Xcodeビルドサポートなし

ios-simulator-mcp

IDB経由のシミュレーター

ビルドなし、すべてをIDBに依存

xcode-studio-mcpは、ビルドと操作を単一のサーバーに統合します。

コントリビューション

プルリクエストを歓迎します。コードベースは約750行のSwiftで、ツール、サービス、モデルに整理されています。

ライセンス

MIT

Available Tools

6 tools
simulator_describeA

Get the accessibility tree of the current iOS Simulator screen as JSON. Useful for finding UI elements to interact with. Requires idb (pip3 install fb-idb).

Inputs: simulator_udid.

simulator_screenshotA

Capture a screenshot of the iOS Simulator screen. Returns the image as base64-encoded PNG.

Inputs: simulator_udid.

simulator_tapA

Tap at specific coordinates on the iOS Simulator screen. Requires idb (pip3 install fb-idb).

Inputs: x (required), y (required), duration, simulator_udid.

simulator_typeA

Type text into the currently focused field on the iOS Simulator. Requires idb (pip3 install fb-idb).

Inputs: text (required), simulator_udid.

xcode_buildB

Build an Xcode project or workspace. Returns structured diagnostics with file, line, column, severity, and message for each error/warning.

Inputs: project_path (required), configuration, destination, scheme.

xcode_runA

Build an Xcode project and launch the app in the iOS Simulator. Returns build errors if the build fails, or a success message with the launched process ID.

Inputs: bundle_identifier (required), project_path (required), configuration, scheme, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct action: building, running, and simulator interactions (screenshot, tap, type, describe) are clearly separated. There is no overlap in purpose, making it easy for an agent to select the correct tool.

    Naming Consistency3/5

    Tools are grouped into two clear namespaces: 'xcode_' for build/run and 'simulator_' for simulator interactions. However, the same verb 'run' is used for xcode_run (launch app) while the simulator tools use direct action verbs (tap, type, describe). The pattern is readable but not perfectly uniform.

    Tool Count5/5

    With only 6 tools, the set is well-scoped for core Xcode build/run and simulator interaction workflows. Each tool serves a distinct purpose, and no tool feels redundant or missing at this scale.

    Completeness4/5

    The set covers building, running, and basic UI interaction (via describe/tap/type). A minor gap is the lack of a tool to terminate the running app, and no way to list available simulators, but agents can work around this for common tasks.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      High-performance MCP server for iOS development and test automation. Gives AI coding assistants direct access to iOS simulators with sub-20ms screenshots, UI interaction, building, testing, and an intelligent operator mode.
      10
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server for iOS Simulator automation. Enables AI assistants to visually interact with iOS apps running in the simulator.
      36 npm
      1
      MIT