Xcode Diagnostics MCP Plugin
Xcode 診断 MCP プラグイン
Xcode ビルド ログからエラーと警告を抽出して表示するための MCP (Model Control Protocol) プラグイン。
概要
このプラグインは、Model Control Protocol(MCP)仕様を実装し、互換性のあるAIアシスタントにXcodeの診断機能を提供します。Xcodeのビルドシステムに接続し、Swiftプロジェクトから診断情報(エラーと警告)を抽出、解析、表示します。これにより、AIアシスタントはビルドログを手動で検索することなく、コード内の問題を迅速に特定できるようになります。
これはログ レベルで機能するため、このツールを実行する前に Xcode がすでにビルドを試行している必要があることに注意してください。
Related MCP server: MCP Xcode
前提条件
macOSオペレーティングシステム
Xcodeがインストールされている
Python 3.6以上
インストール
PyPIからのインストール
Xcode Diagnostics MCP プラグインをインストールする最も簡単な方法:
pip install mcp-xcode-diagnosticsGitHubからのインストール
GitHub から直接インストールできます:
pip install git+https://github.com/leftspin/mcp-xcode-diagnostics.gitソースからインストールする
ソースからインストールするには:
このリポジトリをクローンまたはダウンロードする
pip を使用してプラグインをインストールします。
cd mcp-xcode-diagnostics pip install .
このプラグインは、MCP 互換のあらゆるクライアントで使用できるようになりました。
特徴
DerivedData にビルドログがあるすべての Xcode プロジェクトを一覧表示します
特定のプロジェクトの最新のビルドログからエラーと警告を抽出します
関連するメモや修正提案を含む複雑な診断を解析します
ファイルパス、行番号、エラーメッセージなど、各問題に関する詳細情報を提供します。
Swiftの並行性に関する警告をキャプチャするために最適化されています
サポートされている診断タイプ
プラグインは、次のようなさまざまな種類の Xcode 診断を検出して表示できます。
エラー
構文エラー(例:「{' が必要です」または「式が必要です」)
型エラー(例:「型Xの値を期待される引数型Yに変換できない」)
未解決の識別子と欠落したインポート
プロトコル適合エラー
一般的なパラメータ推論の失敗
アクセス制御違反
警告
未使用の変数、定数、および結果
精度が失われる可能性のある暗黙の変換
冗長なコードや不要な表現
非推奨の警告
文字列補間の問題
Swift の同時実行に関する警告には以下が含まれます:
非分離グローバル共有可変状態警告
主役の孤立に関する警告
プロトコル適合同時実行警告
アクター分離違反
Swift 6 言語モードの互換性に関する警告
メモと修正案
エラーや警告に関する追加のコンテキストを提供する関連メモ
問題を解決するためのコード変更を提案する修正提案
問題のあるコードを示すコードスニペット
制限事項
ランタイムログのバイナリ/シリアル化形式は完全に解析されない可能性があります
高度に専門化された診断フォーマットは認識されない場合があります
非常に大きなビルドログは切り捨てられる可能性がある
プロジェクト固有のカスタム診断が適切に分類されない可能性があります
MCPツール
プラグインは、2 つの主要な MCP ツールを提供します。
get_xcode_projects
DerivedData ディレクトリ内のビルド ログを含むすべての Xcode プロジェクトを一覧表示します。
パラメータ: なし
get_project_diagnostics
特定のプロジェクトの最新のビルド ログから診断情報を取得します。
パラメータ:
project_dir_name: DerivedData内のプロジェクトのディレクトリ名(例: 'ProjectName-hash')include_warnings: エラーに加えて警告を含めるかどうか(デフォルト: True)
デバッグ情報
デバッグの目的で、プラグインは生のログ出力を次の場所に保存します。
/tmp/xcode-mcp-debug.log- メインアプリケーションログ/tmp/xcode-diagnostic-raw.log- Xcode アクティビティ ログからの生の出力
出力例
{
"success": true,
"log_file": "/path/to/build.xcactivitylog",
"timestamp": "2025-03-11T12:34:56.789",
"errors": [
{
"type": "error",
"message": "use of unresolved identifier 'NonExistentType'",
"file_path": "/path/to/MyFile.swift",
"line_number": 42,
"column": 15,
"code": " let x: NonExistentType = value",
"notes": []
}
],
"warnings": [
{
"type": "warning",
"message": "static property 'sharedInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode",
"file_path": "/path/to/SharedManager.swift",
"line_number": 10,
"column": 16,
"code": " static var sharedInstance: SharedManager?",
"notes": [
{
"type": "note",
"message": "convert 'sharedInstance' to a 'let' constant to make 'Sendable' shared state immutable",
"file_path": "/path/to/SharedManager.swift",
"line_number": 10,
"column": 16
}
]
}
],
"error_count": 1,
"warning_count": 1
}テスト
プラグインには解析機能を検証するためのテスト スイートが含まれています。
# Run all tests
python -m unittest test_xcode_diagnostics.pyライセンス
このプロジェクトは MIT ライセンスの下で利用可能です。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnable Claude Code, Cursor, or your favorite LLM to interact with Xcode, building your projects the same way you do, and seeing the same errors. Greatly increases productivity when working on iOS, iPadOS, macOS, visionOS, tvOS projects & Swift packages - or any time you might use Xcode.295MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to build, test, run, and manage Apple platform projects (iOS, macOS, tvOS, watchOS, visionOS) directly through Xcode. Provides comprehensive control over Xcode projects, Swift packages, simulators, and development workflows without leaving your editor.5121MIT
- Flicense-qualityCmaintenanceBridges Xcode and Cursor to provide real-time access to build errors, warnings, and debug output from Xcode's DerivedData, enabling automated error analysis and fixes directly within Cursor.
- Alicense-qualityDmaintenanceAn MCP server that enables AI assistants to parse Xcode and Swift build outputs into structured, token-efficient formats like JSON or TOON. It provides tools for executing build commands and extracting detailed diagnostic information such as errors, warnings, and test failures.8MIT
Related MCP Connectors
Proof and repair for Apple coding agents: validate Swift, run Xcode evidence, and repair failures.
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/leftspin/mcp-xcode-diagnostics'
If you have feedback or need assistance with the MCP directory API, please join our Discord server