Labsco
nzrsky logo

xctools

โ˜… 2

from nzrsky

๐ŸŽ MCP server for Xcode's xctrace, xcrun, xcodebuild.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

XCTools MCP Server

A Model Context Protocol (MCP) server that provides structured access to Xcode development tools including xcrun, xcodebuild, and xctrace.

Features

  • Complete Xcode toolchain access through xcrun
  • Project building and testing with xcodebuild
  • Performance analysis using xctrace (Instruments)
  • SDK and destination management
  • Comprehensive error handling with detailed messages
  • Cross-platform compatibility (macOS with Xcode installed)

Available Tools

XCRUN Tools

  • xcrun_find_tool - Find the path to development tools (clang, swift, etc.)
  • xcrun_show_sdk_path - Show the path to SDKs
  • xcrun_show_sdk_version - Show SDK versions
  • xcrun_run_tool - Run any development tool via xcrun

XCODEBUILD Tools

  • xcodebuild_build - Build Xcode projects or workspaces
  • xcodebuild_test - Run tests for projects/workspaces
  • xcodebuild_archive - Archive projects for distribution
  • xcodebuild_list - List targets, schemes, and configurations
  • xcodebuild_show_sdks - List all available SDKs
  • xcodebuild_show_destinations - Show valid build destinations

XCTRACE Tools (Instruments)

  • xctrace_record - Record new Instruments traces
  • xctrace_import - Import supported files into trace format
  • xctrace_export - Export data from trace files
  • xctrace_list - List available devices, templates, or instruments
  • xctrace_symbolicate - Symbolicate traces with debug symbols

Error Handling

The server includes comprehensive error handling:

  • Command failures: Returns detailed error messages from xcrun, xcodebuild, and xctrace
  • Missing Xcode: Detects when Xcode Command Line Tools are not available
  • Invalid parameters: Validates tool arguments and provides helpful error messages
  • Tool availability: Checks for required tools before execution

Security Considerations

  • The server only exposes read and simulator management operations
  • No access to host file system beyond specified app paths
  • Push notification payloads are validated for structure
  • Privacy permission changes are explicit and logged

Development Notes

  • Built specifically for iOS development workflows
  • Optimized for common simulator management tasks
  • Structured output parsing for JSON responses
  • Support for both individual and batch operations
  • Compatible with Xcode 15+ simulator features