find_slicesLABSCO 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
USE CASES
Explaining why a screen stutters
Find the frames that missed their deadline, then read the main-thread hotspots in the same window to see what was holding the thread.
Working out what caused an ANR
Detect the ANR events first, then run the root-cause analyser around that timestamp and read the ranked causes.
Tracking down a synchronisation problem
Look for lock contention over the suspect interval, and check whether slow Binder transactions to another process explain the waits.
Chasing memory that never comes back
Look for sustained growth over the trace, then read the heap dominator classes to see what is holding it.
Answering a question nothing covers
Survey the slice names to find the right anchor, then write the PerfettoSQL yourself and run it in place.
12 tools
Listed in project docs. Your client may show a different list.
execute_sql_querydetect_anrsanr_root_cause_analyzercpu_utilization_profilermain_thread_hotspot_slicesdetect_jank_framesframe_performance_summarythread_contention_analyzerbinder_transaction_profilermemory_leak_detectorheap_dominator_tree_analyzerBEFORE YOU INSTALL
What to know first
Tools you get
12 tools named in the project's documentation.
Requires
- uvx on PATH
- Python 3.13+
Where it runs
All 4 documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
uvx perfetto-mcpMCP Clients
Cursor, Claude Code
{
"mcpServers": {
"perfetto-mcp": {
"command": "uvx",
"args": [
"perfetto-mcp"
]
}
}
}VS Code
{
"servers": {
"perfetto-mcp": {
"command": "uvx",
"args": [
"perfetto-mcp"
]
}
}
}Codex
[mcp_servers.perfetto-mcp]
command = "uvx"
args = ["perfetto-mcp"]