Perfetto

by antarikshc

Not rated
GitHub

About

Turn natural language into powerful Perfetto trace analysis. Quickly explain jank, diagnose ANRs, spot CPU hot threads, uncover lock contention, and find memory leaks.

Details

Author
antarikshc
Categories
Developer Tools, Other, Infrastructure

Setup

Install Perfetto in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/antarikshc/perfetto-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

Turn natural language into powerful Perfetto trace analysis

A Model Context Protocol (MCP) server that transforms natural-language prompts into focused Perfetto analyses. Quickly explain jank, diagnose ANRs, spot CPU hot threads, uncover lock contention, and find memory leaks – all without writing SQL.

- Natural Language → SQL: Ask questions in plain English, get precise Perfetto queries
- ANR Detection: Automatically identify and analyze Application Not Responding events
- Performance Analysis: CPU profiling, frame jank detection, memory leak detection
- Thread Contention: Find synchronization bottlenecks and lock contention
- Binder Profiling: Analyze IPC performance and slow system interactions

- Python 3.13+(macOS/Homebrew):

brew install python@3.13

Or add to~/.cursor/mcp.json(global) or.cursor/mcp.json(project):

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

Run this command. SeeClaude Code MCP docsfor more info.

# Add to user scope claude mcp add perfetto-mcp --scope user -- uvx perfetto-mcp

Or edit~/claude.json(macOS) or%APPDATA%\Claude\claude.json(Windows):

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

or add to.vscode/mcp.json(project) or run "MCP: Add Server" command:

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

Enable in GitHub Copilot Chat's Agent mode.

[mcp_servers.perfetto-mcp] command = "uvx" args = ["perfetto-mcp"]

Optional: Use a Localtrace_processor_shellBinary

If your network environment blocks downloads, setPERFETTO_MCP_TRACE_PROCESSOR_BIN_PATHto an absolute path of a localtrace_processor_shellbinary.

When this env var is set,perfetto-mcpuses that binary directly. When it is not set, defaultperfettoPython behavior is unchanged.

{ "mcpServers": { "perfetto-mcp": { "command": "uvx", "args": ["perfetto-mcp"], "env": { "PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH": "D:/tools/perfetto/trace_processor_shell.exe" } } } }
[mcp_servers.perfetto-mcp] command = "uvx" args = ["perfetto-mcp"] [mcp_servers.perfetto-mcp.env] PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH = "D:/tools/perfetto/trace_processor_shell.exe"
cd perfetto-mcp-server uv sync uv run mcp dev src/perfetto_mcp/dev.py
{ "mcpServers": { "perfetto-mcp-local": { "command": "uv", "args": [ "--directory", "/path/to/git/repo/perfetto-mcp", "run", "-m", "perfetto_mcp" ], "env": { "PYTHONPATH": "src" } } } }
pip3 install perfetto-mcp python3 -m perfetto_mcp

In the perfetto trace, I see that the FragmentManager is taking 438ms to execute. Can you figure out why it's taking so long?

Be explicit about the trace and process, prefix your prompt with:

"Use perfetto trace/absolute/path/to/trace.perfetto-tracefor processcom.example.app"

Many tools support additional filtering (but let your LLM handle that):

- time_range:{start_ms: 10000, end_ms: 25000}
- Tool-specific thresholds:min_block_ms,jank_threshold_ms,limit

Note: Helpful if the recorded trace contains ANR

- Summary: High-level findings
- Details: Tool-specific results
- Metadata: Execution context and any fallbacks used

- Trace Processor Python API- Perfetto's Python interface
-
Perfetto SQL Syntax- SQL reference for custom queries

Apache 2.0 License. SeeLICENSEfor details.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

AI-powered live runtime debugging with Lightrun production context.

Analyze your MCP setup: measure token cost per tool, find bloated schemas, detect duplicates, and get optimization tips to reclaim your context window.

MCP server for .NET runtime diagnostics — memory, GC, threads, and more.

MCP server for .NET runtime diagnostics — memory, GC, threads, and more.

JVM diagnostics MCP server for thread dump and GC log analysis. Detects deadlocks, lock contention, and GC pressure. Runs via npx on Node.js — no JVM or Docker required.

Reticle intercepts, visualizes, and profiles JSON-RPC traffic between your LLM and MCP servers in real-time, with zero latency overhead. Stop debugging blind. Start seeing everything.

Drives an Android emulator or a real device over adb: screenshots, UI hierarchy with true device-pixel coordinates, tap and type, app lifecycle, logcat, and Gradle builds and tests.

Interact with Android devices using the Android Debug Bridge (ADB).

Control Android devices via the Android Debug Bridge (ADB).

An agentic toolkit to control, debug, and profile iOS and Android apps.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.