XC-MCP is an intelligent Xcode CLI wrapper that optimizes developer workflows through progressive disclosure, smart caching, and AI-driven learning to address MCP client token limits.
Core Capabilities:
Xcode Project Management: Execute builds with smart defaults, list targets/schemes/configurations, show SDKs, get version info, and clean artifacts with cached logs and learning systems
Simulator Control: Manage iOS simulators with concise summaries, progressive disclosure for full details, boot/shutdown operations with performance tracking, and smart recommendations
Intelligent Caching System: Multi-layer caching with configurable timeouts, comprehensive statistics, cache clearing, and cached response listing
Data Persistence: File-based state persistence across server restarts for cache data and learned patterns
AI-Driven Optimization: Learning from usage patterns, performance metrics tracking (build/boot times), and adaptive intelligence for improved recommendations and workflow efficiency
Provides intelligent Xcode CLI tooling with progressive disclosure, enabling build operations, simulator management, project discovery, and cache management while solving token overflow issues through smart caching and concise summaries
XC-MCP: Intelligent Xcode MCP Server
Problem: MCP clients can't effectively use Xcode CLI tools because the build and simulator listing commands return more than 50,000 tokens, exceeding MCP limits.
Solution: Progressive disclosure with intelligent caching returns 2,000 tokens instead, achieving 96% reduction.
Result: Full Xcode tooling functionality without token overflow, 90% faster workflows.
Quick Start
MCP Configuration (Claude Desktop):
Why This Exists
Raw Xcode CLI tools break MCP clients due to massive output:
simctl list
: 57,000+ tokens (exceeds MCP limits)xcodebuild
logs: 135,000+ tokens (unusable)- No state memory between operations
XC-MCP solves this with progressive disclosure: return concise summaries first, full data on demand via cache IDs. This maintains complete functionality while respecting MCP token constraints.
Core Features
Progressive Disclosure System
- Concise summaries by default: 96% token reduction for simulator lists
- Full details on demand: Use cache IDs to access complete data
- Smart filtering: Return only relevant information upfront
- Token-efficient responses: Never exceed MCP client limits
Three-Layer Intelligent Cache
- Simulator Cache: 1-hour retention with usage tracking and performance metrics
- Project Cache: Remembers successful build configurations per project
- Response Cache: 30-minute retention for progressive disclosure access
Smart Defaults & Learning
- Build configuration memory: Learns successful settings per project
- Simulator recommendations: Prioritizes recently used and optimal devices
- Performance tracking: Records boot times, build success rates, optimization metrics
- Adaptive intelligence: Improves suggestions based on usage patterns
Usage Examples
Progressive Simulator Management
Get instant simulator summary (2k tokens vs 57k):
Returns concise summary with cache ID for detailed access:
Access full details when needed:
Smart Building with Configuration Memory
Build with automatic smart defaults:
Returns build summary with cache ID for full logs:
Cache Management
Monitor cache performance:
Configure cache timeouts:
Installation & Configuration
Prerequisites
- macOS with Xcode command-line tools
- Node.js 18+
- Xcode 15+ recommended
Install Xcode CLI tools:
Installation Options
MCP Client Configuration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
:
Tool Reference
Category | Tool | Description | Progressive Disclosure |
---|---|---|---|
Project Discovery | xcodebuild-list | List targets, schemes, configurations | ✓ |
xcodebuild-showsdks | Available SDKs | - | |
xcodebuild-version | Xcode version info | - | |
Build Operations | xcodebuild-build | Build with smart defaults | ✓ (via buildId) |
xcodebuild-clean | Clean build artifacts | - | |
xcodebuild-get-details | Access cached build logs | - | |
Simulator Management | simctl-list | Simulator list with 96% token reduction | ✓ (via cacheId) |
simctl-get-details | Progressive access to full simulator data | - | |
simctl-boot | Boot with performance tracking | - | |
simctl-shutdown | Graceful shutdown | - | |
Cache Management | cache-get-stats | Cache performance metrics | - |
cache-set-config | Configure cache timeouts | - | |
cache-clear | Clear cached data | - | |
list-cached-responses | View cached build/test results | - |
Advanced Features
Performance Optimization
- 90% fewer repeated calls through intelligent caching
- Boot time tracking for simulator performance optimization
- Build trend analysis tracks success rates and timing
- Usage pattern learning improves recommendations over time
Persistent State Management (Optional)
Enable file-based persistence for cache data across server restarts:
Environment Variables
XCODE_CLI_MCP_TIMEOUT
: Operation timeout (default: 300s)XCODE_CLI_MCP_LOG_LEVEL
: Logging verbosityXCODE_CLI_MCP_CACHE_DIR
: Custom cache directory
Development
Build Commands
Testing
- Jest with ESM support
- 80% coverage threshold enforced
- Pre-commit hooks ensure code quality
License & Support
MIT License. For issues and questions, open a GitHub issue.
XC-MCP solves MCP token overflow for Xcode tooling through progressive disclosure and intelligent caching.
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
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.
Related MCP Servers
- -securityAlicense-qualityThis MCP server allows you to connect MCP clients with Toolhouse's tools.Last updated -14MIT License
- AsecurityAlicenseAqualityA MCP server that enables LLMs to interact with iOS simulators through natural language commands.Last updated -233Apache 2.0
- AsecurityAlicenseAqualityMCP server for Xcode build automation and log parsing that opens Xcode projects, triggers builds directly in Xcode, and parses build logs to extract errors and warnings.Last updated -245339Apache 2.0
- -securityFlicense-qualityAn MCP server that allows AI tools like Claude Desktop, Claude Code, and Cursor to visually interact with macOS applications by capturing screenshots and controlling the mouse and keyboard.Last updated -4