Perfetto
This is a Model Context Protocol (MCP) server that gets answers from your Perfetto Traces. It turns natural‑language prompts into focused Perfetto analyses.
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
Maintainer
Works with
Installation
Manual Installation
npx perfettoConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
Install via pip
Install the perfetto-mcp package with pip and run it as a module.
pip3 install perfetto-mcp
python3 -m perfetto_mcpAlternative: 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-mcpConfigure your MCP client manually
Add the server block to your claude_desktop_config.json or IDE MCP config. The server requires no API keys.
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.
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.
Perfetto Alternatives — Similar Monitoring & Observability Servers
Looking for alternatives to Perfetto? Here are other popular monitoring & observability servers you can use with Claude, Cursor, and VS Code.
Netdata
★ 78.9kReal-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection.
Kubeshark
★ 11.9keBPF-powered network observability for Kubernetes. Indexes L4/L7 traffic with full K8s context, decrypts TLS without keys. Queryable by AI agents via MCP and humans via dashboard.
Mission Control
★ 4.9kSelf-hosted AI agent orchestration platform: dispatch tasks, run multi-agent workflows, monitor spend, and govern operations from one mission control dashboard.
Grafana
★ 3.0kThis MCP server enables natural-language querying of Grafana logs by automatically detecting log sources and service labels. It provides read-only access to log data with intelligent caching for efficient repeat queries.
Sentrux
★ 2.4kReal-time architectural sensor that helps AI agents close the feedback loop, enabling recursive self-improvement of code quality. Pure Rust.
OpenInference
★ 986OpenTelemetry Instrumentation for AI Observability
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.
Set Up Perfetto in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.