ios-instruments-mcp
Provides tools to profile iOS apps using Instruments (xctrace), including analyzing app launch, memory allocations, leaks, CPU time profiling, and network requests.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ios-instruments-mcp Check launch time of com.myapp.ios"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ios-instruments-mcp
MCP server that wraps xctrace (Instruments) to profile iOS apps directly from Claude. Ask natural language questions about your app's performance and get actionable answers.
What you can ask Claude
"Faz o launch timer do com.myapp.ios e diz-me os ofensores"
"Analisa o memory footprint do app no simulador"
"Verifica se há leaks de memória no com.myapp.ios"
"Qual função está a consumir mais CPU?"
"Há requests de rede lentos no app?"
"Analisa o trace em ~/Desktop/launch.xctrace"Related MCP server: XcodeTraceMCP
Requirements
macOS with Xcode installed
Xcode Command Line Tools:
xcode-select --installNode.js ≥ 18
Setup
# 1. Clone and install
git clone https://github.com/bfernandesbfs/ios-instruments-mcp.git
cd ios-instruments-mcp
npm install
npm run build
# 2. Register in Claude DesktopAdd to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"ios-instruments": {
"command": "node",
"args": ["/absolute/path/to/ios-instruments-mcp/build/index.js"]
}
}
}Restart Claude Desktop after saving.
Available Tools
Tool | Template | Description |
| — | Lists simulators and physical devices |
| — | Lists all Instruments templates on this Mac |
| App Launch | Records + analyzes app startup time |
| App Launch | Analyzes an existing |
| Allocations | Peak memory, top allocation types |
| Allocations | Analyzes an existing |
| Leaks | Memory leak detection with retain cycle info |
| Leaks | Analyzes an existing |
| Time Profiler | CPU hot methods and main thread usage |
| Time Profiler | Analyzes an existing |
| Network | Slow requests, transfer sizes, status codes |
| Network | Analyzes an existing |
Example output (App Launch)
# App Launch Analysis — com.myapp.ios
⚠️ Launch time 1240ms — above 400ms. Users may notice the delay.
**Total:** 1240ms
## Phases
- pre-main (dyld + static init): 434ms (35%)
- post-main (AppDelegate + UI): 806ms (65%)
## Top Offenders
🔴 `-[DatabaseManager setup]` [post-main]
Self: 540ms | Total: 540ms | 43%
💡 Move database initialization to a background queue or use lazy loading.
🟡 `+[AnalyticsSDK configure:]` [post-main]
Self: 210ms | Total: 210ms | 17%
💡 Defer analytics SDK initialization after first frame is rendered.
## Recommendations
- Fix 1 critical offender(s) — each adds 300ms+ to launch.
- Target: total launch under 400ms.Notes
Physical devices require Enable UI Automation in Settings → Developer
Temp
.xctracefiles are cleaned up automatically after each runThe parser handles both legacy and modern
xctraceXML formatsAll tools have an
_tracevariant for analyzing files you already have on disk
License
MIT
Available Tools
12 toolsanalyze_allocationsB
Record an Allocations trace and report peak memory, top allocation types, and fix suggestions.
Inputs: bundle_id (required), device_id (required), time_limit_seconds.
analyze_allocations_traceB
Analyze an existing .xctrace file recorded with the Allocations template.
Inputs: trace_path (required), bundle_id.
analyze_launchB
Record an App Launch trace and report which methods hurt startup time with fix suggestions.
Inputs: bundle_id (required), device_id (required), time_limit_seconds.
analyze_launch_traceB
Analyze an existing .xctrace file recorded with the App Launch template.
Inputs: trace_path (required), bundle_id.
analyze_leaksB
Record a Leaks trace and report all memory leaks with retain cycle detection and fix suggestions.
Inputs: bundle_id (required), device_id (required), time_limit_seconds.
analyze_leaks_traceB
Analyze an existing .xctrace file recorded with the Leaks template.
Inputs: trace_path (required), bundle_id.
analyze_networkB
Record a Network trace and report slow requests, transfer sizes, and optimization suggestions.
Inputs: bundle_id (required), device_id (required), time_limit_seconds.
analyze_network_traceC
Analyze an existing .xctrace file recorded with the Network template.
Inputs: trace_path (required), bundle_id.
analyze_time_profilerC
Record a Time Profiler trace and report hot methods consuming the most CPU time.
Inputs: bundle_id (required), device_id (required), time_limit_seconds.
analyze_time_profiler_traceC
Analyze an existing .xctrace file recorded with the Time Profiler template.
Inputs: trace_path (required), bundle_id.
list_devicesB
List available iOS simulators and physical devices.
Inputs: no named parameters.
list_templatesA
List all Instruments profiling templates installed on this Mac.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool has a clearly distinct purpose. The pairing of 'record+analyze' vs 'analyze existing trace' for each profiling type is unambiguous, and the helper tools are unique.
All tools use consistent snake_case with a verb_noun pattern. The base verb 'analyze' for recording+analyzing and the suffix '_trace' for analyzing existing traces forms a clear and predictable convention.
With 12 tools covering major profiling templates (allocations, launch, leaks, network, time profiler) plus device and template listing, the count is well-scoped for the domain.
The set provides recording and post-analysis for all major instrument types, plus necessary discovery tools. No obvious gaps for typical profiling workflows.
Related MCP Connectors
Cloud iPhone Simulators for AI agents: build the Xcode project, read the screen, tap by label, test.
Cloud iPhones and Macs with Xcode for AI agents: build, run and test iOS apps, use the screen.
Investigate iOS and Android crashes and failed UI tests from your coding agent.
Ship a new iOS app from chat. AI runs App Store Connect, builds, release, and submission through Ap…
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables interaction with iOS simulators by providing tools to inspect UI elements, control UI interactions, and manage simulators through natural language commands.177,085 npm2,237MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to record, analyze, and compare Xcode Instruments traces, detect performance bottlenecks and regressions, and provide optimization recommendations.44MIT
- AlicenseNot gradedqualityDmaintenanceLocal-first CLI and MCP server for turning Xcode Instruments artifacts into bounded, agent-sized evidence, with support for analyses like Time Profiler, Allocations, Network, and more.2MIT
- AlicenseAqualityCmaintenanceEnables AI agents to profile iOS/macOS apps using Xcode Instruments, automate simulator interactions, and get structured performance data for optimization.3729 npm20MIT