CX

conorluddy/xc-mcp

Developer tools

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

100 stars 9 forks 品質 71 トレンド 23

XCode CLI MCP:Xcode CLIツールおよびiOSシミュレーター向けの利便性ラッパー。ツール応答の段階的開示によりコンテキスト使用を削減。ビルドオンリーには--miniパラメータを使い、コンテキストフットプリントが小さい。

概要

XC-MCPはインテリジェントなコンテキストエンジニアリングを通じて、XcodeおよびiOSシミュレーターツールをAIエージェントがアクセスできるようにします。— Claudeのツール検索はオンデマンドでツールを自動的に発見し、ベースラインコンテキストのオーバーヘッドを最小限に抑えつつ、29ツールのフル機能を維持します。 従来のXcode CLIラッパーはMCPプロトコルの制限を超える大量出力をダンプします:- simctlリスト:57,000+トークン(MCP文脈では使用不可) - ビルドログ:135,000+トークン(壊滅的なオーバーフロー) - スクリーンショット優先自動化:画面あたり170トークン、遅延2000ms- 操作間の状態メモリなし - ✅ - すべてのツールがデフェア化;Claudeはオンデマンドで発見 - ✅ - 一般的な操作のための高レベル抽象化 - ✅ - プラットフォームがツール発見を処理 - ✅ (スクリーンショットより3-4倍速く、3-4倍安価) - ✅ (キャッシュID→要約→詳細をオンデマンドで提供) - ✅ 包括的なエラー処理を用いる ~/ライブラリ/アプリケーションサポート/Claude/claude_desktop_configに追加してください。

概要(AI 翻訳)

AIエージェントがiOSアプリを構築・実行・駆動できるMCPサーバー — Xcodeの出力に溺れることなく。

XC-MCPはxcodebuild、simctl、idb]を77のツールとしてラップしています。その役割はそれらを露出させることだけではありません コマンドをモデルの文脈に適合させるために:まず要約を出し、詳細をオンデマンドで提供します。 アプリが許可しているところではスクリーンショットの代わりにアクセシビリティツリーを設置します。


なぜ存在するのか

Xcodeツールは、どのコンテキストウィンドウも生き残らないスケールで出力を生成します。実際のアプリと比較して測定 (Grapla、Xcode 27、iPhone 17 Proシミュレーター):

操作 生出力 XC-MCP応答 還元
1つの増分xcodebuild build 1.67 MB ·~419,000トークン 1.1 KB ·~285トークン ~1,470×
xcrun simctl list --json 131 KB ·~32,800トークン 1.5 KB ·~370トークン ~90×
1件のクラッシュレポート(.ips) 10.7KB 1.4 KB概要 ~7.5×

単一の生ビルドログだけで20万トークンのコンテキストをオーバーフローしてしまいます。完全な出力は決して 捨てる:キャッシュされ、MCPリソースリンクとして返されるので、エージェントは 必要な正確な誤りです。


クイックスタート

クロードコード:

コデックスCLI:

または「~/.codex/config」に追加してください。

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

README

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

XC-MCP

An MCP server that lets AI agents build, run and drive iOS apps — without drowning in Xcode’s output.

XC-MCP wraps xcodebuild, simctl and idb as 77 tools. Its job is not just to expose those commands but to make their output fit in a model’s context: summaries first, full detail on demand, and the accessibility tree instead of screenshots wherever the app allows it.


Why it exists

Xcode tooling produces output at a scale no context window survives. Measured against a real app (Grapla, Xcode 27, iPhone 17 Pro simulator):

Operation Raw output XC-MCP response Reduction
One incremental xcodebuild build 1.67 MB · ~419,000 tokens 1.1 KB · ~285 tokens ~1,470×
xcrun simctl list --json 131 KB · ~32,800 tokens 1.5 KB · ~370 tokens ~90×
One crash report (.ips) 10.7 KB 1.4 KB summary ~7.5×

A single raw build log would overflow a 200k-token context on its own. The full output is never thrown away: it is cached and returned as an MCP resource link, so an agent can drill into the exact errors it needs.


Quick start

Claude Code:

claude mcp add xc-mcp -- npx -y xc-mcp

Codex CLI:

codex mcp add xc-mcp -- npx -y xc-mcp

or add it to ~/.codex/config.toml directly:

[mcp_servers.xc-mcp]
command = "npx"
args = ["-y", "xc-mcp"]

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "xc-mcp": { "command": "npx", "args": ["-y", "xc-mcp"] }
  }
}

Then ask your agent to build and run your app. rtfm({}) lists the tool categories.


Requirements

Requirement Version Needed for
macOS 13+ everything
Node.js 20+ (CI tests 22 and 24) running the server
Xcode + Command Line Tools 15+ (26+ for iOS 26/27 simulators) xcodebuild, simctl
idb CLI + companion 1.5.1+ every idb-* tool: tapping, typing, accessibility
xcode-select --install

# idb — required for all UI automation
brew tap facebook/fb
brew install facebook/fb/idb-companion facebook/fb/idb-cli

brew install idb-companion no longer works — it moved from Homebrew core to Meta’s facebook/fb tap.

Run idb-doctor whenever UI automation misbehaves. It checks the CLI, the companion version, the Xcode framework layout, and stale companion registrations.

Xcode 27

idb-companion must be 1.5.1 or newer. Xcode 27 moved SimulatorKit.framework, and older

GitHub で README 全文を見る

インストール

npx -y xc-mcp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "xc-mcp": { "command": "npx", "args": ["-y", "xc-mcp"] } } }