vola-trebla avatar

V8 Cpu Profile Decoder Mcp

vola-trebla/v8-cpu-profile-decoder-mcp

Turns V8 CPU profiles into token-efficient summaries your AI agent can actually read. Instead of choking on a 20MB .cpuprofile file, you get ranked hotspot lists, caller trees, source map resolution back to TypeScript, GC pressure analysis, before/after diffs, and async bottleneck detection. Six tools total: extract_hottest_functions pulls the top N offenders by self time, analyze_call_tree_path shows what's invoking your slow function, correlate_source_code maps compiled JS back to original .ts files, analyze_gc_pressure flags garbage collection overhead, diff_profiles compares two runs, and analyze_async_bottlenecks surfaces event loop saturation. Point it at a .cpuprofile from node --cpu-prof and ask which function is burning CPU or why your API is slow under load.

tools
6
transport
STDIO
last updated
May 19, 2026

Tools

6 tools

Public tool metadata for what this MCP can expose to an agent.

extract_hottest_functionsParses the .cpuprofile and returns the top N functions ranked by exclusive CPU time (self time).

Parses the .cpuprofile and returns the top N functions ranked by exclusive CPU time (self time).

No parameter schema in public metadata yet.

analyze_call_tree_pathFinds all callers of a specific function and shows how often each one invoked it.

Finds all callers of a specific function and shows how often each one invoked it.

No parameter schema in public metadata yet.

correlate_source_codeMaps compiled JS bottlenecks back to their original TypeScript source locations using .js.map files.

Maps compiled JS bottlenecks back to their original TypeScript source locations using .js.map files.

No parameter schema in public metadata yet.

analyze_gc_pressureReports garbage collection overhead as a percentage of profiling duration, broken down by GC type.

Reports garbage collection overhead as a percentage of profiling duration, broken down by GC type.

No parameter schema in public metadata yet.

diff_profilesCompares two .cpuprofile files (before/after an optimization) and returns per-function CPU time deltas.

Compares two .cpuprofile files (before/after an optimization) and returns per-function CPU time deltas.

No parameter schema in public metadata yet.

analyze_async_bottlenecksDetects event-loop overhead by identifying V8 internal frames representing async machinery.

Detects event-loop overhead by identifying V8 internal frames representing async machinery.

No parameter schema in public metadata yet.

Sponsors

Readme

v8-cpu-profile-decoder-mcp 🐸⚡

npm version npm downloads CI License: MIT

An MCP server that decodes V8 CPU profiles into token-efficient bottleneck summaries for AI agents.

Your Node.js app is slow. You ran --cpu-prof. Now you have a 20MB .cpuprofile file — and your AI agent is completely blind to it.


🤔 The Problem

V8 CPU profiles are massive. A typical .cpuprofile from a production Node.js app is 5–50MB of raw JSON — millions of lines mapping memory addresses, tick counts, and microsecond execution sequences. It looks like this:


View the full README on GitHub

Details

Repository
github.com/vola-trebla/v8-cpu-profile-decoder-mcp
Package
v8-cpu-profile-decoder-mcp
Transport
STDIO
Registry
MCP registry, active

More from vola-trebla