by antarikshc
This is a Model Context Protocol (MCP) server that gets answers from your Perfetto Traces. It turns natural‑language prompts into focused Perfetto analyses.
# Add to your Claude Code skills
git clone https://github.com/antarikshc/perfetto-mcpGuides for using mcp servers skills like perfetto-mcp.
perfetto-mcp is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by antarikshc. This is a Model Context Protocol (MCP) server that gets answers from your Perfetto Traces. It turns natural‑language prompts into focused Perfetto analyses. It has 223 GitHub stars.
perfetto-mcp's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/antarikshc/perfetto-mcp" and add it to your Claude Code skills directory (see the Installation section above).
perfetto-mcp is primarily written in Python. It is open-source under antarikshc on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh perfetto-mcp against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.

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.

brew install [email protected]
brew install uv
Or add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):
{
"mcpServers": {
"perfetto-mcp": {
"command": "uvx",
"args": ["perfetto-mcp"]
}
}
}
Run this command. See Claude Code MCP docs for 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.
Edit ~/.codex/config.toml:
[mcp_servers.perfetto-mcp]
command = "uvx"
args = ["perfetto-mcp"]
trace_processor_shell BinaryIf your network environment blocks downloads, set
PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH to an absolute path of a local
trace_processor_shell binary.
When this env var is set, perfetto-mcp uses that binary directly.
When it is not set, default perfetto Python behavior is unchanged.
Example (mcp.json):
{
"mcpServers": {
"perfetto-mcp": {
"command": "uvx",
"args": ["perfetto-mcp"],
"env": {
"PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH": "D:/tools/perfetto/trace_processor_shell.exe"
}
}
}
}
Example (~/.codex/config.toml):
[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
Example starting prompt:
In the perfetto trace, I see that the FragmentManager is taking 438ms to execute. Can you figure out why it's taking so long?
Every tool needs these two inputs:
| Parameter | Description | Example |
|---|---|---|
| trace_path | Absolute path to your Perfetto trace | /path/to/trace.perfetto-trace |
| process_name | Target process/app name | com.example.app |
Be explicit about the trace and process, prefix your prompt with:
"Use perfetto trace /absolute/path/to/trace.perfetto-trace for process com.example.app"
Many tools support additional filtering (but let your LLM handle that):
{start_ms: 10000, end_ms: 25000}min_block_ms, jank_threshold_ms, limit| Tool | Purpose | Example Prompt |
|---|---|---|
find_slices |
Survey slice names and locate hot paths | "Find slice names containing 'Choreographer' and show top examples" |
execute_sql_query |
Run custom PerfettoSQL for advanced analysis | "Run custom SQL to correlate threads and frames in the first 30s" |
Note: Helpful if the recorded trace contains ANR
| Tool | Purpose | Example Prompt |
|---|---|---|
detect_anrs |
Find ANR events with severity classification | "Detect ANRs in the first 10s and summarize severity" |
anr_root_cause_analyzer |
Deep-dive ANR causes with ranked likelihood | "Analyze ANR root cause around 20,000 ms and rank likely causes" |
| Tool | Purpose | Example Prompt |
|---|---|---|
cpu_utilization_profiler |
Thread-level CPU usage and scheduling | "Profile CPU usage by thread and flag the hottest threads" |
main_thread_hotspot_slices |
Find longest-running main thread operations | "List main-thread hotspots >50 ms during 10s–25s" |
| Tool | Purpose | Example Prompt |
|---|---|---|
detect_jank_frames |
Identify frames missing deadlines | "Find janky frames above 16.67 ms and list the worst 20" |
frame_performance_summary |
Overall frame health metrics | "Summarize frame performance and report jank rate and P99 CPU time" |
| Tool | Purpose | Example Prompt |
|---|---|---|
thread_contention_analyzer |
Find synchronization bottlenecks | "Find lock contention between 15s–30s and show worst waits" |
binder_transaction_profiler |
Analyze Binder IPC performance | "Profile slow Binder transactions and group by server process" |
| Tool | Purpose | Example Prompt |
|---|---|---|
memory_leak_detector |
Find sustained memory growth patterns | "Detect memory-leak signals over the last 60s" |
heap_dominator_tree_analyzer |
Identify memory-hogging classes | "Analyze heap dominator classes and list top offenders" |
All tools return structured JSON with:
Apache 2.0 License. See LICENSE for details.