Basic information
About Xcode Instruments CLI MCP Server
# XCTools MCP Server
Xcode Instruments CLI is a MCP server in the Developer Tools category listed in the AddMCP.net directory, published by nzrsky. It exposes 15 tools, including xcrun_find_tool, xcrun_show_sdk_path, xcrun_show_sdk_version, xcrun_run_tool and more. Supported transport: stdio. Runtime: Python. License: MIT. The repository has 2 GitHub stars. Source code is hosted on github.com. Related topics: instruments, xcode, xcodebuild, xcrun, xctrace.
Setup
{
"mcpServers": {
"xcinstruments": {
"command": "uvx",
"args": [
"xctools-mcp-server"
],
"env": []
}
}
}
{
"mcpServers": {
"xcinstruments": {
"command": "uvx",
"args": [
"xctools-mcp-server"
],
"env": []
}
}
}
{
"servers": {
"xcinstruments": {
"command": "uvx",
"args": [
"xctools-mcp-server"
],
"env": []
}
}
}
Xcode Instruments CLI MCP Server config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"xcinstruments": {
"command": "uvx",
"args": [
"xctools-mcp-server"
],
"env": []
}
}
}
Xcode Instruments CLI MCP Server tools
-
xcrun_find_tool
—
Find the path to a development tool using xcrun.
Args:
tool_name: Name of the tool to find (e.g., 'clang', 'swift', 'texturetool')
sdk: SDK name to search in (e.g., 'iphoneos', 'macosx')
Returns:
Absolute path to the tool
sdk, tool_name:string* -
xcrun_show_sdk_path
—
Show the path to the SDK.
Args:
sdk: SDK name (e.g., 'iphoneos', 'macosx'). Uses default if not specified.
Returns:
Path to the SDK
sdk -
xcrun_show_sdk_version
—
Show the version of the SDK.
Args:
sdk: SDK name (e.g., 'iphoneos', 'macosx'). Uses default if not specified.
Returns:
Version of the SDK
sdk -
xcrun_run_tool
—
Run a development tool via xcrun.
Args:
tool_name: Name of the tool to run
args: Arguments to pass to the tool
sdk: SDK to use when running the tool
verbose: Enable verbose output
Returns:
Output from the tool
args:array*, sdk, tool_name:string*, verbose:boolean -
xcodebuild_build
—
Build an Xcode project or workspace.
Args:
project: Path to .xcodeproj file
workspace: Path to .xcworkspace file
scheme: Scheme name to build
target: Target name to build
configuration: Build configuration (Debug, Release, etc.)
sdk: SDK to build against
destination: Destination to build for
clean: Whether to clean before building
Returns:
Build output
clean:boolean, configuration, destination, project, scheme, sdk, target, workspace -
xcodebuild_test
—
Run tests for an Xcode project or workspace.
Args:
project: Path to .xcodeproj file
workspace: Path to .xcworkspace file
scheme: Scheme name to test (required)
destination: Destination to test on
test_plan: Name of test plan to use
only_testing: List of test identifiers to run exclusively
skip_testing: List of test identifiers to skip
Returns:
Test results
destination, only_testing:array, project, scheme:string, skip_testing:array, test_plan, workspace -
xcodebuild_archive
—
Archive an Xcode project or workspace.
Args:
project: Path to .xcodeproj file
workspace: Path to .xcworkspace file
scheme: Scheme name to archive (required)
archive_path: Path where to save the archive
Returns:
Archive result
archive_path:string, project, scheme:string, workspace -
xcodebuild_list
—
List targets and configurations in a project, or schemes in a workspace.
Args:
project: Path to .xcodeproj file
workspace: Path to .xcworkspace file
Returns:
List of targets/schemes and configurations
project, workspace -
xcodebuild_show_sdks
—
List all available SDKs.
Returns:
List of available SDKs
(no parameters) -
xcodebuild_show_destinations
—
List valid destinations for a project or workspace and scheme.
Args:
project: Path to .xcodeproj file
workspace: Path to .xcworkspace file
scheme: Scheme name (required)
Returns:
List of valid destinations
project, scheme:string, workspace -
xctrace_record
—
Record a new Instruments trace using the specified template.
Args:
template: Template name or path to use for recording
output_path: Path to save the trace file
device: Device name or UDID to record on
time_limit: Time limit for recording (e.g., '5s', '1m')
all_processes: Record all processes on the system
attach_process: Process name or PID to attach to
launch_command: Command and arguments to launch and record
Returns:
Recording result
all_processes:boolean, attach_process, device, launch_command, output_path, template:string*, time_limit -
xctrace_import
—
Import a supported file format into an Instruments trace file.
Args:
input_file: Path to the input file to import (e.g., .logarchive, .ktrace)
template: Template name or path to use for import
output_path: Path to save the imported trace file
instrument: Name of instrument to add to import configuration
package: Path to Instruments Package to install temporarily
Returns:
Import result
input_file:string*, instrument, output_path, package, template:string* -
xctrace_export
—
Export data from an Instruments trace file.
Args:
input_file: Path to the .trace file to export from
output_path: Path to save the exported data
toc: Export table of contents
xpath: XPath expression to select specific data
Returns:
Exported data or success message
input_file:string*, output_path, toc:boolean, xpath -
xctrace_list
—
List available devices, templates, or instruments.
Args:
list_type: What to list ('devices', 'templates', 'instruments')
Returns:
List of requested items
list_type:string* -
xctrace_symbolicate
—
Symbolicate a trace file using debug symbols.
Args:
input_file: Path to the .trace file to symbolicate
output_path: Path to save the symbolicated trace
dsym_path: Path to dSYM file or directory containing dSYMs
Returns:
Symbolication result
dsym_path, input_file:string*, output_path
Overview
What is Xcode Instruments CLI?
A Model Context Protocol (MCP) server that provides structured access to Xcode development tools including xcrun, xcodebuild, and xctrace. It is designed for developers working with Xcode projects who want to manage builds, tests, archives, and performance traces through an MCP-compatible client such as Claude Desktop or VS Code.
How to use Xcode Instruments CLI?
Install with uvx xctools-mcp-server (requires Python 3.13+, Xcode Command Line Tools, and uv) or clone the repo and run pip install . then xctools-mcp-server. Configure by adding the server definition to your MCP client's configuration file (e.g., claude_desktop_config.json or VS Code settings.json) using either the installed command or uvx.
Key features of Xcode Instruments CLI
- Complete Xcode toolchain access through
xcrun - Project building and testing with
xcodebuild - Performance analysis using
xctrace(Instruments) - SDK and destination management
- Comprehensive error handling with detailed messages
- Cross-platform compatibility (macOS with Xcode installed)
Use cases of Xcode Instruments CLI
- Find the path to development tools like clang or swift
- Build, test, and archive Xcode projects or workspaces
- Record, import, export, and symbolicate Instruments traces
- List available SDKs, build destinations, devices, and templates
Frequently asked questions
1 What are the runtime requirements for Xcode Instruments CLI?
macOS (required), Xcode Command Line Tools or full Xcode installation, Python 3.13 or higher, and an MCP-compatible client such as Claude Desktop or VS Code with the MCP extension.
2 How do I install Xcode Instruments CLI?
You can run it directly with uvx xctools-mcp-server or install locally by cloning the repository and running pip install . inside the cloned directory.
3 What Xcode tools does Xcode Instruments CLI expose?
It provides tools for xcrun (find tool, show SDK path/version, run tool), xcodebuild (build, test, archive, list, show SDKs/destinations), and xctrace (record, import, export, list, symbolicate).
4 What should I do if I get a “xcrun: error: unable to find utility” message?
Ensure Xcode Command Line Tools are installed via xcode-select --install and verify the configured developer directory with xcode-select -p.
5 Does the server access my file system beyond Xcode tools?
The README states that security considerations cover read and simulator management operations only, with no host file system access beyond specified app paths and push notification payloads validated for structure.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In