Perfetto

v1.0.0Monitoring & Observabilitystable

This is a Model Context Protocol (MCP) server that gets answers from your Perfetto Traces. It turns natural‑language prompts into focused Perfetto analyses.

android-tracingmcpmodel-context-protocolperfetto
Share:
181
Stars
0
Downloads
0
Weekly
0/5

What is Perfetto?

Perfetto is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to this is a model context protocol (mcp) server that gets answers from your perfetto traces. it turns natural‑language prompts into focused perfetto analyses.

This is a Model Context Protocol (MCP) server that gets answers from your Perfetto Traces. It turns natural‑language prompts into focused Perfetto analyses.

This server falls under the Monitoring & Observability category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • This is a Model Context Protocol (MCP) server that gets answ

Use Cases

Convert Perfetto trace data into natural language insights.
Analyze performance bottlenecks without writing SQL.
Diagnose Android and system performance issues.
antarikshc

Maintainer

LicenseApache-2.0
Languagepython
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx perfetto

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Perfetto

Perfetto MCP Server turns natural language questions into focused analyses of Perfetto trace files, translating prompts into PerfettoSQL queries executed against the trace_processor_shell binary and returning structured results. It covers Android and system performance investigations including ANR detection, CPU profiling, jank frame analysis, memory leak detection, thread contention, and binder transaction profiling — all without requiring users to write SQL manually. It is built for Android engineers and performance teams who collect Perfetto traces and want AI-assisted root cause analysis directly in their development environment.

Prerequisites

  • Python 3.10+ and the uv package manager, or pip for direct install
  • Perfetto trace files (.perfetto-trace or .pb) collected from Android devices or Linux systems
  • The trace_processor_shell binary (downloaded automatically on first run, or set PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH for offline environments)
  • An MCP-compatible client such as Claude Desktop, Claude Code, Cursor, or VS Code
1

Install via pip

Install the perfetto-mcp package with pip and run it as a module.

pip3 install perfetto-mcp
python3 -m perfetto_mcp
2

Alternative: add to Claude Code directly

Use the Claude Code CLI to add the server to your user-level MCP configuration in one command.

claude mcp add perfetto-mcp --scope user -- uvx perfetto-mcp
3

Configure your MCP client manually

Add the server block to your claude_desktop_config.json or IDE MCP config. The server requires no API keys.

4

Optional: set trace processor binary path

In air-gapped or restricted environments, download trace_processor_shell manually and set PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH to its absolute path to bypass the auto-download.

5

Analyze a trace file

Provide the absolute path to a .perfetto-trace file and a process name in your prompt. The server will run the appropriate SQL queries and return human-readable analysis.

Perfetto Examples

Client configuration

Add to your claude_desktop_config.json. No API keys are required. Optionally set PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH for offline use.

{
  "mcpServers": {
    "perfetto-mcp": {
      "command": "uvx",
      "args": ["perfetto-mcp"],
      "env": {
        "PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH": "/usr/local/bin/trace_processor_shell"
      }
    }
  }
}

Prompts to try

Example prompts showing how to target specific trace files and processes for different performance investigations.

- "Analyze /traces/myapp.perfetto-trace for process com.example.app and find ANRs"
- "Find janky frames above 16.67ms in /traces/recording.pb for com.example.app and list the worst 20"
- "List main-thread hotspots longer than 50ms between 10s and 25s in my trace"
- "Find slice names containing 'Choreographer' in /traces/ui.perfetto-trace"
- "Detect memory leaks for the com.example.app process in this trace file"
- "Profile CPU utilization for com.example.app and identify the top consumers"

Troubleshooting Perfetto

trace_processor_shell download fails on first run

If auto-download is blocked by a firewall or proxy, download trace_processor_shell manually from https://get.perfetto.dev/trace_processor and set PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH to its absolute path in the MCP server env config.

Analysis returns no results for a known-good trace

Confirm you are using the absolute path to the trace file (not a relative path). The trace_path parameter must be an absolute filesystem path. Also verify the process_name matches exactly what appears in the trace — use find_slices with a partial name to discover the correct process identifier.

Server fails to start with import errors

Ensure Python 3.10+ is active in your environment. If using pip install, try 'pip3 install --upgrade perfetto-mcp' to get the latest version. If using uvx, run 'uvx perfetto-mcp --help' in a terminal to confirm the package resolves correctly.

Frequently Asked Questions about Perfetto

What is Perfetto?

Perfetto is a Model Context Protocol (MCP) server that 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 connects AI assistants to external tools and data sources through a standardized interface.

How do I install Perfetto?

Follow the installation instructions on the Perfetto GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Perfetto?

Perfetto works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Perfetto free to use?

Yes, Perfetto is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Monitoring & Observability MCP Servers

Explore all monitoring & observability servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "perfetto": { "command": "npx", "args": ["-y", "perfetto"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Perfetto?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides