MCP Catalogs
首页perfetto-mcp screenshot

perfetto-mcp

by antarikshc·178·综合分 50

一个将自然语言提示转换为 Perfetto 跟踪分析的 MCP 服务器,用于 Android 性能调试。

developer-toolsmonitoringops-infra
26
Forks
4
活跃 Issue
1 个月前
最近提交
2 天前
收录于

概述

Perfetto MCP 是一个专用的 MCP 服务器,允许开发者使用自然语言提示分析 Android 性能跟踪。它将普通英文问题转换为精确的 Perfetto SQL 查询,使用户能够诊断 ANR、查找 CPU 瓶颈、检测 UI 卡顿、分析内存泄漏和调查 binder 事务,而无需编写 SQL。该服务器支持多种 MCP 集成,包括 Cursor、Claude Code、VS Code 和 Codex,并提供 uvx 和 pip 安装选项。

试试问 AI

装完之后,这里有 6 个你可以让 AI 做的事:

:使用自然语言诊断 Android 跟踪中的应用性能问题
:自动分析 ANR 事件并识别根本原因
:分析 CPU 使用情况和帧性能,无需编写 SQL
:Perfetto MCP 支持什么文件格式?
:我可以使用本地的 trace_processor_shell 二进制文件吗?
:我可以执行哪些类型的性能分析?

什么时候选它

当你需要使用自然语言查询分析 Android 性能追踪数据,且不想手动编写复杂的 Perfetto SQL 时,选择此服务器。

什么时候不要选它

如果你使用非 Android 性能追踪数据,或需要超出 Perfetto 范围的更通用追踪分析功能,请不要选择此服务器。

此 server 暴露的工具

从 README 抽取出 12 个工具
  • find_slices

    Survey slice names and locate hot paths

  • execute_sql_query

    Run custom PerfettoSQL for advanced analysis

  • detect_anrs

    Find ANR events with severity classification

  • anr_root_cause_analyzer

    Deep-dive ANR causes with ranked likelihood

  • cpu_utilization_profiler

    Thread-level CPU usage and scheduling

  • main_thread_hotspot_slices

    Find longest-running main thread operations

  • detect_jank_frames

    Identify frames missing deadlines

  • frame_performance_summary

    Overall frame health metrics

  • thread_contention_analyzer

    Find synchronization bottlenecks

  • binder_transaction_profiler

    Analyze Binder IPC performance

  • memory_leak_detector

    Find sustained memory growth patterns

  • heap_dominator_tree_analyzer

    Identify memory-hogging classes

可对比工具

android-studio-perfettotrace-processor-cliperfetto-web-ui

安装

安装

**使用 uvx(推荐)**:

对于 Cursor:

{
  "mcpServers": {
    "perfetto-mcp": {
      "command": "uvx",
      "args": ["perfetto-mcp"]
    }
  }
}

对于 Claude Code:

claude mcp add perfetto-mcp --scope user -- uvx perfetto-mcp

对于 VS Code: 添加到 .vscode/mcp.json

{
  "mcpServers": {
    "perfetto-mcp": {
      "command": "uvx",
      "args": ["perfetto-mcp"]
    }
  }
}

**使用 pip**:

pip3 install perfetto-mcp
python3 -m perfetto_mcp

**先决条件**:

  • Python 3.13+
  • uv(推荐)

FAQ

Perfetto MCP 支持什么文件格式?
Perfetto MCP 支持 Perfetto 跟踪文件(.perfetto-trace 格式)。
我可以使用本地的 trace_processor_shell 二进制文件吗?
是的,设置 PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH 环境变量指向您的本地二进制文件路径。
我可以执行哪些类型的性能分析?
您可以使用自然语言提示分析 ANR、CPU 使用情况、帧卡顿、内存泄漏、线程争用、binder 事务等性能问题。

perfetto-mcp 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。