AgentStack
MCP verified MIT Self-run

Instruments Mcp Server

mcp-nemanjavlahovic-instruments-mcp-server · by nemanjavlahovic

MCP server for Xcode Instruments — AI agents get structured performance profiling (CPU, SwiftUI, memory, hitches) instead of raw xctrace XML

No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add mcp-nemanjavlahovic-instruments-mcp-server

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README — it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-nemanjavlahovic-instruments-mcp-server)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming — see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps — measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Instruments Mcp Server? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

InstrumentsMCP

Profiler data for agents.

MCP server that wraps Xcode Instruments. Record traces, automate the simulator, and return structured profiling data your coding agent can act on.

Quick Start

Requirements: macOS, Xcode, Node.js >= 20

Add to your project's .mcp.json:

{
  "mcpServers": {
    "instruments": {
      "command": "npx",
      "args": ["-y", "instrumentsmcp@latest"]
    }
  }
}

Or run directly: npx instrumentsmcp@latest

Works with Claude Code, Cursor, Windsurf, and any MCP client.

What It Does

Ask your agent to profile. It records a trace, drives the simulator, and returns structured results:

=== Time Profiler ===  severity: [WARNING]  samples: 1587

Hotspots:
  UpdateStack::update() (AttributeGraph)  42.3ms self ━━━━━━╌╌╌╌╌╌╌╌╌ 12.1%
  FeedViewModel.loadItems() (MyApp)        28.1ms self ━━━━╌╌╌╌╌╌╌╌╌╌╌ 8.0%

Main thread blockers:
  [WARNING] FeedViewModel.loadItems()  28.1ms

35 tools across profiling, UI automation, simulator control, and trace analysis. [Full tool list →](docs/tools.md)

Profiling

  • One-shotprofile_cpu, profile_swiftui, profile_memory, profile_hitches, profile_launch, profile_energy, profile_leaks, profile_network
  • Scripted scenariosprofile_scenario records a trace while executing UI steps (tap, scroll, type, launch)
  • Interactivestart_profiling / stop_profiling for manual interaction
  • Health checkperformance_audit runs 5 templates and combines the results
  • Any templateprofile_raw handles templates without a dedicated parser

UI Automation

Drive the simulator programmatically: ui_tap, ui_type, ui_swipe, ui_gesture, ui_snapshot, ui_long_press. Powered by AXe CLI (brew tap cameroncooke/axe && brew install axe).

Simulator Control

Launch/terminate apps, open deep links, push notifications, take screenshots, set location, toggle dark mode.

Analysis

Re-analyze saved traces, drill into specific functions, track regressions with baselines, generate Markdown reports.

CLI Mode

Record traces from the terminal without an MCP client:

npx instrumentsmcp record --process MyApp
npx instrumentsmcp record --process MyApp --template Allocations

Ctrl+C to stop. Feed the trace to your agent for analysis.

Compatibility

  • Xcode Instruments (xctrace) 15.x through 26.x
  • Handles xctrace 26 Deferred recording mode automatically
  • Device identifiers (booted, device name, UDID) resolved automatically

Docs

  • [Full tool reference](docs/tools.md)
  • [Example output](docs/example-output.md)
  • [Prepare your app for AI-driven profiling](docs/prepare-your-app.md)

Architecture

src/
├── index.ts              # MCP server entry + CLI router
├── cli.ts                # CLI mode (instrumentsmcp record)
├── tools/
│   ├── profile.ts        # One-shot profiling tools
│   ├── simulator.ts      # Simulator control + start/stop + scenarios
│   ├── analyze.ts        # Trace analysis + symbolication + audit
│   ├── baseline.ts       # Baseline comparison + report generation
│   ├── investigate.ts    # Drill-down + trace listing
│   ├── ui.ts             # UI automation (snapshot, tap, type, swipe)
│   └── list.ts           # Discovery tools (status, templates, devices)
├── parsers/              # Template-specific XML→JSON parsers
└── utils/                # xctrace, simctl, AXe wrappers + shared helpers

Build from source

git clone https://github.com/nemanjavlahovic/instruments-mcp-server.git
cd instruments-mcp-server
npm install && npm run build

Point your MCP client to dist/index.js.

License

MIT

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.