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.
- 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
uv syncConfigure 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"
}
}
}Run the server in development mode:
uv run mcp dev src/server.pylist_schemes()- Get all available Xcode schemes in the workspaceget_active_scheme()- Get the currently active scheme nameset_active_scheme(scheme_name: str)- Switch to a different scheme
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
get_build_status()- Check build completion and get counts- Returns:
{completed: bool, status: str, errors: int, warnings: int}
- Returns:
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
- 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