← Back to directory
P

Perfetto MCP Server

Community
Turn natural language into powerful Perfetto trace analysis
Category
Dev Tools #74 of 438
Stars
★ 221 Popular
Transport
stdio (local process)
Runtime
Python 3.13+
Credentials
No credential needed
License
Apache-2.0
Last commit
⚠
Tools
12
63FMRS · C

A comprehensive Android performance-analysis MCP server that turns natural-language prompts into 12 specialized Perfetto tools covering ANR, CPU, frame performance, contention, Binder IPC, and memory analysis. Stdio transport only; requires Python 3.13+ and uv; community-maintained under Apache-2.0, not official.

Strongest · Documentation 15/20 Weakest · Reliability 8/20

Reliability
8/20
Security and permissions
14/20
Maintenance
12/20
Documentation
15/20
Setup experience
14/20
Why each score
Reliability 8/20
The README lists 12 tools (find_slices, execute_sql_query, detect_anrs, etc.) and describes an output format (Summary/Details/Metadata), but the repository provides no verifiable CI workflow or committed tests demonstrating the MCP init + tool-list handshake, error handling, or that declared tools match real behavior. With no source code, tests, or CI evidence supplied, judgment rests solely on self-reported README claims, and per the static calibration rule this caps the score low. The happy path is plausible on paper but unproven, and edge cases (trace_processor download failures, malformed SQL, missing trace files) are undocumented.
Security and permissions 14/20
The server performs local, read-only analysis of user-supplied Perfetto trace files via SQL queries; there are no visible irreversible destructive defaults (delete/pay/deploy) and no hardcoded credentials or overt exfiltration in the README. One external network behavior exists: by default the underlying Perfetto Python library may download a trace_processor_shell binary, and the project mitigates this by offering PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH to point to a local binary in restricted networks — a reasonable, documented mitigation. However, the README does not clearly disclose whether any trace data (which may contain sensitive app internals) ever leaves the local machine, nor does it define explicit permission/data-flow boundaries, so it falls short of full marks.
Maintenance 12/20
The project carries an Apache-2.0 license, is not archived, and shows 214 stars with only 5 open issues, suggesting some baseline activity. However, the provided material contains no evidence of commit cadence, release/version history, a changelog, dependency-update practices, or a security-response channel, and no CI badge or release notes are visible. This limits the score to a middling value reflecting apparent-but-unverified activity rather than clearly governed, sustained maintenance.
Documentation 15/20
The README is well organized: prerequisites (Python 3.13+, uv), detailed setup snippets for four mainstream clients (Cursor, Claude Code, VS Code, Codex), fallback install paths (pip, local dev via uv), a categorized tool table with purpose and example prompts, an optional env-var override, and links to external Perfetto docs — solid layered documentation. It falls short of full marks because detailed parameter schemas are missing (only two required params are documented; optional filters are described loosely), and there is no troubleshooting section, no explicit limits, and no cost disclosure.
Setup experience 14/20
The README provides concrete one-click install links and JSON config examples for major clients (Cursor, Claude Code, VS Code, Codex) plus pip and local-dev (uv sync + uv run) fallbacks, keeping the process low-friction. However, since this is a purely static review with no CI workflow or committed tests to confirm these install paths actually work end-to-end, the calibration rule caps setup at 15; the score reflects a clear, well-documented process short of verified execution proof.

Static review · not runListed 2026-09-07

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesRuns commands or code

Best for

  • Android developers analyzing Perfetto traces
  • Engineers who want jank, ANR, contention, and memory analysis without writing SQL
  • Clients supporting stdio MCP such as Cursor, Claude Code, VS Code, and Codex

Not for

  • Users who do not analyze Perfetto traces
  • Scenarios where an absolute trace_path and process_name cannot be provided
  • Environments that cannot run Python MCP servers via uvx or pip

Required permissions

  • Needs read access to local Perfetto trace files (absolute path passed as trace_path)
  • May download trace_processor_shell on first run (or use a local binary via PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH)

