Troubleshooting
Common issues when using React Native MCP, and how to fix them.
"No app connected" / appConnected: false
When get_debugger_status returns appConnected: false and devices: [], the app has not connected to the MCP server's WebSocket (port 12300).
How it works
- The MCP server opens a WebSocket server on port 12300.
- The app's runtime connects to
ws://localhost:12300. - After connection, the app sends an
initmessage, the server registers the device, andappConnectedbecomestrue.
If the app never connects to port 12300, appConnected stays false.
Cause 1: Two MCP server processes (most common)
Symptom: One process was started by Cursor, and another by npx @ohah/react-native-mcp-server in a terminal. Port 12300 can only be used by one process. The first one succeeds; the second gets EADDRINUSE.
The app connects to the process that owns port 12300 (A), but Cursor talks to the other process (B) via stdio — so Cursor always sees appConnected: false.
Check:
If multiple processes are listed, this is the issue.
Fix:
Then run the MCP server from one place only — either Cursor or terminal, not both.
Cause 2: Port 12300 bind failure
Even with a single process, if it starts before a previous process fully released the port, the bind fails silently.
Check: Look for WebSocket server listening on ws://localhost:12300 in the MCP logs. If missing and EADDRINUSE appears, the process isn't listening.
Fix: Kill the port, restart the MCP server or Cursor.
Cause 3: App can't reach localhost
The runtime uses ws://localhost:12300.
Fix: For Android emulator, run:
Cause 4: MCP runtime not in the bundle
If __REACT_NATIVE_MCP__ doesn't exist, the runtime wasn't injected.
Check: Look for [MCP] runtime loaded, __REACT_NATIVE_MCP__ available in app logs.
Fix:
- Verify
@ohah/react-native-mcp-server/babel-presetis inbabel.config.js - Clear Metro cache and rebuild:
- For non-dev builds, run Metro with
REACT_NATIVE_MCP_ENABLED=true
Summary table
Tap / screenshot not working
iOS simulator
- idb required: Install idb:
- Verify:
idb list-targetsshould show your simulator - Simulator must be booted:
xcrun simctl boot <UDID>if needed
Android emulator/device
- adb required: Included with Android Studio, or:
- Verify:
adb devicesshould show your device - Port forwarding:
adb reverse tcp:12300 tcp:12300
Common issues
- Wrong coordinates: If taps land in the wrong place, check that you're using the correct coordinate system (points for iOS, dp for Android). Use
query_selectorto get accurate measurements. - Landscape mode: For iOS landscape, pass the
iosOrientationparameter to tap/swipe tools.
Metro cache issues
After changing Babel config or updating the MCP package, clear Metro cache:
Recommended diagnostic steps
-
Ensure only one MCP server process
Should show at most one process. If multiple,
kill $(lsof -t -i :12300)and restart. -
Check MCP logs
- Look for:
WebSocket server listening on ws://localhost:12300 - Should NOT have:
EADDRINUSE
- Look for:
-
Check runtime environment
- iOS simulator, Android emulator (with
adb reverse), or dev build - Physical devices require additional network setup
- iOS simulator, Android emulator (with
-
Check app logs
[MCP] runtime loaded, __REACT_NATIVE_MCP__ available— runtime injected[MCP] Connected to server ws://localhost:12300— connected to server
-
Test the connection
- Call
get_debugger_status— should show devices - Call
evaluate_scriptwith() => 1 + 2— should return3
- Call