V2: Token Efficiency
Version 2.0.0
Consolidates the tool namespace from 51 to 28
tools through modular routing patterns, reducing MCP schema
token overhead by 75% from the v1.2.1 baseline. This release
introduces accessibility-first automation workflows and removes
7 tools with limited agent utility.
Token Efficiency
| Version | Tools | Token Count | Key Optimization |
|---|---|---|---|
| v1.2.1 | 51 | ~7,850 | Baseline (verbose |
| descriptions) | |||
| v1.3.2 | 51 | ~3,000 | RTFM progressive disclosure |
| v2.0.0 | 28 | ~1,980 | Operation enum consolidation |
Total reduction: 75% fewer tokens, 45% fewer tools.
Breaking Changes
Tool Consolidation
21 individual tools have been consolidated into 6 routers using
operation enums. All consolidated tools now require an
operation parameter.
simctl-device (7 tools → 1 router)
| Old Tool | New Syntax |
|---|---|
simctl-boot |
simctl-device({ operation: 'boot', ... }) |
simctl-shutdown |
`simctl-device({ operation: 'shutdown', |
| ... })` | |
simctl-create |
`simctl-device({ operation: 'create', ... |
| })` | |
simctl-delete |
`simctl-device({ operation: 'delete', ... |
| })` | |
simctl-erase |
simctl-device({ operation: 'erase', ... }) |
|
| simctl-clone | simctl-device({ operation: 'clone', ... })
|
| simctl-rename | simctl-device({ operation: 'rename', ... }) |
simctl-app (4 tools → 1 router)
| Old Tool | New Syntax |
|---|---|
simctl-install |
simctl-app({ operation: 'install', ... }) |
|
| simctl-uninstall | simctl-app({ operation: 'uninstall', ... }) |
| simctl-launch | simctl-app({ operation: 'launch', ... }) |
| simctl-terminate | simctl-app({ operation: 'terminate', ... }) |
idb-app (4 tools → 1 router)
| Old Tool | New Syntax |
|---|---|
idb-install |
idb-app({ operation: 'install', ... }) |
idb-uninstall |
idb-app({ operation: 'uninstall', ... }) |
idb-launch |
idb-app({ operation: 'launch', ... }) |
idb-terminate |
idb-app({ operation: 'terminate', ... }) |
idb-targets (extended with 2 operations)
| Old Tool | New Syntax |
|---|---|
idb-targets |
idb-targets({ operation: 'list', ... }) |
idb-connect |
idb-targets({ operation: 'connect', ... }) |
idb-disconnect |
`idb-targets({ operation: 'disconnect', ... |
})` |
New operations: describe, focus
cache (4 tools → 1 router)
| Old Tool | New Syntax |
|---|---|
cache-get-stats |
cache({ operation: 'get-stats', ... }) |
cache-get-config |
cache({ operation: 'get-config', ... }) |
|
| cache-set-config | cache({ operation: 'set-config', ... })
|
| cache-clear | cache({ operation: 'clear', ... }) |
persistence (3 tools → 1 router)
| Old Tool | New Syntax |
|---|---|
persistence-enable |
`persistence({ operation: 'enable', ... |
})` |
| persistence-disable | persistence({ operation: 'disable', ... }) |
| persistence-status | persistence({ operation: 'status', ... }) |
Removed Tools
The following tools have been removed:
xcodebuild-showsdks- Static environment information, agents
typically use default SDKssimctl-suggest- Agents have explicit device requirements,
recommendation logic redundantsimctl-addmedia- Niche use case for photo picker testingsimctl-privacy- Permission testing rarely needed in
CI/automated workflowssimctl-pbcopy- Text input achievable viaidb-ui-inputsimctl-status-bar- Cosmetic screenshot enhancement, not
required for developmentlist-cached-responses- Meta debugging tool, limited agent
utility
New Features
Accessibility-First Automation
Three new tools enable semantic UI automation as the primary
interaction method, with screenshots as fallback:
accessibility-quality-check
Assesses UI accessibility tree richness and provides workflow
recommendations.
Returns:
- Quality classification:
rich(>3 tappable elements),
moderate(2-3),minimal(≤1) - Recommendation:
accessibility-readyorscreenshot-needed - Element counts by type
- Performance metrics
Cost: ~30 tokens, ~80ms
idb-ui-find-element
Searches accessibility tree by label or identifier text
(case-insensitive, partial matching).
Returns:
- Matched elements with tap coordinates (centerX, centerY)
- Element metadata (type, label, identifier, enabled state)
- Frame bounds for visual context
Cost: ~40 tokens, ~100ms
idb-ui-describe
Extended with progressive disclosure for large accessibility
trees.
Returns:
- Summary with element counts and statistics
- Full element list or cache ID for progressive access
- Tappable element highlighting
Cost: ~50 tokens, ~120ms
Performance Comparison
| Approach | Token Cost | Response Time | Use Case |
|---|---|---|---|
| Accessibility tree query | ~50 | 120ms | Primary automation |
| method (95% of cases) | |||
| Screenshot analysis | ~170 | 2000ms | Fallback for custom UI |
| (5% of cases) |
Result: 3.4x cheaper, 16x faster for accessibility-driven
workflows.
New Utilities
element-extraction.ts
Extracts accessibility elements from simulator using simctl
query commands.
Features:
- Queries 8 element types (Button, TextField, SecureTextField,
Switch, Slider, StaticText, Link, PickerWheel) - Parses bounds from AXFrame format
- Handles malformed output gracefully
- Returns coordinate-ready elements for tap operations
idb-device-detection.ts
Handles UDID resolution and device validation for IDB
operations.
Functions:
resolveIdbUdid()- Auto-detects UDID when not provided,
falls back to last-used targetvalidateDeviceReady()- Validates IDB companion connection
for physical devicesvalidateTargetBooted()- Ensures target is in Booted state
before operations
Test Coverage
Added 119 tests across 5 new test suites:
idb-ui-find-element.test.ts- 22 tests for semantic element
searchidb-accessibility-quality-check.test.ts- 25 tests for
quality assessment logicelement-extraction.test.ts- 23 tests for accessibility
element parsingidb-device-detection.test.ts- 21 tests for UDID resolution
and validationidb-ui-describe.test.ts- 34 tests for UI tree querying with
progressive disclosure
Total test count: 1,136 tests passing
Coverage: 52.77% → 60.28%
Documentation
README.md
Complete rewrite with:
- Token efficiency evolution table
- Accessibility-first philosophy explanation with performance
data - Progressive disclosure pattern examples
- RTFM on-demand documentation workflow
- Tool reference organized by category
- CLAUDE.md template for end users
CLAUDE.md
Targeted updates:
- Project overview with v2.0.0 metrics
- Accessibility-first workflow section with decision tree
- V2.0 migration notes with complete tool consolidation mapping
- Updated coverage requirements (80% → 60%)
RTFM Tool Documentation
All tool documentation updated with:
- Operation enum specifications for consolidated routers
- Migration examples for v1.x → v2.0
- Accurate tool counts (fixed: 33 → 28 tools)
Architecture Changes
Router Pattern
Consolidated routers follow consistent architecture:
- Thin routing layer (~100-200 lines)
- Operation enum for type safety
- Delegates to original tool implementations
- Preserves modularity of individual tool files
Example router structure:
export async function simctlDeviceTool(args: SimctlDeviceArgs) {
const { operation } = args;
switch (operation) {
case 'boot': return simctlBootTool(args);
case 'shutdown': return simctlShutdownTool(args);
// ... other operations
}
}Progressive Disclosure
RTFM tool provides on-demand documentation access:
- Minimal tool descriptions in MCP schema (~70 tokens each)
- Full documentation with examples available via
rtfm({ toolName }) - Category browsing via
rtfm({ categoryName }) - Suggestion system for typos/partial matches
Installation
npm
npm install xc-mcp@2.0.0MCP Configuration
Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"xc-mcp": {
"command": "npx",
"args": ["-y", "xc-mcp@2.0.0"]
}
}
}Local development configuration:
{
"mcpServers": {
"xc-mcp": {
"command": "node",
"args": ["/path/to/xc-mcp/dist/index.js"]
}
}
}Migration Guide
For AI Agents
- Update tool calls to include
operationparameter for
consolidated routers - Adopt accessibility-first workflow:
- Call
accessibility-quality-checkbefore screenshot - Use
idb-ui-find-elementfor semantic element search - Fall back to
screenshotonly when accessibility data is
insufficient
- Call
- Replace removed tools:
simctl-privacy→ Manual permission configuration in Xcodesimctl-pbcopy→ Useidb-ui-input({ operation: 'text' })simctl-suggest→ Usesimctl-listwith explicit
filteringlist-cached-responses→ Remove from workflows
For CLAUDE.md Files
Replace project-specific CLAUDE.md instructions with template
from README.md:
## XC-MCP Integration
This project uses XC-MCP v2.0 for iOS development automation.
**Tool Count**: 28 tools (~1,980 tokens)
**Workflow**: Accessibility-first automation with screenshot
fallback
Key tools:
- `accessibility-quality-check` - Assess UI automation readiness
- `idb-ui-find-element` - Search elements by label/identifier
- `simctl-device` - Device lifecycle
(boot/shutdown/create/delete/erase/clone/rename)
- `simctl-app` - App management
(install/uninstall/launch/terminate)
- `rtfm` - On-demand tool documentationVerification
After updating, verify migration success:
- Check MCP server starts:
node dist/index.js(should not
error) - Verify tool count: Use
rtfm({})to list all 28 tools - Test consolidated router: Call
simctl-device({ operation: 'list' }) - Confirm accessibility tools available:
rtfm({ toolName: 'accessibility-quality-check' })
Known Issues
None at release time.
Future Roadmap
Potential enhancements for future releases:
- Session logging with artifact indexing for workflow
reconstruction - Video recording with scene markers and metadata
- Test result summaries with structured comparison
- Media library with semantic indexing
- Additional IDB UI automation patterns
See docs/LLM_OPTIMIZATION.md for comprehensive optimization
patterns under consideration.
Credits
Developed by Conor Luddy with Claude Code assistance.
Links
- Repository: https://github.com/conorluddy/xc-mcp
- Pull Request: #69
- npm Package: https://www.npmjs.com/package/xc-mcp
- Issues: https://github.com/conorluddy/xc-mcp/issues
EOF
cat /tmp/RELEASE_NOTES_v2.0.0.md
Create comprehensive v2.0.0 release notes