xcode-mcp-server

v1.0.3
xcode-mcp-server Checked 3 days ago Published 1 year ago

An MCP server for Xcode integration, enabling AI assistants to interact with Xcode projects

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

set_projects_base_dir

Sets the base directory where your Xcode projects are stored.

ParameterTypeDescription
baseDir *stringAbsolute path to the directory containing your Xcode projects.

set_project_path

Sets the active Xcode project by specifying the path to its .xcodeproj directory.

ParameterTypeDescription
projectPath *stringPath to the .xcodeproj directory for the desired project.

get_active_project

Retrieves detailed information about the currently active Xcode project.

read_file

Reads the contents of a file within the active Xcode project.

ParameterTypeDescription
filePath *stringRelative or absolute path to the file within the active project.

write_file

Writes or updates the content of a file in the active Xcode project.

ParameterTypeDescription
content *stringThe content to be written to the file.
filePath *stringRelative or absolute path to the file to update or create.
createIfMissingbooleanIf true, creates the file if it doesn't exist.

list_project_files

Lists all files within an Xcode project.

ParameterTypeDescription
projectPath *stringPath to the .xcodeproj directory of the project.
fileTypestringOptional file extension filter.

analyze_file

Analyzes a source file for potential issues using Xcode's static analyzer.

ParameterTypeDescription
filePath *stringPath to the source file to analyze.

build_project

Builds the active Xcode project using the specified configuration and scheme.

ParameterTypeDescription
configuration *stringBuild configuration to use (e.g., 'Debug' or 'Release').
scheme *stringName of the build scheme to be built. Must be one of the schemes available in the project.

run_tests

Executes tests for the active Xcode project.

ParameterTypeDescription
testPlanstringOptional name of the test plan to run.

run_xcrun

Executes a specified Xcode tool via 'xcrun'.

ParameterTypeDescription
tool *stringName of the Xcode tool to execute.
argumentsstringOptional additional arguments to pass to the specified tool.

list_simulators

Lists all available iOS simulators with their details by invoking 'xcrun simctl list --json'.

boot_simulator

Boots an iOS simulator identified by its UDID.

ParameterTypeDescription
udid *stringThe UDID of the simulator to boot.

shutdown_simulator

Shuts down an active iOS simulator using its UDID.

ParameterTypeDescription
udid *stringThe UDID of the simulator to shutdown.

compile_asset_catalog

Compiles an asset catalog using 'actool'.

ParameterTypeDescription
catalogPath *stringPath to the asset catalog.
outputDir *stringDirectory where the compiled assets should be saved.

run_lldb

Launches the LLDB debugger with custom arguments.

ParameterTypeDescription
lldbArgsstringOptional LLDB arguments.

trace_app

Captures a performance trace of an application using 'xctrace'.

ParameterTypeDescription
appPath *stringPath to the application binary to trace.
durationnumberDuration (in seconds) for the trace.

swift_package_update

Updates the dependencies of your Swift project using Swift Package Manager by invoking 'swift package update'.

list_directory

Lists the contents of a directory, showing both files and subdirectories.

ParameterTypeDescription
path *stringPath to the directory to list.