xctools-mcp-server is a Model Context Protocol (MCP) server designed to provide structured access to Xcode-related development tools. It wraps command line tools such as xcrun, xcodebuild, and xctrace, enabling MCP-compatible clients to invoke these tools in a unified way, thereby simplifying iOS/macOS development workflows.
Main capabilities include:
- xcrun tools: locate development tool paths (such as clang, swift), display SDK paths and versions, and run arbitrary development tools.
- xcodebuild tools: build projects or workspaces, run tests, archive projects, list targets/schemes/configurations, and display available SDKs and valid build destinations.
- xctrace tools (Instruments): record new Instruments traces, import supported files, export trace data, list devices/templates/instruments, and symbolize traces using debug symbols.
Usage:
- Run directly via uvx: requires Python 3.13+, Xcode command line tools, and uvx, then execute
uvx xctools-mcp-server. - Local development installation: after cloning the repository, execute
pip install ., then runxctools-mcp-server. - Build from source: use
python -m build --wheelto build the wheel, thenpip install dist/xctools_mcp_server-0.1.0-py3-none-any.whl.
For Claude Desktop, add the configuration in claude_desktop_config.json ; for VS Code, install the MCP extension and add the server configuration in settings.json , then restart and use MCP commands via the command palette. Other MCP clients can invoke it directly via stdio.
Applicable scenarios: tool discovery, project building and testing, performance profiling, and SDK and destination management in iOS/macOS development.
Limitations: only supports macOS (because Xcode tools are macOS-only), requires Xcode command line tools or a full Xcode installation, Python 3.13 or later, and an MCP client. The server includes comprehensive error handling, such as command failures, missing Xcode, invalid arguments, and tool availability checks. Troubleshooting includes ensuring Xcode command line tools are installed (xcode-select --install), verifying the Xcode configuration (xcode-select -p), accepting the license (sudo xcodebuild -license accept), etc. The project uses the MIT license and welcomes contributions.