
React Render Profile Mcp
io.github.vola-treblaPublished by GitHub account vola-treblav1.0.2Updated Nov 3, 2026
Decodes React DevTools Profiler exports into render summaries and memoization advice for AI agents.
Overview
Decodes React DevTools Profiler exports into render summaries, memoization advice and AST-based fixes for AI coding agents.
- What you can do
- Summarize a profile: commits, total render time, spurious renders and lifecycle anomalies
- Find wasted renders and classify their trigger, and score where React Compiler or React.memo is bypassed
- Diagnose hydration mismatches, Suspense waterfalls, unstable external-store selectors and state-cascade depth
- Suggest high-ROI memoization and audit component source for compiler rule violations
- Rewrite component source on disk: hoist literals, wrap hooks, apply React.memo
- Inspect RSC Flight payloads for chunk size, waterfalls and known exploits, and correlate commits with Chrome traces for CLS/INP
- When to use it
- Useful when an agent refactors React components, context providers or store selectors and you want runtime render evidence instead of guesswork, or when you are chasing lag, stutter or re-render storms and can export a React DevTools profile.
- Requirements
- Runs locally over stdio, typically launched with npx, so Node.js is needed. Every profiling tool needs an absolute path to a React DevTools Profiler export in JSON; the remediation and audit tools need a source file path. No accounts, API keys or environment variables are declared.
Installation
In SourceWeft
- Open React Render Profile Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
react-render-profile-mcp
[npm version] [npm downloads] [CI] [License: MIT]
An Autonomous Performance SRE & Auto-Remediation Engine for React, exposed as a Model Context Protocol (MCP) server. Built specifically to bridge the performance perception gap for AI coding agents (Claude, Cursor, Copilot).
👁️ The Blind Spot: Why AI Agents Break React Production
When an AI agent refactors a Context Provider, changes state architecture, or hooks up a global store, it is completely blind to the runtime performance impact.
An agent can successfully pass unit tests and compile code while introducing catastrophic performance regressions:
- A single state update cascading into 80 unnecessary child re-renders.
- Infinite rendering loops triggered by unstable Zustand/Redux selector references.
- Hydration mismatches forcing React to throw away server-rendered HTML and mount from scratch.
- Unstable
keyprops causing components to unmount and mount on every render cycle (lifecycle anomalies).
react-render-profile-mcp gives AI agents a "third eye" to dynamically measure, visualize, and auto-remediate these performance bottlenecks.
⚡ The Four Pillars of AI-SRE
Instead of raw JSON dumps, this server organizes performance data into structured, actionable insights across four core engineering pillars:
🧠 1. AST Auto-Remediation Engine (ts-morph)
ア When a bottleneck is found, the agent doesn't need to manually rewrite code. The server can mutate component source code on disk:
- Hoisting: Statically hoisting object and array literals out of render bodies.
- Dynamic Memoization: Wrapping unstable functions and variables in
useCallbackanduseMemowith computed dependency arrays. - ROI Wrapping: Wrapping components in
React.memoonly if the profiled self-time and spurious render count justify the comparison overhead (ROI > 1.5). - Rule Auditing: Scanning code to prevent compiler bailouts (detecting
Date.now(),Math.random(), or render-phaseuseRefmutations).
📊 2. Interactive SVG Cascade Visualizer (MCP Resource)
Generates parent-child rendering graphs directly into the agent's chat window using the custom resource URI scheme react-profile://commits/{commitId}/cascade?profile_path={profile_path}.
- Triggers are styled with distinct HSL palettes to isolate propagation channels:
- 🔵 Context Trigger: Blue (ocean wave)
- 🟠 Zustand/Redux Store: Orange (subscriber ripple)
- 🔴 Props Invalidation: Red (reference mismatch)
- 🟢 State Change: Green (emerald trigger source)
🛡️ 3. RSC Flight Stream & Security Profiler
Analyzes React Server Components (RSC) Flight streams to optimize delivery:
- Identifies bloated chunks (> 50KB) and sequential waterfalls.
- Scans payloads for prototype traversal vulnerabilities like CVE-2025-55182 (React2Shell) exploits.
⚛️ 4. Multi-Layer Trace Correlator
Aligns React commits with Chrome Performance timeline events using blink.user_timing markers.
- Measures post-commit layout, paint, and style calculation tasks to calculate real Core Web Vitals impacts (CLS / INP estimates).
🛠️ MCP Tools Reference
Below is a compact summary of the tools exposed by this server. All tools accept a required profile_path pointing to a React DevTools export .json.
🤖 Prompt Injection: Teach Your Agent to Profile
To get the most out of this server, add the following prompt to your agent's system instructions (e.g., in .cursorrules, Cursor System Prompt, or Claude Custom Instructions):
📋 How to Export a Profile
- Open React DevTools in your browser.
- Navigate to the Profiler tab.
- Click the Record button (circle), interact with your application to trigger the performance issue, and click Stop.
- Click the Save Profile icon (💾) to download the
.jsonfile. - Provide the absolute path to this file to the MCP server.
⚙️ Setup & Installation
Claude Desktop
Add this to your claude_desktop_config.json:
Cursor / VS Code / Other Clients
Add an MCP server of type command:
- Command:
npx -y react-render-profile-mcp
🔧 Under the Hood
- ESM-Native: Built with TypeScript ESM, optimized for fast Node.js imports.
- React DevTools v5 Protocol: Natively decodes serialized operations arrays, resolving fiber snapshots and name maps.
- Lane Identification: Distinguishes between high-priority lane updates and concurrent transition commits (Low Priority/Idle) to prevent false-positive regression flags.
- AST Modification Safety: Implements
ts-morphstatement manipulation blocks, avoiding common parser state corruption during multi-pass rewrites.
Part of the MCP Toolbelt
Developed alongside:
- tailwind-context-resolver-mcp — Resolve Tailwind design tokens and validate utility classes.
- v8-cpu-profile-decoder-mcp — Decode V8 CPU profiles for Node.js backend performance tuning.
License
MIT
Source: README.md at commit e834c0d
Tools
0Version history
1- v1.0.2LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts