Releases: lapfelix/XcodeMCP
v2.1.4 - Fix Duplicate Warnings
Build Log Parsing Improvements
Fixed
- Duplicate warnings and errors: XcodeMCP now properly deduplicates identical warning and error messages from build logs
- Previously, builds with many duplicate warnings (e.g., deprecated API usage) would show each warning multiple times
- Example: A build with 91 total warnings but only 7 unique ones now correctly displays just the 7 unique warnings
Technical Changes
- Modified
BuildLogParser.tsto use Set-based deduplication for error and warning arrays - Applied deduplication after message formatting but before returning results
- Preserves all unique warnings while eliminating exact string duplicates
This patch release improves the clarity of build output by removing redundant duplicate messages while maintaining all unique diagnostic information.
v2.1.3 - Preferred Values Support
Preferred Values Configuration
This release introduces configurable preferred values for scheme and xcodeproj parameters, significantly reducing repetition when working with single projects while maintaining full backward compatibility.
Configuration Options
Environment Variables:
XCODE_MCP_PREFERRED_SCHEME- Set default schemeXCODE_MCP_PREFERRED_XCODEPROJ- Set default project path
Command-Line Arguments:
--preferred-scheme <scheme>- Set default scheme--preferred-xcodeproj <path>- Set default project path
Tool Parameter Changes
When preferred values are configured:
- Tool parameters become optional instead of required
- Tool descriptions dynamically show default values (e.g., "defaults to MyApp.xcodeproj")
- CLI help displays active preferred values in header section
Usage Examples
# Start MCP with preferred values
XCODE_MCP_PREFERRED_SCHEME=MyApp XCODE_MCP_PREFERRED_XCODEPROJ=MyApp.xcodeproj node dist/index.js
# CLI with preferred values
xcodecontrol --preferred-scheme MyApp build # No explicit scheme neededTechnical Enhancements
- Enhanced
XcodeServerconstructor to accept preferred value configuration - Modified
getToolDefinitions()to conditionally adjust parameter requirements - Added dynamic tool description generation with default value indicators
- Implemented comprehensive parameter resolution logic
- Added 14 new test cases covering all preferred value scenarios
Backward Compatibility
- Fully backward compatible - all existing usage patterns continue to work unchanged
- When no preferred values are set, behavior is identical to previous versions
- Mixed scenarios (partial preferred values) maintain original validation requirements
Technical release notes focused on implementation details and functionality changes
v2.1.2
MCP Registry Support
This release adds support for the MCP registry, allowing the server to be discovered and installed through MCP-compatible clients.
Changes
- Added
mcpNamefield to package.json for MCP registry validation - Created proper server.json configuration for MCP registry publishing
- Updated GitHub Actions workflows for automated MCP registry publishing
Technical Details
- The server is now registered as
io.github.lapfelix/xcodemcpin the MCP registry - Package validation uses the npm registry with the
mcpNamefield - Transport type is set to
stdiofor local execution
Installation
Continue using the existing installation methods:
npx xcodemcp@latestOr install globally:
npm install -g xcodemcpv2.1.1 - Tool Rename: xcode_run → xcode_build_and_run
Breaking Change: Tool Rename for Clarity
This release renames the xcode_run tool to xcode_build_and_run to better reflect its dual functionality of building the project first, then running it.
🚨 Breaking Changes
Tool Name Change
xcode_run→xcode_build_and_run(MCP tool name)run→build-and-run(CLI command name)
Updated Integrations
- All MCP clients using
xcode_runmust update toxcode_build_and_run - CLI users should update
xcodecontrol runtoxcodecontrol build-and-run - Updated help text and documentation to reflect the new naming
Technical Changes
Tool Definitions
- Updated shared tool definitions with new name and enhanced description
- Modified all server-side tool handlers and routing
- Updated CLI command mapping and parameter handling
Testing & Documentation
- Fixed all test cases for new tool name
- Updated README with correct tool and command references
- Enhanced parameter consistency validation tests
- All 86 tests passing with new naming convention
Migration Guide
# Before (v2.1.0 and earlier)
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "xcode_run", "arguments": {...}}}' | node dist/index.js
xcodecontrol run --xcodeproj /path/to/project.xcodeproj --scheme MyScheme
# After (v2.1.1+)
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "xcode_build_and_run", "arguments": {...}}}' | node dist/index.js
xcodecontrol build-and-run --xcodeproj /path/to/project.xcodeproj --scheme MySchemeThe new name better communicates that this tool performs both building and running operations, helping prevent confusion about its dual functionality.
v2.1.0 - Safety Enhancement: Optional Clean Tool
Safety Enhancement: Optional Clean Tool
This release introduces a new safety feature allowing users to disable the potentially destructive xcode_clean tool.
New Features
--no-clean Parameter
- Add
--no-cleancommand line argument to both MCP server and CLI - When enabled, completely removes the
xcode_cleantool from available tools list - Tool handlers return appropriate error if clean tool is accessed when disabled
- Maintains full backward compatibility (clean tool enabled by default)
Technical Implementation
Architecture Changes
- Modified
getToolDefinitions()to conditionally include clean tool based onincludeCleanparameter - Updated XcodeServer constructor to accept configuration options
- Enhanced CLI with
--no-cleanoption and dynamic tool filtering - Added proper error handling for disabled clean tool access
Usage Examples
# MCP server with clean tool disabled
node dist/index.js --no-clean
# CLI with clean tool disabled
xcodecontrol --no-clean list-toolsBackward Compatibility
- Clean tool remains enabled by default
- Existing integrations continue to work unchanged
- No breaking changes to existing API
This enhancement provides an additional safety layer for production environments or situations where accidental clean operations could be costly.
v2.0.0 - Major CLI Architecture & Run Command Overhaul
Major Architecture Changes & Critical Fixes
Breaking Changes
- CLI-First Architecture - Complete restructuring where the CLI (
xcodecontrol) is now the primary implementation, with the MCP server spawning CLI subprocesses for consistency - Tool Name Standardization - CLI commands now use dash-separated names (
open-project,health-check) instead of underscores for improved usability
Critical Run Command Fixes
- Eliminated stale build log detection - Fixed race condition where
xcode_runwould read previous build logs instead of current execution logs - Resolved run command stalling - Fixed infinite hanging when apps launched successfully by implementing proper AppleScript completion handlers for run actions
- AppleScript monitoring overhaul - Replaced unreliable build log file monitoring with direct Xcode action status detection using completion handlers
Full CLI Feature Parity
- Complete tool coverage - All 24 MCP tools now available as CLI commands, up from 4 hardcoded tools
- Enhanced verbosity control - Added
-v/--verboseand-q/--quietflags with proper log level management - Improved error handling - Special-cased health check exit codes to distinguish between degraded mode and critical failures
- JSON input/output support - Full compatibility with both command-line flags and JSON input formats
Technical Improvements
- Shared tool definitions - Single source of truth for tool schemas used by both CLI and MCP server to ensure consistency
- Robust CI/CD pipeline - Fixed all test failures including command name mapping, health check validation, and integration test expectations
- Documentation updates - Comprehensive README updates documenting dual CLI/MCP usage modes with correct command examples
Reliability Enhancements
- Race condition elimination - Proper timing of build log detection prevents reading stale data from previous runs
- Action-specific handling - Run actions now properly handle their unique "running" status behavior that differs from build/test actions
- Environment validation - Enhanced health checks with degraded mode support when optional dependencies are missing
Impact
This major release fundamentally changes the architecture to prioritize CLI usage while maintaining full MCP compatibility. The run command fixes resolve the most critical user-reported issues with build log detection and command stalling.
Breaking Change Notice: CLI command names now use dashes instead of underscores. Update any automation scripts accordingly.
Recommended for all users - especially those experiencing run command issues or requiring reliable CLI automation.
v1.8.0 - Test Execution & XCResult Parsing Fixes
Major Stability and Reliability Improvements
Critical Fixes
- Test execution hanging resolved - Eliminated infinite loops in AppleScript build monitoring that caused
xcode_testto hang indefinitely when tests succeeded - XCResult parsing failures fixed - Resolved false positive "corrupt XCResult" errors that prevented test result analysis
- Process handling improvements - Fixed Node.js child process event order issues that caused premature Promise rejections
Technical Improvements
- Modern xcresulttool API migration - Replaced deprecated legacy commands with current
test-resultsAPI for better reliability and future-proofing - Enhanced error handling - Improved Promise resolution logic and eliminated race conditions in XCResult parsing
- Simplified build monitoring - Replaced unreliable AppleScript polling with timeout-based approach for better consistency
- Updated data structures - Fixed TypeScript interfaces to match new xcresulttool output format
Reliability Enhancements
- All
xcresult_*tools (browse, summary, activities, etc.) now function consistently xcode_testproperly handles both build failure and success scenarios without hanging- Eliminated false positive Xcode bug reports that occurred during normal operation
- Better debugging capabilities with enhanced logging
Impact
This release addresses the two most common stability issues reported by users: test execution hanging and XCResult parsing failures. These fixes ensure that test automation workflows complete successfully and provide accurate results.
Recommended for all users experiencing test execution issues or XCResult parsing errors.
v1.7.4 - Critical Crash Prevention
Critical Server Stability Fix
Emergency Crash Prevention
- Eliminated xcode_close_project crashes - Simplified close logic to prevent complex timeout scenarios that caused server termination
- JXA Process Safety - Added 30-second timeouts and proper cleanup to prevent hanging child processes
- Triple-Layer Error Handling - Wrapped close operations in multiple try-catch blocks to ensure no exceptions escape
- Simplified Dialog Handling - Removed complex dialog detection that could cause race conditions
Technical Implementation
- Streamlined closeProject from 160+ lines to 28 lines of robust, crash-proof code
- Added comprehensive process cleanup in JXAExecutor with timeout protection
- Enhanced error boundaries around all Xcode automation operations
- Guaranteed server survival even if Xcode operations fail catastrophically
Why This Release is Critical
The previous version still experienced "transport closed" errors after xcode_close_project operations, despite initial crash prevention attempts. This release addresses the root cause with a complete rewrite of the close project logic and bulletproof error handling.
This version should eliminate all unexpected server terminations during normal operation.
v1.7.3 - Server Stability & Test Execution Fixes
Server Stability & Reliability Improvements
Critical Bug Fixes
- Transport Closed Errors - Eliminated aggressive uncaught exception handler that was terminating MCP server connections
- Versioned Xcode Support - Fixed permission validation to work with non-standard Xcode installations (e.g., Xcode-16.4.0.app)
- Test Execution Hangs - Reduced xcode_test timeouts from hours to seconds, preventing infinite waits when tests don't run
- XCResult Staging Case Sensitivity - Fixed staging folder detection bug on case-sensitive filesystems
Enhanced Error Handling
- Comprehensive Logging - Added detailed error logging with stack traces for better debugging
- Graceful Degradation - Server now continues operating after exceptions instead of crashing
- Clear Error Messages - Added helpful guidance when tests fail to run due to missing test targets
- Alert Detection Improvements - Enhanced Xcode dialog handling with detailed button logging
Test Execution Reliability
- Smart Timeout Management - Build log detection: 10 minutes → 10 seconds, Test completion: 12 hours → 30 seconds
- No-Test Detection - Provides clear feedback when current scheme lacks test targets
- XCResult File Validation - Improved detection and handling of test result files
- Better Scheme Guidance - Suggests using test-specific schemes when tests don't execute
Technical Implementation
- Removed process.exit() calls from exception handlers to maintain server stability
- Dynamic Xcode path resolution using xcode-select with intelligent fallbacks
- Enhanced JXA automation with better error recovery and dialog handling
- Robust timeout management prevents indefinite hangs in test operations
This release significantly improves server reliability and eliminates the transport closure issues that could interrupt MCP sessions during Xcode operations.
v1.7.2
Technical Improvements
XCResult Analysis Enhancement
- Fixed xcresult file selection to correctly return latest test results
- Improved test timestamp accuracy for screenshot extraction
- Enhanced error handling in xcresult browser console output
Test Execution Reliability
- Increased test execution timeout to 12 hours for long-running test suites
- Fixed timeout logic to properly wait for test completion before staging timeout
- Improved test status tracking and completion detection
MCP Protocol Compliance
- Added proper MCP over SSE support with session management
- Fixed TypeScript errors in xcresult file selection logic
- Enhanced parameter validation across tool implementations
This patch release improves test result analysis accuracy and reliability for extended test execution scenarios while maintaining full backward compatibility.