xcode-ui-mcp

GyroJoe/xcode-ui-mcp

3.2

If you are the rightful owner of xcode-ui-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

An MCP server that integrates Xcode UI with various development tools using AppleScript.

Tools
3
Resources
0
Prompts
0

Xcode UI MCP

An MCP (Model Context Protocol) server that provides Xcode UI integration via AppleScript. Works with VS Code, GitHub Copilot, and other MCP clients.

Note: This code was generated by GitHub Copilot.

Features

  • Build Integration: Trigger builds via AppleScript with real-time progress updates, monitor status, and get errors/warnings
  • Scheme Management: List and switch between Xcode schemes
  • Build Diagnostics: Retrieve structured error and warning information from builds

Installation

uv sync

Usage

Configure in .vscode/mcp.json:

{
  "mcpServers": {
    "xcode-ui": {
      "command": "/opt/homebrew/bin/uv",
      "args": [
        "run",
        "mcp",
        "run",
        "src/server.py"
      ],
      "cwd": "/path/to/xcode-ui-mcp"
    }
  }
}

Development

Run the server in development mode:

uv run mcp dev src/server.py

Available Tools

Scheme Management

  • list_schemes() - Get all available Xcode schemes in the workspace
  • get_active_scheme() - Get the currently active scheme name
  • set_active_scheme(scheme_name: str) - Switch to a different scheme

Build Operations

  • build_scheme() - Trigger a build and monitor progress with real-time updates
    • Reports build status changes
    • Shows new errors as they occur
    • Updates warning counts periodically
    • Returns final build result

Build Diagnostics

  • get_build_status() - Check build completion and get counts
    • Returns: {completed: bool, status: str, errors: int, warnings: int}
  • get_build_errors(max_errors: int = None) - Get structured error information
    • Each error includes: file path, line, column, message
  • get_build_warnings(max_warnings: int = 20) - Get structured warning information
    • Each warning includes: file path, line, column, message

Implementation Details

  • Uses AppleScript to communicate with Xcode
  • Non-blocking build execution with status polling
  • Custom delimiter parsing to handle commas in error/warning messages
  • Graceful handling of missing file paths and line numbers