XCode CLI Wrapper

v1.0.0Developer Toolsstable

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.

claude-codeclaude-mcpcli-mcpios-appios-development
Share:
85
Stars
0
Downloads
0
Weekly
0/5

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

Efficiently use Xcode CLI tools with progressive disclosure and caching.
Reduce context usage from massive Xcode build output.
Control iOS simulators and builds from Claude.
conorluddy

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx xc-mcp-xcode-cli-wrapper

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

Confirm Xcode CLI tools are working

Verify that xcodebuild and the simctl tool are accessible before configuring the server.

xcodebuild -version
xcrun simctl list devices
2

Install 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-mcp
3

Add 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"
      }
    }
  }
}
4

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+)
5

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.

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.

Quick Config Preview

{ "mcpServers": { "xc-mcp-xcode-cli-wrapper": { "command": "npx", "args": ["-y", "xc-mcp-xcode-cli-wrapper"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides