XcodeBuildMCP
XcodeBuildMCP copied to clipboard
[Feature] Add archive and export functionality
Archive and Export Support
Summary
Add support for archiving Xcode projects and exporting archives for distribution. This would complete the build pipeline by enabling the final steps needed for App Store submission and distribution.
Motivation
Currently, the MCP provides comprehensive build and test capabilities but lacks archive/export functionality. Users need to fall back to raw xcodebuild commands via bash for these operations, breaking the unified MCP workflow.
Proposed Implementation
New Tools to Add:
archive_ws- Archive from workspace filesarchive_proj- Archive from project filesexport_archive- Export archives with various distribution methods
Parameters Needed:
archivePath- Output location for .xcarchiveexportPath- Output location for exported appexportMethod- App Store, Developer ID, Ad Hoc, etc.exportOptionsPlist- Custom export options- Code signing configuration options
Example Usage:
// Archive the project
archive_proj({
projectPath: "/path/to/MyApp.xcodeproj",
scheme: "MyApp",
archivePath: "/path/to/MyApp.xcarchive"
})
// Export for App Store
export_archive({
archivePath: "/path/to/MyApp.xcarchive",
exportPath: "/path/to/exports",
exportMethod: "app-store"
})
Implementation Notes
- Could follow existing patterns from
build_mac_proj.tsand similar commands - Leverage existing
executeXcodeBuildhelper function - Need to handle export options plist generation/validation
- Consider progress reporting for large archive operations
xcodebuild Commands to Wrap:
xcodebuild archive -project MyApp.xcodeproj -scheme MyApp -archivePath MyApp.xcarchive
xcodebuild -exportArchive -archivePath MyApp.xcarchive -exportPath ./exports -exportOptionsPlist ExportOptions.plist
This would make the MCP a complete solution for the entire iOS/macOS build and distribution pipeline.
Do you want to try and have a stab at this and put an PR together?