🌐 Language: English | Español
All tools use JSON Schema (inputSchema) and return content: [{type:"text", text}] with isError:true on failure. Run via OpenCode or MCP Inspector.
xcodebuild build
{
"scheme": "MyApp",
"workspace": "MyApp.xcworkspace",
"project": "MyApp.xcodeproj",
"destination": "platform=iOS Simulator,name=iPhone 15,OS=17.5",
"configuration": "Debug"
}Returns full stdout/stderr. Uses shellEscape for paths with spaces.
xcodebuild clean [+ rm -rf ~/Library/Developer/Xcode/DerivedData]
{ "scheme": "MyApp", "purgeDerivedData": true }xcodebuild -list -json
{ "workspace": "MyApp.xcworkspace", "directory": "/path/to/project" }Returns pretty-printed JSON.
xcodebuild analyze
{ "scheme": "MyApp", "configuration": "Debug" }2 phases: xcodebuild archive → xcodebuild -exportArchive
{
"scheme": "MyApp",
"exportOptionsPlist": "~/ExportOptions.plist",
"archivePath": "build/MyApp.xcarchive",
"exportPath": "build/export",
"configuration": "Release",
"destination": "generic/platform=iOS"
}swift-format (preferred) → fallback swiftlint
{ "path": "Sources/", "mode": "lint", "tool": "auto" }mode: "lint"checksmode: "format"rewrites in-placetool: "swift-format" | "swiftlint" | "auto"
{
"scheme": "MyApp",
"destination": "platform=iOS Simulator,name=iPhone 15,OS=17.5",
"onlyTesting": "MyAppTests/MySuite/testExample",
"enableCodeCoverage": true
}Generates build/TestResults.xcresult.
xcrun xccov view --report --json <xcresult>
{ "xcresultPath": "build/TestResults.xcresult" }If omitted, finds the most recent .xcresult in ~/Library/Developer/Xcode/DerivedData (by mtime). Returns JSON + lineCoverage summary.
{ "booted": true }xcrun simctl list --json devices filtered by state === "Booted".
{ "action": "boot", "udid": "booted" }
{ "action": "shutdown", "udid": "A1B2-..." }
{ "action": "erase", "udid": "A1B2-..." }{ "appPath": "build/Debug-iphonesimulator/MyApp.app", "bundleId": "com.yanxreal.myapp", "launch": true, "udid": "booted" }{ "type": "screenshot", "outputPath": "/tmp/screen.png", "udid": "booted" }
{ "type": "record", "outputPath": "/tmp/cap.mp4", "durationSeconds": 10 }Screenshots via simctl io screenshot. Record uses recordVideo with SIGINT after durationSeconds.
{ "bundleId": "com.yanxreal.myapp", "payloadJson": "{\"aps\":{\"alert\":\"Hello\"}}", "udid": "booted" }Validates JSON and writes tmpfile before simctl push.
{ "latitude": 40.4168, "longitude": -3.7038 }Validates lat/lon ranges.
{ "service": "camera", "action": "grant", "bundleId": "com.yanxreal.myapp" }service: all|calendar|camera|contacts|homekit|location|location-always|media-library|microphone|motion|photos|reminders|siri
action: grant|revoke|reset
{ "appearance": "dark", "udid": "booted" }{ "url": "myapp://item/123", "udid": "booted" }
{ "url": "https://example.com" }{}xcrun devicectl list devices --json with text fallback if --json unavailable (Xcode <15).
{ "deviceUdid": "00008101-001A2B...", "durationSeconds": 10 }Streaming for N seconds (1–120) using timeout/gtimeout or bash fallback. Returns first 500 lines / 8000 chars.
{
"template": "Time Profiler",
"timeLimitSeconds": 10,
"outputFilePath": "/tmp/trace.trace",
"device": "iPhone 15",
"launchApp": "com.yanxreal.myapp"
}template: Time Profiler | Allocations | Leaks | System Trace | Network | Core Data
{ "action": "bump_build" }
{ "action": "set_version", "versionString": "2.0.0" }
{ "action": "set_build", "versionString": "42" }Maps to xcrun agvtool next-version -all / new-marketing-version / new-version -all.
{}security find-identity -p codesigning -v
{}AppleScript osascript → tell application "Xcode" to get path of front document.
{ "filePath": "/abs/path/View.swift", "line": 42, "column": 8 }Attempt 1: xed --line 42 /path → Attempt 2: open xcode://open?path=...&line=42&column=8
{ "filePath": "MyApp/Localizable.xcstrings" }Parses String Catalog (sourceLanguage, strings[].localizations[lang].stringUnit.{state,value}) and reports:
{
"totalKeys": 42,
"languages": ["en","es","fr"],
"missing": { "es": ["bye"] },
"pendingTranslation": { "es": [{ "key":"pending","state":"needs_review" }] },
"emptyValues": { "fr": ["hello"] }
}{ "xcassetsPath": "/path/to/Assets.xcassets" }fs.readdir recursive, filters *.colorset|*.imageset|*.appiconset|*.symbolset|*.dataset and returns {name, type, relativePath, absolutePath} sorted. Validates .xcassets directory.
{ "xcassetsPath": "/path/to/Assets.xcassets", "name": "Primary", "hexLight": "#FF5733", "hexDark": "#900C3F" }Creates ${name}.colorset/Contents.json with sRGB components via hexToRgbFloat (#RRGGBB → 0.000–1.000). Light as universal, Dark as universal + appearances: [{luminance: dark}]. Supports #RRGGBBAA.
{ "xcassetsPath": "/path/to/Assets.xcassets", "name": "Logo", "imagePath1x": "/tmp/a.png", "imagePath2x": "/tmp/a@2x.png", "isVector": false }Creates ${name}.imageset. For bitmap: copies to Logo_1x.png etc. with scale: 1x/2x/3x. For vector (isVector:true): copies single file as Logo.pdf/svg with properties: {preserves-vector-representation:true}.
{ "assetPath": "/path/to/Assets.xcassets/Primary.colorset" }Reads Contents.json (or file itself if direct). Validates JSON and returns raw content.
{ "assetPath": "/path/to/Assets.xcassets/Logo.imageset" }Safe delete: validates *.colorset|*.imageset|... extension and .xcassets containment, then fs.rm -rf.
{ "xcassetsPath": "/path/to/Assets.xcassets", "platform": "iphoneos" }xcrun actool "${xcassetsPath}" --compile /tmp/actool_out --platform iphoneos --minimum-deployment-target 15.0 --output-format human-readable-text. Returns Assets.car result + ✅ or ⚠️ warnings. Validates missing images, duplicate names.
{ "xcassetsPath": "/path/to/Assets.xcassets", "iconName": "AppIcon", "baseImagePath": "/tmp/1024.png", "includeIos": true, "includeMacOs": true, "includeWatchOs": true, "includeTvOs": true, "includeVisionOs": true }Generates ${iconName}.appiconset/Contents.json with 42 slots for ALL Apple OS: iOS (iphone/ipad/ios-marketing 20x20-1024), macOS (16x16-512x512), watchOS (38/42/45mm roles), tvOS (400x240/1280x768), visionOS (32/1024). If baseImagePath provided, runs sips -z {pixels} {base} --out {slot} per slot.
{ "projectPath": "/path/to/MyApp.xcodeproj" }Auto-detects Package.swift (swift package resolve/update) vs xcodebuild -resolvePackageDependencies.
{ "packageDirectory": "/path/to/Package.swift/dir" }swift package show-dependencies --format json
{ "resolvedFilePath": "/path/to/Package.resolved" }Supports v1/v2/v3 format, returns {version, totalDependencies, pins:[{identity, location, version, revision}]}
{ "projectPath": "/path/to/MyApp.xcodeproj" }xcodebuild -resetPackageCaches + rm -rf ~/Library/Caches/org.swift.swiftpm
{ "zipPath": "/path/to/MyXCFramework.zip" }swift package compute-checksum
{ "packageSwiftPath": "/path/to/Package.swift", "url": "https://github.com/Alamofire/Alamofire.git", "requirement": "from: \"5.8.0\"" }Edits dependencies: [...] array in Package.swift.
{ "projectPath": "/path/to/Podfile/dir", "action": "install", "repoUpdate": false }
{ "projectPath": "/path/to/Cartfile/dir", "action": "bootstrap", "platform": "iOS", "useXcframeworks": true }{ "podfilePath": "/path/to/Podfile", "packageSwiftPath": "/path/to/Package.swift", "dryRun": true }Parses pod 'SnapKit', '~> 5.0' → .upToNextMajor, supports dryRun preview.
{ "udid": "booted", "outputPath": "/tmp/sim_screen_latest.png" }xcrun simctl io screenshot + sips -g pixelWidth/Height → {imagePath, resolution:{width,height}, instructions} for Vision LLM.
{ "udid": "booted" }AppleScript via temp file → JSON array [{role,name,title,value,description,position:{x,y},size:{w,h},center:{x,y}}]. Fallback to raw if not JSON.
{ "text": "Continuar", "exactMatch": false, "udid": "booted" }Case-insensitive partial/exact search via AppleScript System Events entire contents of window 1, clicks elem or click at {centerX,centerY}, returns CLICKED:x,y:role.
{ "labelOrPlaceholder": "Correo", "textToType": "test@example.com", "clearFirst": true }Finds role contains "text field" matching label, click, keystroke "a" using command down + key code 51 if clearFirst, then keystroke "text".
All tools catch via global try/catch in index.js:1195 and helpers runCommand in index.js:39 return {success, stdout, stderr, code}. Formatted output via formatResult with isError:true when applicable.
# via MCP Inspector
yarn inspect
# or
make test