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-devtoolsProject install
claude mcp add rn-debugger --scope project -- npx react-native-ai-devtoolsVS 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
| Tool | Description |
|---|---|
| scan_metro | Discover running Metro bundlers |
| connect_metro | Connect to a Metro bundler |
| get_logs | Get captured console logs |
| search_logs | Search through captured logs |
| clear_logs | Clear the log buffer |
| get_connection_status | Check connection state |
| disconnect_metro | Disconnect from Metro |
| ensure_connection | Auto-connect if not connected |
Network Tracking
| Tool | Description |
|---|---|
| get_network_requests | Get captured network requests |
| search_network | Search network requests |
| get_request_details | Get details of a specific request |
| get_network_stats | Get network statistics summary |
App Inspection
| Tool | Description |
|---|---|
| execute_in_app | Execute JavaScript in the app context |
| list_debug_globals | List available debug globals |
| inspect_global | Inspect a global variable |
| reload_app | Reload the app |
React Component Inspection
| Tool | Description |
|---|---|
| get_component_tree | Get the React component tree |
| inspect_component | Inspect a specific component |
| find_components | Find components by name or props |
| get_screen_layout | Get the current screen layout |
UI Interaction
| Tool | Description |
|---|---|
| tap | Unified tap — by text, accessibility label, or coordinates |
| ocr_screenshot | Take screenshot with OCR text extraction |
iOS Tools
| Tool | Description |
|---|---|
| list_ios_simulators | List available iOS simulators |
| ios_screenshot | Take iOS simulator screenshot |
| ios_swipe | Swipe gesture on iOS |
| ios_input_text | Input text on iOS |
| ios_launch_app | Launch app on iOS simulator |
| ios_terminate_app | Terminate app on iOS |
| ios_open_url | Open URL on iOS simulator |
| ios_boot_simulator | Boot an iOS simulator |
| ios_install_app | Install app on iOS simulator |
| ios_key_event | Send key event on iOS |
| ios_button | Press hardware button on iOS |
Android Tools
| Tool | Description |
|---|---|
| list_android_devices | List connected Android devices |
| android_screenshot | Take Android device screenshot |
| android_swipe | Swipe gesture on Android |
| android_input_text | Input text on Android |
| android_launch_app | Launch app on Android |
| android_install_app | Install APK on Android |
| android_list_packages | List installed packages |
| android_key_event | Send key event on Android |
| android_long_press | Long press on Android |
Claude Code Skills
Pre-built workflows that combine multiple tools for common tasks:
| Skill | Description |
|---|---|
| session-setup | Connect to Metro and verify the connection |
| debug-logs | Capture and analyze console logs |
| network-inspect | Monitor and inspect network requests |
| app-state | Debug global state and variables |
| component-inspect | Inspect React component tree and props |
| layout-check | Verify screen layout and UI structure |
| device-interact | Interact with device UI (tap, swipe, type) |
| bundle-check | Detect and diagnose bundle errors |
| native-rebuild | Guide 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 fallbackSupported Versions
| Platform | Version | Status |
|---|---|---|
| Expo SDK | 54+ | Supported |
| React Native | 0.70 - 0.76 | Supported |
| React Native | < 0.70 | Not 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_metroto discover available bundlers
Wrong device selected
- Use
list_ios_simulatorsorlist_android_devicesto 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_logsand reproduce the issue - Verify the app is using Hermes engine (required for log capture)