OPEN SOURCE. BUILT FOR NEXT.JS.

perfonext

Performance evidence.
For your AI assistant.

CPU profiles, React renders, and build artifacts.
Three MCP servers that turn them into context your coding assistant can act on.

CPU / SAMPLE PROFILE0 500 ms
A V8 CPU sample timeline from the public sample.cpuprofile fixture: processData, JSON.parse, transformResult, RegExp.exec, and idle time.
50 samples. One place to start.Repository fixture
WORKS WITH YOUR ASSISTANT
Claude Code GitHub Copilot Claude Desktop Cursor
+ any stdio MCP client

From raw data.
To a useful next step.

Your assistant brings the reasoning.
perfonext brings the evidence.

EXAMPLE DATA

Functions, ranked by self time

ms

Self time excludes callees. The 500 ms recording includes 100 ms of idle time.

get_hotspots
SELECTED RESULT / EXCERPT
JSON, not guesswork.

STATIC EXAMPLE / PUBLIC TEST FIXTUREView source fixture

Three servers.
Different questions.

Use one. Use all three.
Each works independently.

01 / CPU

Where did the
CPU time go?

V8 and Chrome CPU profiles, distilled into function hotspots, package costs, and caller relationships.

  • Rank functions by CPU self time
  • Read source lines with sample counts
  • Compare profiles for regressions

Source annotations depend on available sample data and files inside the server's working directory.

@perfonext/profiler-mcp
02 / RENDERS

What keeps
rendering?

Live React captures or DevTools Profiler exports, distilled into component costs and rerender evidence.

  • Find slow components and hot commits
  • Investigate props, state, and hooks
  • Compare renders before and after

Exact causes need captured change descriptions. Without them, findings are explicitly heuristic.

@perfonext/render-mcp
03 / BUILD

What's making
your build heavy?

Next.js build artifacts, distilled into route footprints, shared chunks, and the evidence behind bundle growth.

  • Rank routes by emitted chunk bytes
  • Compare builds across content hashes
  • Trace imports with webpack stats

Import chains and package attribution need webpack stats. Manifest analysis works without them.

@perfonext/build-mcp

Keep the fix close
to the evidence.

In the tools you already use.
With the context that was missing.

  1. 01

    Collect.

    Capture a CPU or render profile, or point at a .next build. The servers provide collection recipes when you need them.

    YOUR APP → LOCAL ARTIFACTS
  2. 02

    Understand.

    Your assistant calls the MCP tools and gets structured evidence: ranked costs, relationships, and comparisons.

    MCP TOOLS → STRUCTURED RESULTS
  3. 03

    Make the next fix.

    Use that evidence to guide a code change. Capture the same scenario again and compare what changed.

    YOUR ASSISTANT → YOUR CODE

The servers provide the evidence. Your coding assistant proposes and applies the changes.

Put evidence
in your editor.

Node.js and npm required.
No global install needed.

YOUR TOOLKIT

Standard MCP over stdio.
Runs locally. MIT licensed.

Terminal
shell
claude mcp add perfonext-profiler -- npx -y @perfonext/profiler-mcp
claude mcp add perfonext-render -- npx -y @perfonext/render-mcp
claude mcp add perfonext-build -- npx -y @perfonext/build-mcp
3 servers selectednpx · stdio

Run in your project's terminal, then approve the servers in Claude Code.

THEN ASK YOUR ASSISTANT

“How do I capture a CPU profile of my Next.js server?”

Using nvm on macOS?

GUI apps launched from the Dock may not see your Node installation. For spawn npx ENOENT, set an absolute npx path and include the same Node bin directory in the server's env.PATH.

See the configuration example

A few useful
details.

Is this a replacement for DevTools?

No. perfonext is an agent companion to your profiling tools. It turns profiles and build artifacts into structured summaries, source-aware follow-up, and comparisons that an AI coding assistant can work with. You can still use DevTools to inspect the original data.

What does live render capture need?

The live path uses react-scan/lite and a local ingest endpoint. Instrumentation must run before React initializes. Use next dev, or next build --profile followed by next start; a plain production build has no profiling hooks.

Development preserves component names but adds timing overhead. Production profiling has more representative timings, but names can be minified. Capture also works with headless Playwright tests; a browser extension is not required.

Can I analyze a Turbopack build?

The manifest-based tools don't need webpack stats. Import chains, duplicate-package attribution, and shared-chunk package breakdowns do. Turbopack doesn't provide that webpack module graph; how_to_collect_stats explains the available paths.

Where does my performance data go?

The MCP servers analyze your artifacts locally and send tool results to your configured MCP client. There is no perfonext backend. Your AI client's own data handling and model-provider settings still apply to the results it receives, including source context you request.