xctools

by nzrsky

Not rated
GitHub

About

🍎 MCP server for Xcode's xctrace, xcrun, xcodebuild.

Details

Author
nzrsky
Categories
Developer Tools, Community, Other

Setup

Install xctools in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/nzrsky/xctools-mcp-server

Follow the installation instructions in the repository README, then restart your MCP client.

A Model Context Protocol (MCP) server that provides structured access to Xcode development tools includingxcrun,xcodebuild, andxctrace.

- Python 3.13+
- Xcode with Command Line Tools installed
- uvx:curl -LsSf https://astral.sh/uv/install.sh | sh

Method 2: Local Development Installation

- Python 3.13+
- Xcode with Command Line Tools installed

git clone https://github.com/nzrsky/xctools-mcp-server cd xctools-mcp-server pip install .

- Build the wheel:

python -m build --wheel pip install dist/xctools_mcp_server-0.1.0-py3-none-any.whl

Add to your~/Library/Application Support/Claude/claude_desktop_config.json:

{ "mcpServers": { "xctools": { "command": "xctools-mcp-server", "args": [], "env": {} } } }
{ "mcpServers": { "xctools": { "command": "uvx", "args": ["xctools-mcp-server"], "env": {} } } }

- Install the MCP Extensionfrom the VS Code marketplace
- Add server configurationto your VS Code settings (settings.json):

{ "mcp.servers": { "xctools": { "command": "xctools-mcp-server", "args": [], "env": {} } } }
{ "mcp.servers": { "xctools": { "command": "uvx", "args": ["xctools-mcp-server"], "env": {} } } }

- Restart VS Codeto load the MCP server
- Use the Command Palette(Cmd+Shift+P) and search for "MCP" commands to interact with the Xcode development tools

The server runs on stdio, so you can invoke it directly:

- Complete Xcode toolchain accessthroughxcrun
- Project building and testingwithxcodebuild
- Performance analysisusingxctrace(Instruments)
- SDK and destination management
- Comprehensive error handlingwith detailed messages
- Cross-platform compatibility(macOS with Xcode installed)

- xcrun_find_tool- Find the path to development tools (clang, swift, etc.)
- xcrun_show_sdk_path- Show the path to SDKs
- xcrun_show_sdk_version- Show SDK versions
- xcrun_run_tool- Run any development tool via xcrun

- xcodebuild_build- Build Xcode projects or workspaces
- xcodebuild_test- Run tests for projects/workspaces
- xcodebuild_archive- Archive projects for distribution
- xcodebuild_list- List targets, schemes, and configurations
- xcodebuild_show_sdks- List all available SDKs
- xcodebuild_show_destinations- Show valid build destinations

- xctrace_record- Record new Instruments traces
- xctrace_import- Import supported files into trace format
- xctrace_export- Export data from trace files
- xctrace_list- List available devices, templates, or instruments
- xctrace_symbolicate- Symbolicate traces with debug symbols

# Find the path to a specific tool "Find the path to clang compiler" # Show SDK path for iOS "Show the path to the iOS SDK" # Get SDK version information "Show the version of the iOS SDK"
# Build an Xcode project "Build the project MyApp.xcodeproj for iOS simulator" # Run tests for a workspace "Run tests for MyApp.xcworkspace on iPhone 15 Pro simulator" # Archive for distribution "Archive MyApp.xcworkspace for release" # List project information "List all schemes and targets in MyApp.xcodeproj"
# Record a trace for Time Profiler "Record a Time Profiler trace for MyApp on iPhone 15 Pro for 30 seconds" # List available instruments "List all available Instruments templates" # Export trace data "Export data from trace file to XML format" # Import a file for analysis "Import a .dtps file into Instruments trace format"
# List all available SDKs "Show all available SDKs for building" # Show build destinations "List all available destinations for iOS builds" # Run a tool via xcrun "Run swift command with version flag via xcrun"

The server includes comprehensive error handling:

- Command failures: Returns detailed error messages from xcrun, xcodebuild, and xctrace
- Missing Xcode: Detects when Xcode Command Line Tools are not available
- Invalid parameters: Validates tool arguments and provides helpful error messages
- Tool availability: Checks for required tools before execution
-

"xcrun: error: unable to find utility"

- Ensure Xcode Command Line Tools are installed:xcode-select --install
- Verify Xcode is properly configured:xcode-select -p

"No developer directory found"

- Install Xcode from the Mac App Store
- Accept Xcode license:sudo xcodebuild -license accept

- Ensure the user has necessary permissions to access Xcode tools
- Try running with proper macOS development permissions

- Verify the specific tool is available in your Xcode installation
- Some tools may require specific Xcode versions or additional components

- macOS: Required (Xcode development tools are macOS-only)
- Xcode: Xcode Command Line Tools or full Xcode installation
- Python: 3.13 or higher
- MCP Client: Claude Desktop, VS Code with MCP extension, or any MCP-compatible client

Contributions are welcome! Please feel free to submit a Pull Request.

This project is licensed under the MIT License - see the LICENSE file for details.

- Invalid parameters: Validates input parameters before execution
- File operations: Handles temporary files for push notifications safely

- The server only exposes read and simulator management operations
- No access to host file system beyond specified app paths
- Push notification payloads are validated for structure
- Privacy permission changes are explicit and logged

- Built specifically for iOS development workflows
- Optimized for common simulator management tasks
- Structured output parsing for JSON responses
- Support for both individual and batch operations
- Compatible with Xcode 15+ simulator features

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

A Model Context Protocol (MCP) server that enables AI assistants to integrate with Prometheus Alertmanager

A comprehensive MCP server for tooling interactions(40+) and resource accessibility(60+) plus many useful prompts to interact with Algorand Blockchain.

An MCP server that provides control over Android devices through ADB. Offers device screenshot capture, UI layout analysis, package management, and ADB command execution capabilities.

A Binary Ninja plugin, MCP server, and bridge that seamlessly integrates Binary Ninja with your favorite MCP client.

integration that connects BloodHound with AI through MCP, allowing security professionals to analyze Active Directory attack paths using natural language queries instead of Cypher.

A specialized MCP gateway for LLM enhancement prompts and jailbreaks with dynamic schema adaptation. Provides prompts for different LLMs using an enum-based approach.

Obtains latest dependency details for Clojure libraries.

A Model Context Protocol (MCP) server for CODESYS V3 programming environments.

Analyze large codebases and document collections using high-context models via OpenRouter, OpenAI, or Google AI -- very useful, e.g., with Claude Code

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.