@rn-debug-mcp/instrumentation
v1.0.5
Published
React Native instrumentation for RN Debug MCP
Readme
@rn-debug-mcp/instrumentation
React Native runtime instrumentation for RN Debug MCP.
Part of the RN Debug MCP suite. This package runs inside your React Native application to collect performance data.
🚀 Comprehensive Setup
To use the full RN Debug MCP suite, you need three parts:
- Instrumentation (This package):
npm install @rn-debug-mcp/instrumentation - Babel Plugin:
npm install @rn-debug-mcp/babel-plugin --save-dev(for automatic tracking) - MCP Server: Run via
npx -y @rn-debug-mcp/server(for Cursor/AI integration)
View the Full Integration Guide
Usage
Initialize the instrumentation in your app entry point (e.g., index.js or App.tsx):
import { initDebugMCP } from '@rn-debug-mcp/instrumentation';
if (__DEV__) {
initDebugMCP({
wsUrl: 'ws://localhost:4567',
logToConsole: false,
});
}Features
- Component Tracking: Works with
@rn-debug-mcp/babel-pluginto track component renders. - Context Tracking: Monitors React Context value changes to diagnose provider-driven re-renders.
- Network Monitoring: Automatically intercepts and logs
fetchcalls. - JS Thread Monitoring: Detects long-running tasks that block the main thread.
License
MIT
