Getting Started

Set up React Native MCP in your project in under 5 minutes.

Prerequisites

  • React Native 0.72 or higher
  • Node.js 18+ (or Bun)
  • idb (iOS simulator) or adb (Android) — see Install & connect
  • An MCP client: Cursor, Claude Desktop, Claude Code, or GitHub Copilot CLI

Step 1: Install and configure (30 seconds)

Run the CLI init command in your project root:

npx -y @ohah/react-native-mcp-server init

This auto-detects your project (React Native version, Expo, package manager) and:

  1. Adds the Babel preset to babel.config.js
  2. Creates the MCP server config for your client (Cursor, Claude, etc.)
  3. Updates .gitignore

Already set up manually? See Install & connect and CLI Init for details.


Step 2: Run the app

Bare RN
Expo
# Start Metro
npx react-native start

# In another terminal, run on simulator/emulator

npx react-native run-ios

# or

npx react-native run-android

For Android emulator, set up port forwarding:

adb reverse tcp:12300 tcp:12300

Step 3: Verify the connection

Open your MCP client and try:

"Take a snapshot of the app"

If the AI returns a component tree, the connection is working. You can also verify with:

"What's the debugger status?"

This calls get_debugger_status and should show appConnected: true with your device listed.


What's next?