perfetto-mcp

Perfetto MCP Server

perfetto-mcp turns natural-language questions into Perfetto trace analysis for developers investigating Android performance. It covers ANRs, frame jank, CPU activity, thread contention, Binder delays, and memory growth, with custom SQL available.

Server facts

perfetto-mcp

Project

License
Not specified

Tech

Runtime / language
Not specified
Transports
stdio
Remote available
No
Authentication
Not specified

Activity

GitHub stars
221
Last commit
Data as of

Tags

  • android performance
  • anr detection
  • binder profiler
  • jank frame detection
  • memory profiler
  • perfetto
  • perfetto analysis

Overview

Android freezes, uneven rendering, and growing memory use are the focus of perfetto-mcp’s trace-analysis workflow. Developers can ask questions in natural language, explore recorded slice names with find_slices, and inspect lengthy UI-thread operations with main_thread_hotspot_slices. Frame summaries provide an overview before individual janky frames are examined, while CPU profiling identifies busy threads and their scheduling activity. For unresponsive applications, detect_anrs locates recorded events and assesses severity; anr_root_cause_analyzer then correlates blocking, Binder activity, memory pressure, and contention to rank possible explanations.

Further investigation can follow synchronization waits through thread_contention_analyzer or compare client latency with server processing through binder_transaction_profiler. Memory tools examine sustained growth and classes retaining heap memory, with heap dominator analysis offering a closer look at the recorded snapshot. Findings depend on trace coverage: ANR detection needs the relevant data source, heap analysis needs heap graphs, and contention analysis can use scheduler-based inference when direct monitor data is absent. Custom PerfettoSQL supports investigations beyond the predefined tools. Results are structured as JSON containing findings, tool-specific details, and context about execution or fallbacks.

perfetto-mcp setup notes

  • perfetto-mcp records stdio only; confirm a network transport upstream before planning remote access.
  • perfetto-mcp has no recorded license; confirm reuse terms in its repository.

Related MCP servers