Labsco
MCP SERVER

Perfetto

by antarikshc

Analyse an Android Perfetto trace by describing what you want to know, instead of writing PerfettoSQL.

Runtime Debugging & Crash Analysis
Summary
Trace analysis without the SQL, and an escape hatch when you need it anyway.

The named analyses are the reason to install it - jank, ANR and contention are asked so often that having them as one call beats writing the query each time. The raw SQL tool is what keeps it from being a dead end: when the ready-made view does not cover the question, you are still inside the trace rather than back at square one.

What it is

A server over Perfetto's trace processor. It turns a question about a trace into the SQL that answers it, and ships purpose-built analyses for the failure modes Android engineers actually chase - jank, ANRs, lock contention, Binder latency and memory growth.

What you get
  • Survey the slice names in a trace to find the hot paths, or run your own PerfettoSQL when the ready-made analyses stop short
  • ANR detection with severity classification, and a root-cause analyser that ranks likely causes around a point in time
  • CPU profiling by thread, and the longest-running main-thread operations
  • Frames that missed their deadline, plus an overall frame-health summary
  • Lock contention between threads, and slow Binder transactions grouped by the process serving them
  • Sustained memory-growth signals, and a heap dominator view naming the classes holding the most
  • Structured JSON on every call: a summary, the tool-specific detail, and the execution context
Requirements

Python 3.13+ and uv, then uvx perfetto-mcp. Every tool takes two things: the absolute path to the trace and the process name to focus on, so say both in the prompt. Optional filters narrow to a time range or a threshold. If your network blocks the download of Perfetto's trace processor, point PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH at a local copy of the binary.

Setup effort

One command — uvx perfetto-mcp