Risks and side effects

  • Traces contain application and system runtime details; sharing them may expose sensitive information
  • Default behavior may download an external binary; restricted networks should configure a local path
  • Queries are generated by an LLM and results should be verified

Setup

Before you start

Runtime:Python 3.13+

Other optional settings (1)
PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH optional Optional absolute path to a local trace_processor_shell binary; set only if your network blocks downloads, otherwise leave unset.

Requires Python 3.13+ and uv (on macOS: brew install [email protected], brew install uv). Add the MCP server to Cursor, Claude Code, VS Code, or Codex with command 'uvx perfetto-mcp'. Alternatively pip3 install perfetto-mcp and run python3 -m perfetto_mcp. If your network blocks downloads, set PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH to the absolute path of a local trace_processor_shell binary. For development, run uv sync and uv run mcp dev src/perfetto_mcp/dev.py inside the perfetto-mcp-server directory.

.cursor/mcp.json
{"mcpServers":{"perfetto-mcp":{"command":"uvx","args":["perfetto-mcp"]}}}

Shown for Cursor. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "perfetto-mcp": {
      "command": "uvx",
      "args": [
        "perfetto-mcp"
      ]
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add perfetto-mcp -- uvx perfetto-mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After install, confirm tools like find_slices and detect_anrs appear in your client's tool list; then ask "Use perfetto trace /path/to/trace.perfetto-trace for process com.example.app to detect ANRs" and a structured JSON answer proves the connection works.

Troubleshooting

  1. Verify trace_path is an absolute path to a .perfetto-trace file
  2. Confirm process_name matches the process in the trace (e.g. com.example.app)
  3. If trace_processor_shell download fails, set PERFETTO_MCP_TRACE_PROCESSOR_BIN_PATH to a local binary
  4. Ensure Python 3.13+ and uv are installed
  5. Be explicit in prompts, e.g. 'Use perfetto trace /absolute/path for process com.example.app'

Things to try

Once connected, you can ask your AI assistant things like:

  • Use perfetto trace /absolute/path/to/trace.perfetto-trace for process com.example.app and detect ANRs with severity summary
  • List main-thread hotspot slices >50 ms during 10s–25s
  • Find janky frames above 16.67 ms and list the worst 20
  • Analyze heap dominator classes and list top memory offenders

Tools 12

find_slices read-only
Survey slice names and locate hot paths
execute_sql_query read-only
Run custom PerfettoSQL for advanced analysis
detect_anrs read-only
Find ANR events with severity classification
anr_root_cause_analyzer read-only
Deep-dive ANR causes with ranked likelihood
cpu_utilization_profiler read-only
Profile thread-level CPU usage and scheduling
main_thread_hotspot_slices read-only
Find longest-running main thread operations
detect_jank_frames read-only
Identify frames missing deadlines
frame_performance_summary read-only
Summarize overall frame health metrics
Show 4 more tools
thread_contention_analyzer read-only
Find synchronization bottlenecks
binder_transaction_profiler read-only
Analyze Binder IPC performance
memory_leak_detector read-only
Find sustained memory growth patterns
heap_dominator_tree_analyzer read-only
Identify memory-hogging classes

Use cases

Explain why FragmentManager takes 438ms to execute
Detect and analyze ANR root causes
Find CPU hot threads and main-thread hotspot slices
Detect janky frames above 16.67ms and summarize frame performance
Locate lock contention and slow Binder transactions
Detect memory-leak signals and analyze heap dominator classes

Supported clients

Cursor
Claude Code
VS Code
Codex

Listed from the project's documentation, not tested by this site.

Overview

Perfetto MCP Server is a Model Context Protocol (MCP) server that transforms natural-language prompts into focused Perfetto analyses. It explains jank, diagnoses ANRs, spots CPU hot threads, uncovers lock contention, and finds memory leaks without writing SQL. Every tool requires trace_path (absolute path to a Perfetto trace) and process_name (target process/app name). All tools return structured JSON with summary, details, and metadata.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 63.3k · Tools 2 Compare with this →

Source revision 174d14570b62 Data synced 2026-10-19 Read the FMRS scoring method