About Xcode MCP Server.git
Xcode MCP Server.git is an MCP server published by r-huijts in the Developer Tools category: mCP Server implementation for Xcode integration. Conduid read 69 tools from its source: add_file_to_project, add_project_to_workspace, add_swift_package, boot_simulator, build_spm_package, build_swift_package and 63 more. It is published to npm as xcode-mcp-server and starts with npx.
The repository has 385 stars and 27 forks, is licensed MIT, and its last commit was on 2 Feb 2026. Conduid has no tagged release on record for it. It passes all 5 static checks Conduid ran on the repository. Its topics include devtools.
Install
claude mcp add xcode-mcp-server-git -- npx -y xcode-mcp-servernpx -y xcode-mcp-servergit clone https://github.com/r-huijts/xcode-mcp-server.gitTools (69)
add_file_to_projectAdds a file to the active Xcode project.| Parameter | Type | Description |
|---|---|---|
| createGroups | boolean | Whether to create intermediate groups if they don't exist (default: true) |
| filePath * | string | Path to the file to add to the project |
| group | string | Group path within the project to add the file to (e.g., 'MyApp/Models'). If not provided, will add to the root group. |
| targetName | string | Name of the target to add the file to. If not provided, will try to add to the first target. |
add_project_to_workspaceAdds an existing project to the active workspace.| Parameter | Type | Description |
|---|---|---|
| projectPath * | string | Path to the project to add to the workspace |
| workspacePath | string | Path to the workspace. If not provided, uses the active workspace. |
add_swift_packageAdds a Swift Package dependency to the active project. Note: Your project must already be set up for Swift Package Manager (must have a Package.swift file). If you haven't initialized SPM yet, use the init_swift_package tool first.| Parameter | Type | Description |
|---|---|---|
| productName | string | Specific product name to add from the package |
| skipUpdate | boolean | Skip running 'package update' after adding the dependency |
| url * | string | The URL of the Swift package to add |
| version | string | Version requirement (e.g., 'exact: 1.0.0', 'from: 1.0.0', 'branch: main') |
boot_simulatorBoot an iOS simulator by UDID or name| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the simulator to boot (will use the most recent iOS version if multiple match) |
| runtime | string | When using name, optionally specify the iOS runtime version (e.g., 'iOS 16') |
| udid | string | The UDID of the simulator to boot |
build_spm_packageBuilds a Swift Package Manager package directly using 'swift build' instead of Xcode.| Parameter | Type | Description |
|---|---|---|
| configuration | string | Build configuration to use (default: debug) |
| packagePath | string | Optional path to the directory containing Package.swift. If not provided, uses the active project directory. |
| target | string | Specific target to build. If not provided, builds all targets. |
| verbose | boolean | Whether to show verbose output (default: false) |
build_swift_packageBuilds a Swift Package using Swift Package Manager.| Parameter | Type | Description |
|---|---|---|
| buildTests | boolean | Also build test targets |
| configuration | string | Build configuration (default: debug) |
| jobs | number | Number of parallel build jobs |
| product | string | Build a specific product |
| showBinPath | boolean | Show binary output path |
| target | string | Build a specific target |
| verbose | boolean | Show verbose output |
change_directoryChanges the active directory for relative path operations.| Parameter | Type | Description |
|---|---|---|
| directoryPath * | string | Path to the directory to set as active. Supports absolute paths, paths relative to the current active directory, and ~ for home directory. |
check_cocoapodsChecks if the active project uses CocoaPods and returns setup information.| Parameter | Type | Description |
|---|---|---|
| includeOutdated | boolean | Check for outdated pods and include update information. Default: false |
check_file_existsChecks if a file or directory exists at the specified path.| Parameter | Type | Description |
|---|---|---|
| path * | string | Path to check. Can be absolute, relative to active directory, or use ~ for home directory. |
clean_swift_packageCleans the build artifacts of a Swift Package.| Parameter | Type | Description |
|---|---|---|
| purgeCache | boolean | Also purge the global cache |
| reset | boolean | Reset the complete build directory |
compile_asset_catalogCompiles an asset catalog (.xcassets) using actool| Parameter | Type | Description |
|---|---|---|
| appIcon | string | Name of the app icon set to include |
| catalogPath * | string | Path to the asset catalog (.xcassets directory) |
| minDeploymentTarget | string | Minimum deployment target version (default: 14.0) |
| outputDir * | string | Directory where compiled assets should be placed |
| platform | string | Target platform (default: iphoneos) |
| targetDevices | array | Target devices (default: ['iphone', 'ipad']) |
copy_fileCopies a file or directory to a new location within allowed directories.| Parameter | Type | Description |
|---|---|---|
| destination * | string | Destination path. Can be absolute, relative to active directory, or use ~ for home directory. |
| recursive | boolean | If true, copy directories recursively |
| source * | string | Source path. Can be absolute, relative to active directory, or use ~ for home directory. |
create_directoryCreates a new directory within allowed directories.| Parameter | Type | Description |
|---|---|---|
| path * | string | Path to create. Can be absolute, relative to active directory, or use ~ for home directory. |
create_workspaceCreates a new Xcode workspace and optionally adds existing projects to it.| Parameter | Type | Description |
|---|---|---|
| name * | string | Name of the workspace to create |
| outputDirectory * | string | Directory where the workspace will be created |
| projects | array | Optional array of project paths to add to the workspace |
| setAsActive | boolean | Whether to set the new workspace as the active project (default: true) |
create_xcode_projectCreates a new Xcode project using a template.| Parameter | Type | Description |
|---|---|---|
| includeTests | boolean | Whether to include unit tests (default: true) |
| includeUITests | boolean | Whether to include UI tests (default: false) |
| language | string | Programming language to use (default: swift) |
| name * | string | Name of the project to create |
| organizationIdentifier | string | Organization identifier (e.g., 'com.example') to use in the project |
| organizationName | string | Organization name to use in the project |
| outputDirectory * | string | Directory where the project will be created |
| setAsActive | boolean | Whether to set the new project as the active project (default: true) |
| template * | string | Template to use for the project |
delete_fileDeletes a file or directory within allowed directories.| Parameter | Type | Description |
|---|---|---|
| path * | string | Path to delete. Can be absolute, relative to active directory, or use ~ for home directory. |
| recursive | boolean | If true, delete directories recursively |
detect_active_projectAttempts to automatically detect the active Xcode project.| Parameter | Type | Description |
|---|---|---|
| forceRedetect | boolean | If true, always try to detect the project even if one is already set (default: false) |
dump_swift_packageDumps the Package.swift manifest as JSON.edit_package_swiftDirectly edit the Package.swift file of the active SPM project. This is useful for making changes that aren't supported by the other SPM tools.| Parameter | Type | Description |
|---|---|---|
| content * | string | The new content for the Package.swift file |
| createBackup | boolean | Whether to create a backup of the original file (default: true) |
| packagePath | string | Optional path to the Package.swift file. If not provided, uses the active project's Package.swift. |
export_archiveExport an Xcode archive for distribution (App Store, Ad Hoc, Enterprise, Development)| Parameter | Type | Description |
|---|---|---|
| archivePath * | string | Path to the .xcarchive file to export |
| compileBitcode | boolean | Whether to compile Bitcode. Default is true for App Store, false otherwise. |
| exportPath * | string | Directory where exported IPA and other files will be placed |
| method * | string | Distribution method |
| provisioningProfiles | object | Dictionary mapping bundle identifiers to provisioning profile names. |
| signingCertificate | string | Signing certificate to use. If not provided, will try to use the default certificate for the selected method. |
| stripSwiftSymbols | boolean | Whether to strip Swift symbols. Default is true. |
| teamId | string | Team ID for code signing. If not provided, will try to use the default team. |
find_filesSearches for files matching a pattern in a directory.| Parameter | Type | Description |
|---|---|---|
| maxDepth | number | Maximum directory depth to search |
| path * | string | Directory to search in. Can be absolute, relative to active directory, or use ~ for home directory. |
| pattern * | string | Glob pattern to match files (e.g., '*.swift' or '**/*.json') |
| showHidden | boolean | If true, include hidden files in the search |
find_projectsFinds Xcode projects in the specified directory.| Parameter | Type | Description |
|---|---|---|
| directory | string | Directory to search in. Defaults to projects base directory. |
| includeSPM | boolean | If true, include Swift Package Manager projects |
| includeWorkspaces | boolean | If true, include .xcworkspace files |
generate_icon_setGenerate an app icon set from a source image| Parameter | Type | Description |
|---|---|---|
| outputPath * | string | Path where to create the AppIcon.appiconset directory |
| platform | string | Target platform (default: ios) |
| sourceImage * | string | Path to the source image (should be at least 1024x1024) |
generate_swift_docsGenerates documentation for a Swift Package using DocC.| Parameter | Type | Description |
|---|---|---|
| hostingBasePath | string | Base path for hosting the documentation (e.g., '/docs') |
| openInBrowser | boolean | Open the generated documentation in a browser after generation (default: false) |
| outputPath * | string | Directory where the generated documentation will be saved |
| transformForStaticHosting | boolean | Transform the documentation for static hosting (default: true) |
get_active_projectRetrieves detailed information about the currently active Xcode project.| Parameter | Type | Description |
|---|---|---|
| detailed | boolean | If true, include additional detailed project information |
get_current_directoryReturns the current active directory.get_file_infoGets detailed information about a file or directory.| Parameter | Type | Description |
|---|---|---|
| path * | string | Path to the file or directory. Can be absolute, relative to active directory, or use ~ for home directory. |
get_package_infoGets detailed information about a Swift Package Manager package.| Parameter | Type | Description |
|---|---|---|
| packagePath | string | Optional path to the directory containing Package.swift. If not provided, uses the active project directory. |
get_project_configurationRetrieves configuration details for the active project, including schemes and targets.get_xcode_infoGet information about Xcode installations on the systeminit_swift_packageInitializes a new Swift Package Manager project in the current directory. Use this tool first if your project doesn't have a Package.swift file yet and you want to start using Swift packages.| Parameter | Type | Description |
|---|---|---|
| enableTests | boolean | Enable test targets (default: true) |
| name | string | Name for the package (defaults to directory name) |
| testingFramework | string | Testing framework to use (xctest or swift-testing) |
| type | string | Type of package to create (library, executable, tool, build-tool-plugin, command-plugin, macro, or empty) |
install_appInstall an app on a simulator| Parameter | Type | Description |
|---|---|---|
| appPath * | string | Path to the .app bundle to install |
| udid * | string | The UDID of the simulator |
launch_appLaunch an installed app on a simulator| Parameter | Type | Description |
|---|---|---|
| args | array | Arguments to pass to the app on launch |
| bundleId * | string | Bundle identifier of the app to launch |
| udid * | string | The UDID of the simulator |
| waitForDebugger | boolean | Wait for a debugger to attach before starting the app |
list_booted_simulatorsList all currently booted iOS simulatorslist_directoryLists the contents of a directory, showing both files and subdirectories.| Parameter | Type | Description |
|---|---|---|
| format | string | Format of the output: simple (names only) or detailed (with file information) |
| path * | string | Path to the directory to list. Can be absolute, relative to active directory, or use ~ for home directory. |
| showHidden | boolean | If true, include hidden files (starting with .) |
list_installed_appsList all installed applications on a simulator| Parameter | Type | Description |
|---|---|---|
| udid * | string | The UDID of the simulator |
list_project_filesLists all files within an Xcode project.| Parameter | Type | Description |
|---|---|---|
| fileType | string | Optional file extension filter. |
| projectPath * | string | Path to the .xcodeproj directory of the project. Can be absolute, relative to active directory, or use ~ for home directory. |
list_simulatorsList all available iOS simulators with filtering options| Parameter | Type | Description |
|---|---|---|
| filterName | string | Filter simulators by name (case-insensitive substring match) |
| filterRuntime | string | Filter simulators by runtime (e.g., 'iOS 16') |
| filterState | string | Filter simulators by state |
| format | string | Output format (json for raw data, parsed for structured data). Defaults to parsed. |
move_fileMoves a file or directory to a new location within allowed directories.| Parameter | Type | Description |
|---|---|---|
| destination * | string | Destination path. Can be absolute, relative to active directory, or use ~ for home directory. |
| source * | string | Source path. Can be absolute, relative to active directory, or use ~ for home directory. |
open_urlOpen a URL in a simulator| Parameter | Type | Description |
|---|---|---|
| udid * | string | The UDID of the simulator |
| url * | string | The URL to open |
pod_deintegrateDeintegrate CocoaPods from the active project, removing all traces of CocoaPods.pod_initGenerate a Podfile for the current project directory.pod_installRuns 'pod install' in the active project directory to install CocoaPods dependencies.| Parameter | Type | Description |
|---|---|---|
| cleanInstall | boolean | Ignore the contents of the project cache and force a full pod installation. |
| repoUpdate | boolean | Whether to update the spec repositories before installation. Defaults to false. |
| verbose | boolean | Show more debugging information during installation. |
pod_outdatedShows outdated pods in the current project and their available updates.| Parameter | Type | Description |
|---|---|---|
| ignorePrerelease | boolean | Don't consider prerelease versions to be updates. Defaults to true. |
| repoUpdate | boolean | Whether to update the spec repositories before checking for outdated pods. Defaults to false. |
pod_repo_updateUpdates the local clone of the CocoaPods spec repositories.| Parameter | Type | Description |
|---|---|---|
| silent | boolean | Show nothing during update. |
| verbose | boolean | Show more detailed output. |
pod_updateRuns 'pod update' in the active project directory to update CocoaPods dependencies.| Parameter | Type | Description |
|---|---|---|
| cleanInstall | boolean | Ignore the contents of the project cache and force a full pod installation. |
| excludePods | array | Optional list of pods to exclude during update. |
| pods | array | Optional list of specific pods to update. If not provided, updates all pods. |
| repoUpdate | boolean | Whether to update the spec repositories before updating pods. Defaults to true. |
| sources | array | Optional list of sources from which to update dependent pods. |
pop_directoryPops a directory from the stack and changes to it.push_directoryPushes the current directory onto a stack and changes to a new directory.| Parameter | Type | Description |
|---|---|---|
| directoryPath * | string | Path to the directory to set as active. Supports absolute paths, paths relative to the current active directory, and ~ for home directory. |
read_fileReads the contents of a file within the active project or allowed directories.| Parameter | Type | Description |
|---|---|---|
| asBinary | boolean | If true, read the file as binary and return base64-encoded content. Useful for images and other binary files. |
| encoding | string | Encoding to use when reading the file (e.g., 'utf-8', 'latin1'). Default is 'utf-8'. |
| filePath * | string | Path to the file to read. Can be absolute, relative to active directory, or use ~ for home directory. |
remove_swift_packageRemoves a Swift Package dependency from the active project.| Parameter | Type | Description |
|---|---|---|
| confirm * | boolean | Confirmation to remove the package. Must be set to true. |
| url * | string | The URL of the Swift package to remove |
reset_simulatorReset a simulator by erasing all content and settings| Parameter | Type | Description |
|---|---|---|
| confirm * | boolean | Confirmation to reset the simulator. Must be set to true. |
| udid * | string | The UDID of the simulator to reset |
resolve_pathResolves a path, taking into account the active directory and current project.| Parameter | Type | Description |
|---|---|---|
| path * | string | Path to resolve. Can be absolute, relative to active directory, or use ~ for home directory. |
run_lldbLaunches the LLDB debugger with optional arguments| Parameter | Type | Description |
|---|---|---|
| args | string | Arguments to pass to lldb |
| command | string | Single LLDB command to execute |
run_xcrunExecutes a specified Xcode tool via xcrun| Parameter | Type | Description |
|---|---|---|
| args | string | Arguments to pass to the tool |
| tool * | string | The name of the Xcode tool to run |
| workingDir | string | Working directory to execute the command in |
search_in_filesSearches for text content within files in a directory.| Parameter | Type | Description |
|---|---|---|
| caseSensitive | boolean | If true, perform a case-sensitive search |
| directory * | string | Directory to search in. Can be absolute, relative to active directory, or use ~ for home directory. |
| includeHidden | boolean | If true, include hidden files in the search |
| isRegex | boolean | If true, treat searchText as a regular expression |
| maxResults | number | Maximum number of results to return |
| pattern * | string | File pattern to match (e.g., '*.swift', '*.{js,ts}') |
| searchText * | string | Text or regular expression to search for within the files |
set_project_pathSets the active Xcode project by specifying the path to its .xcodeproj directory.| Parameter | Type | Description |
|---|---|---|
| openInXcode | boolean | If true, also open the project in Xcode (default: false) |
| projectPath * | string | Path to the .xcodeproj directory for the desired project. Supports ~ for home directory and environment variables. |
| setActiveDirectory | boolean | If true, also set the active directory to the project directory |
set_projects_base_dirSets the base directory where your Xcode projects are stored.| Parameter | Type | Description |
|---|---|---|
| baseDir * | string | Path to the directory containing your Xcode projects. Supports ~ for home directory and environment variables. |
show_swift_dependenciesShows the resolved dependencies of a Swift Package.| Parameter | Type | Description |
|---|---|---|
| format | string | Output format (default: text) |
| outputPath | string | Path to save output to a file |
| verbose | boolean | Show verbose output |
shutdown_simulatorShutdown a simulator by UDID, or shutdown all running simulators| Parameter | Type | Description |
|---|---|---|
| all | boolean | Shutdown all running simulators |
| udid | string | The UDID of the simulator to shutdown |
swift_package_commandExecutes Swift Package Manager commands in the active project directory.| Parameter | Type | Description |
|---|---|---|
| command * | string | The SPM command to execute (e.g., 'build', 'test', 'clean', 'resolve') |
| configuration | string | Build configuration ('debug' or 'release') |
| extraArgs | string | Additional arguments to pass to the command |
switch_xcodeSwitch the active Xcode version| Parameter | Type | Description |
|---|---|---|
| version | string | Version of Xcode to use (e.g., '14.3'). Will use the first matching version found. |
| xcodePath | string | Path to the Xcode.app to use. If not provided, available Xcode installations will be listed. |
take_screenshotTake a screenshot of a simulator| Parameter | Type | Description |
|---|---|---|
| outputPath * | string | Path where to save the screenshot (PNG format) |
| udid * | string | The UDID of the simulator |
terminate_appTerminate a running app on a simulator| Parameter | Type | Description |
|---|---|---|
| bundleId * | string | Bundle identifier of the app to terminate |
| udid * | string | The UDID of the simulator |
test_spm_packageRuns tests for a Swift Package Manager package directly using 'swift test' instead of Xcode.| Parameter | Type | Description |
|---|---|---|
| filter | string | Filter to run a subset of tests. Format: 'TestTarget[.TestClass[.testMethod]]'. |
| packagePath | string | Optional path to the directory containing Package.swift. If not provided, uses the active project directory. |
| parallel | boolean | Whether to run tests in parallel (default: true) |
| verbose | boolean | Whether to show verbose output (default: false) |
test_swift_packageTests a Swift Package using Swift Package Manager.| Parameter | Type | Description |
|---|---|---|
| codeCoverage | boolean | Enable code coverage |
| configuration | string | Build configuration (default: debug) |
| filter | string | Run tests matching regular expression (e.g., 'MyTests.MyTestCase/testExample') |
| listTests | boolean | List all available tests instead of running them |
| numWorkers | number | Number of parallel test workers |
| outputPath | string | Path for XUnit test results output |
| parallel | boolean | Run tests in parallel |
| skip | string | Skip tests matching regular expression |
trace_appCaptures a performance trace of an application using xctrace| Parameter | Type | Description |
|---|---|---|
| appPath * | string | Path to the application to trace |
| duration | number | Duration of the trace in seconds (default: 10) |
| outputPath | string | Path where to save the trace file (default: app_trace.trace in active directory) |
| startSuspended | boolean | Start the application in a suspended state |
| template | string | Trace template to use (default: 'Time Profiler') |
update_swift_packageUpdates the dependencies of your Swift project using Swift Package Manager.| Parameter | Type | Description |
|---|---|---|
| branch | string | The branch to resolve at (only applies when specificPackage is provided) |
| revision | string | The revision to resolve at (only applies when specificPackage is provided) |
| specificPackage | string | Only update this specific package (leave empty to update all) |
| version | string | The version to resolve at (only applies when specificPackage is provided) |
validate_appValidate an app for App Store submission using altool| Parameter | Type | Description |
|---|---|---|
| apiIssuer | string | API Key Issuer ID (required if using apiKey) |
| apiKey | string | API Key ID (alternative to username/password) |
| apiKeyPath | string | Path to the API Key .p8 file (required if using apiKey) |
| ipaPath * | string | Path to the .ipa file to validate |
| password * | string | App-specific password for the App Store Connect account |
| username * | string | App Store Connect username (usually an email) |
write_fileWrites or updates the content of a file within the active project or allowed directories.| Parameter | Type | Description |
|---|---|---|
| content * | string | The content to be written to the file. |
| createIfMissing | boolean | If true, creates the file if it doesn't exist. |
| createPath | boolean | If true, creates the directory path if it doesn't exist. |
| encoding | string | Encoding to use when writing the file (e.g., 'utf-8', 'latin1'). Default is 'utf-8'. |
| filePath | string | Alias for 'path' parameter (deprecated) |
| fromBase64 | boolean | If true, decode the content from base64 before writing. Useful for binary files. |
| path * | string | Path to the file to update or create. Can be absolute, relative to active directory, or use ~ for home directory. |
Security checks
Static checks derived from the repository yesterday. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 2.1K words.
- ✓License declaredThe repository declares the MIT license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by package-lock.json.
- ✓No dynamic code executionScanned 16 source files and found no eval, dynamic Function or shell execution.
1 check has not been run yet.
What the source scan found
- Transport
- stdiosrc/server.ts:2
- Starts other programs
- No calls that start other programs
- Outbound network calls
- No outbound network calls
- Writes or deletes files
- 34 callssrc/tools/file/index.ts:225, src/tools/file/index.ts:237, src/tools/file/index.ts:246
- Lockfile
- package-lock.json
Pattern matches on the source text of 16 files: places to read, not proof of what the code does at run time.
README
The repository's README runs to about 2.1K words, fetched yesterday. The original in the repository is authoritative.
Read full README