MCP.so
ログイン

XcodeMCP MCP Server

@lapfelix

基本情報

カテゴリ

その他

ライセンス

Apache-2.0

トランスポート

stdio

作者

lapfelix

XcodeMCP MCP Server について

MCP server for Xcode that wraps its AppleScript interface & uses XCLogParser to return clear build results

XcodeMCP MCP Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "XcodeMCP": {
      "command": "npx",
      "args": [
        "-y",
        "xcodemcp@latest"
      ]
    }
  }
}

XcodeMCP MCP Server のツール

22

Open projects and workspaces

Get workspace status and details

List projects in workspace

Open files with optional line number

Build with detailed error parsing

Clean build artifacts

Run tests with optional arguments

Build and run the active scheme

Start debugging session

Stop current operation

List available schemes

Switch active scheme

List simulators and devices

Browse test results and analyze failures

Get console output for specific tests

Quick overview of test results

Extract screenshots from test failures

Get UI hierarchy as AI-readable JSON with timestamp selection

Get detailed properties of specific UI elements by index

List all attachments for a test

Export specific attachments from test results

Environment validation and troubleshooting

概要

What is XcodeMCP?

XcodeMCP is a Model Context Protocol (MCP) server and standalone CLI that controls Xcode directly through JavaScript for Automation (JXA). It provides tools for building, running, testing, debugging, parsing build logs, analyzing XCResult files, and validating the environment. It can run alongside Apple’s official Xcode MCP server in sidekick mode to offer complementary tools.

How to use XcodeMCP?

Install via npx -y xcodemcp@latest or globally with npm install -g xcodemcp. Use it as an MCP server by adding a JSON configuration to MCP clients (Claude Desktop, VS Code, etc.) or as a CLI tool with the xcodecontrol command. For side-by-side use with Apple’s official Xcode MCP, start with --sidekick-only to exclude build/run/test/debug tools. Optional but recommended: install XCLogParser via brew install xclogparser. Requirements: macOS with Xcode and Node.js 18+.

Key features of XcodeMCP

  • Controls Xcode directly through JXA (not xcodebuild CLI)
  • XCResult analysis with screenshot extraction and UI hierarchy
  • Build log parsing with XCLogParser for precise error locations
  • Comprehensive health checks and environment validation
  • Sidekick mode to complement Apple’s official Xcode MCP
  • Full‑featured CLI with 100% MCP server feature parity

Use cases of XcodeMCP

  • Build and run Xcode projects from an AI coding assistant
  • Run tests, browse results, and extract debug attachments
  • Manage project schemes and workspaces programmatically
  • Debug sessions and stop current operations
  • Analyze test failures with console logs and UI hierarchy snapshots

よくある質問

1

What is sidekick mode?

Sidekick mode (`--sidekick-only`) includes only project management and XCResult analysis tools, excluding build/run/test/debug operations. It is designed to work alongside Apple’s official Xcode MCP server without duplicating functionality.

2

How can I use XcodeMCP alongside Apple’s official Xcode MCP?

Enable Xcode Tools in Xcode settings, then add Apple’s MCP with `xcrun mcpbridge` and XcodeMCP with `--sidekick-only` to your MCP configuration. The README provides JSON and Claude Code CLI examples for both servers.

3

Can I set preferred values to avoid repetitive parameters?

Yes. Use environment variables `XCODE_MCP_PREFERRED_SCHEME` and `XCODE_MCP_PREFERRED_XCODEPROJ` to make tool parameters optional, defaulting to those values. They can still be overridden explicitly.

4

What are the system requirements?

macOS with Xcode installed, Node.js 18 or later, and optionally XCLogParser (recommended for build log parsing). No other runtime dependencies are required.

5

How do I troubleshoot if the MCP fails in Claude Code?

Run `npx -y xcodemcp@latest` manually from the project folder to see any error output. Common issues include missing Node.js, Xcode, or permission problems.

コメント

「その他」の他のコンテンツ