← back

react-native-ai-devtools

Documentation

What is react-native-ai-devtools?

An MCP server that gives AI assistants real-time access to a running React Native app. It bridges the gap between static code and live runtime, turning AI assistants from guessing machines into informed development partners.

This is not a debugger. This is not a QA tool. This is a Runtime AI Bridge.

Features

Runtime Interaction

  • Console Log Capture
  • React Component Inspection
  • Network Request Tracking
  • JavaScript Execution
  • Global State Debugging
  • Bundle Error Detection
  • Debug Web Dashboard

Device Control

  • iOS Simulator — screenshots, app management, URL handling
  • Android Devices — screenshots, app install/launch, package management
  • Unified Tap— fiber tree → accessibility → OCR → coordinates
  • UI Automation — swipe, long press, text input, key events
  • Accessibility Inspection
  • OCR Text Extraction

Under the Hood

  • Auto-Discovery
  • Smart Device Selection
  • Auto-Reconnection
  • Efficient Buffering
  • Platform Support — Expo SDK 54+, React Native 0.70+

Setup

Claude Code

Global install
claude mcp add rn-debugger --scope user -- npx react-native-ai-devtools
Project install
claude mcp add rn-debugger --scope project -- npx react-native-ai-devtools

VS Code Copilot (1.102+)

Add to .vscode/mcp.json:

{
  "servers": {
    "rn-debugger": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "react-native-ai-devtools"
      ]
    }
  }
}

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "rn-debugger": {
      "command": "npx",
      "args": [
        "-y",
        "react-native-ai-devtools"
      ]
    }
  }
}

Requirements

  • Node.js 18+
  • React Native app running with Metro bundler
  • Optional: Facebook IDB for iOS UI automation

Available Tools

Connection & Logs

ToolDescription
scan_metroDiscover running Metro bundlers
connect_metroConnect to a Metro bundler
get_logsGet captured console logs
search_logsSearch through captured logs
clear_logsClear the log buffer
get_connection_statusCheck connection state
disconnect_metroDisconnect from Metro
ensure_connectionAuto-connect if not connected

Network Tracking

ToolDescription
get_network_requestsGet captured network requests
search_networkSearch network requests
get_request_detailsGet details of a specific request
get_network_statsGet network statistics summary

App Inspection

ToolDescription
execute_in_appExecute JavaScript in the app context
list_debug_globalsList available debug globals
inspect_globalInspect a global variable
reload_appReload the app

React Component Inspection

ToolDescription
get_component_treeGet the React component tree
inspect_componentInspect a specific component
find_componentsFind components by name or props
get_screen_layoutGet the current screen layout

UI Interaction

ToolDescription
tapUnified tap — by text, accessibility label, or coordinates
ocr_screenshotTake screenshot with OCR text extraction

iOS Tools

ToolDescription
list_ios_simulatorsList available iOS simulators
ios_screenshotTake iOS simulator screenshot
ios_swipeSwipe gesture on iOS
ios_input_textInput text on iOS
ios_launch_appLaunch app on iOS simulator
ios_terminate_appTerminate app on iOS
ios_open_urlOpen URL on iOS simulator
ios_boot_simulatorBoot an iOS simulator
ios_install_appInstall app on iOS simulator
ios_key_eventSend key event on iOS
ios_buttonPress hardware button on iOS

Android Tools

ToolDescription
list_android_devicesList connected Android devices
android_screenshotTake Android device screenshot
android_swipeSwipe gesture on Android
android_input_textInput text on Android
android_launch_appLaunch app on Android
android_install_appInstall APK on Android
android_list_packagesList installed packages
android_key_eventSend key event on Android
android_long_pressLong press on Android

Claude Code Skills

Pre-built workflows that combine multiple tools for common tasks:

SkillDescription
session-setupConnect to Metro and verify the connection
debug-logsCapture and analyze console logs
network-inspectMonitor and inspect network requests
app-stateDebug global state and variables
component-inspectInspect React component tree and props
layout-checkVerify screen layout and UI structure
device-interactInteract with device UI (tap, swipe, type)
bundle-checkDetect and diagnose bundle errors
native-rebuildGuide through native rebuild process

Usage Examples

Quick Start

# 1. Start your React Native app
npx expo start

# 2. Ask your AI assistant:
"Connect to my running app and show me the component tree"
"Take a screenshot and describe what you see"
"Tap the Login button"
"Show me the last 10 network requests"

Log Inspection

# Ask your AI assistant:
"Search logs for errors in the last 5 minutes"
"Show me all network requests that failed"
"What warnings are in the console?"

Unified Tap

# The tap tool automatically finds elements:
tap(text="Submit")        # finds by visible text
tap(text="Login")         # tries fiber tree → accessibility → OCR
tap(x=200, y=400)         # direct coordinates as fallback

Supported Versions

PlatformVersionStatus
Expo SDK54+Supported
React Native0.70 - 0.76Supported
React Native< 0.70Not tested

Troubleshooting

No devices found

  • Make sure your React Native app is running with Metro bundler
  • Check that Metro is accessible at http://localhost:8081
  • Try running scan_metro to discover available bundlers

Wrong device selected

  • Use list_ios_simulators or list_android_devices to see all available devices
  • Specify the device ID explicitly when connecting

Logs not appearing

  • Ensure the app is connected (check with get_connection_status)
  • Try clear_logs and reproduce the issue
  • Verify the app is using Hermes engine (required for log capture)