Token导航 LogoToken导航TokenDH.com
Instruments MCP Server logo
开发工具stdio官方级别未说明来源级核验

Instruments MCP Server

MCP Server

instrumentsmcp

InstrumentsMCP是一个基于Xcode Instruments的MCP服务器,用于记录跟踪、自动化模拟器并返回结构化分析数据,供编码代理使用。

工具数

19

提示词数

0

GitHub Stars

10

资源数

0
性能分析TypeScriptClaudeClaudeCursorWindsurf

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

nemanjavlahovic

提供方

nemanjavlahovic

最后核验

2026/5/17 20:23

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx instrumentsmcp record --process MyApp

详细介绍

InstrumentsMCP

Profiler data for agents.

封装Xcode Instruments的MCP服务器。记录跟踪,自动化模拟器,并返回编码代理可以处理的结构化分析数据。

快速开始

要求: macOS、Xcode、Node.js>=20

添加到您的项目 .mcp.json:

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

或者直接运行: npx instrumentsmcp@latest

适用于Claude Code、Cursor、Windsurf和任何MCP客户端。

它做什么

让你的经纪人介绍一下。它记录跟踪,驱动模拟器,并返回结构化结果:

=== 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个工具,涵盖分析、UI自动化、模拟器控制和跟踪分析。 完整工具列表→

分析

  • 一次性profile_cpu, profile_swiftui, profile_memory, profile_hitches, profile_launch, profile_energy, profile_leaks, profile_network
  • 脚本化场景profile_scenario 在执行UI步骤(点击、滚动、键入、启动)时记录跟踪
  • 交互式start_profiling / stop_profiling 用于手动交互
  • 健康检查performance_audit 运行5个模板并组合结果
  • 任何模板profile_raw 在没有专用解析器的情况下处理模板

UI自动化

以编程方式驱动模拟器: ui_tap, ui_type, ui_swipe, ui_gesture, ui_snapshot, ui_long_press.技术支持: AXe CLI (brew tap cameroncooke/axe && brew install axe).

模拟器控制

启动/终止应用程序、打开深度链接、推送通知、截图、设置位置、切换黑暗模式。

分析

重新分析保存的痕迹,深入特定功能,跟踪基线回归,生成Markdown报告。

命令行接口命令模式

在没有MCP客户端的情况下记录终端的痕迹:

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

按Ctrl+C停止。将痕迹提供给您的代理人进行分析。

兼容性

  • Xcode Instruments(xctrace)15.x到26.x
  • 自动处理xctrace 26延迟录制模式
  • 设备标识符(booted、设备名称、UDID)自动解析

文档

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

将您的MCP客户端指向 dist/index.js.

许可证

麻省理工学院

目录标签

目录标签

性能分析TypeScriptClaude本地部署UI自动化模拟器控制跟踪分析Xcode工具

支持客户端

ClaudeCursorWindsurf

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

instrumentsmcp

工具数量(toolCount,工具数)

19

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP