XCode CLI Wrapper
Problem: MCP clients can't efficiently use Xcode CLI tools because the build and simulator listing commands return more than 50k tokens, exceeding MCP limits. Solution: MCP tooling using progressive disclosure with intelligent caching.
What is XCode CLI Wrapper?
XCode CLI Wrapper is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to problem: mcp clients can't efficiently use xcode cli tools because the build and simulator listing commands return more than 50k tokens, exceeding mcp limits. solution: mcp tooling using progressive d...
Problem: MCP clients can't efficiently use Xcode CLI tools because the build and simulator listing commands return more than 50k tokens, exceeding MCP limits. Solution: MCP tooling using progressive disclosure with intelligent caching.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Problem: MCP clients can't efficiently use Xcode CLI tools b
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx xc-mcp-xcode-cli-wrapperConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use XCode CLI Wrapper
xc-mcp is an MCP server that wraps Xcode CLI tools and the iOS Simulator for use by AI agents, solving the critical problem that raw xcodebuild and simctl output can exceed 50,000 tokens per invocation. It applies progressive disclosure with intelligent caching so each MCP tool call returns only the relevant subset of data, keeping context usage at roughly 50 tokens per operation instead of 170 or more. The server exposes 29 tools spanning builds, tests, UI automation, accessibility checks, and full simulator lifecycle management.
Prerequisites
- macOS with Xcode 15 or later installed
- Node.js 18 or later
- Optional: idb (iOS Device Bridge) for advanced UI automation — install with 'brew install idb-companion'
- An MCP client such as Claude Desktop or Claude Code
- An iOS Xcode project directory
Confirm Xcode CLI tools are working
Verify that xcodebuild and the simctl tool are accessible before configuring the server.
xcodebuild -version
xcrun simctl list devicesInstall xc-mcp via npm or use npx
Install globally or let npx download it on demand when the MCP client starts the server.
npm install -g xc-mcpAdd to MCP client configuration with your project directory
Configure Claude Desktop or another MCP client to run xc-mcp with the cwd set to your iOS project. This is the key setting that scopes all Xcode tool calls to the correct project.
{
"mcpServers": {
"xc-mcp": {
"command": "npx",
"args": ["-y", "xc-mcp"],
"cwd": "/path/to/your/ios/project",
"env": {
"XCODE_CLI_MCP_TIMEOUT": "300",
"XCODE_CLI_MCP_LOG_LEVEL": "info"
}
}
}
}Enable deferred tool loading for faster startup
Version 3.0+ enables deferred loading by default to reduce startup time. You can control this explicitly via the XC_MCP_DEFER_LOADING env var.
# In your MCP env config:
# XC_MCP_DEFER_LOADING=true (default in v3.0+)Restart your MCP client and test with a simulator list
Restart Claude Desktop. Ask it to list simulators or run a health check to confirm all 29 tools are loaded and the project path is correct.
XCode CLI Wrapper Examples
Client configuration
Claude Desktop JSON config for xc-mcp pointing at a specific iOS project with custom timeout.
{
"mcpServers": {
"xc-mcp": {
"command": "npx",
"args": ["-y", "xc-mcp"],
"cwd": "/Users/me/Projects/MyiOSApp",
"env": {
"XCODE_CLI_MCP_TIMEOUT": "300",
"XCODE_CLI_MCP_LOG_LEVEL": "info",
"XC_MCP_DEFER_LOADING": "true"
}
}
}
}Prompts to try
Example prompts for AI-driven iOS development and simulator control.
- "Build MyiOSApp for the iPhone 15 Pro Max simulator and show any compiler errors."
- "Run the UI tests for the OnboardingFlow and tell me which ones failed."
- "Check the accessibility quality of the current screen and suggest fixes."
- "Find the email text field on screen and type '[email protected]' into it."
- "Do a fresh install of the app on the booted simulator."
- "What Xcode version and installed SDKs are available?"Troubleshooting XCode CLI Wrapper
Build commands time out on large projects
Set XCODE_CLI_MCP_TIMEOUT to a higher value (e.g., 600 or 900 seconds) in the env section of your MCP config. Clean builds of large projects routinely take several minutes.
idb UI tools return errors about missing idb_companion
Install idb-companion via Homebrew: 'brew install idb-companion'. Then install the Python client: 'pip install fb-idb'. The idb tools (idb-ui-tap, idb-ui-input, idb-ui-describe, etc.) require both components.
Tools operate on the wrong Xcode project or scheme
Ensure the cwd in your MCP config points to the directory containing your .xcodeproj or .xcworkspace file. Use the xcodebuild-list tool to verify which schemes and targets the server detects.
Frequently Asked Questions about XCode CLI Wrapper
What is XCode CLI Wrapper?
XCode CLI Wrapper is a Model Context Protocol (MCP) server that problem: mcp clients can't efficiently use xcode cli tools because the build and simulator listing commands return more than 50k tokens, exceeding mcp limits. solution: mcp tooling using progressive disclosure with intelligent caching. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install XCode CLI Wrapper?
Follow the installation instructions on the XCode CLI Wrapper GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with XCode CLI Wrapper?
XCode CLI Wrapper works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is XCode CLI Wrapper free to use?
Yes, XCode CLI Wrapper is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
XCode CLI Wrapper Alternatives — Similar Developer Tools Servers
Looking for alternatives to XCode CLI Wrapper? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up XCode CLI Wrapper in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use XCode CLI Wrapper?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.