V8 MCP Server

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

Local serverstdioTypeScript

What is the V8 MCP server?

Most developer tooling work still happens through a UI a human drives. V8 MCP server moves it into the conversation instead. MCP server that decodes V8 CPU profiles into token-efficient bottleneck summaries for AI agents.

The tools it exposes

The server publishes 6 tools. What each one is for:

  • extract_hottest_functions — Parses the .cpuprofile and returns the top N functions ranked by exclusive CPU time (self time). Filters out V8 internals and Node.js built-ins —
  • analyze_call_tree_path — Finds all callers of a specific function and shows how often each one invoked it. Accepts partial, case-insensitive function name matching
  • correlate_source_code — Maps compiled JS bottlenecks back to their original TypeScript source locations using .js.map files. Falls back gracefully to compiled JS
  • analyze_gc_pressure — Reports garbage collection overhead as a percentage of profiling duration, broken down by GC type. Flags when GC exceeds a configurable threshold and
  • diff_profiles — Compares two .cpuprofile files (before/after an optimization) and returns per-function CPU time deltas, normalized against each profile's total
  • analyze_async_bottlenecks — Detects event-loop overhead by identifying V8 internal frames representing async machinery — microtask queue processing, nextTick saturation, and

Getting it running

v8-cpu-profile-decoder-mcp on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

How it compares

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. V8's toolset — extract_hottest_functions, analyze_call_tree_path, correlate_source_code and 3 more — is a fair guide to whether it matches your workflow. It is maintained by vola-trebla; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
extract_hottest_functionsParses the .cpuprofile and returns the top N functions ranked by exclusive CPU time (self time). Filters out V8 internals and Node.js built-ins — only user code.
analyze_call_tree_pathFinds all callers of a specific function and shows how often each one invoked it. Accepts partial, case-insensitive function name matching.
correlate_source_codeMaps compiled JS bottlenecks back to their **original TypeScript source locations** using .js.map files. Falls back gracefully to compiled JS locations if no source map is found.
analyze_gc_pressureReports garbage collection overhead as a percentage of profiling duration, broken down by GC type. Flags when GC exceeds a configurable threshold and provides a targeted recommendation.
diff_profilesCompares two .cpuprofile files (before/after an optimization) and returns per-function CPU time deltas, normalized against each profile's total duration. Frames are matched by call-frame coordinates, not transient node I
analyze_async_bottlenecksDetects event-loop overhead by identifying V8 internal frames representing async machinery — microtask queue processing, nextTick saturation, and timer/immediate callbacks.

How to install the V8 MCP server

{
  "mcpServers": {
    "v8-cpu-profile-decoder": {
      "command": "npx",
      "args": ["-y", "v8-cpu-profile-decoder-mcp"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • Use V8 to extract hottest functions.
  • Use V8 to analyze call tree path.
  • Use V8 to correlate source code.

Frequently asked questions

It connects V8 to MCP-compatible AI assistants such as Claude and Cursor, exposing 6 tools (extract_hottest_functions, analyze_call_tree_path, correlate_source_code, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with V8 directly.