loading…
Search for a command to run...
loading…
MCP server for React Native app automation and monitoring
MCP(Model Context Protocol) server for React Native app automation and monitoring. Works with Cursor, Claude Desktop, Claude Code, GitHub Copilot, Windsurf, and any MCP-compatible client.
| Guide | Description |
|---|---|
| Quick Start | 5-minute setup guide |
| Expo Guide | Expo-specific setup (Dev Client, Expo Go, Expo Router) |
| Tool Reference | All 49 tools with parameters and examples |
| Cookbook | Real-world usage scenarios |
| Architecture | How it works under the hood |
| Troubleshooting | Connection issues and fixes |
| VS Code Extension | DevTools + Component Tree in the sidebar |
| E2E Testing | YAML scenario testing |
The fastest way to set up React Native MCP in your project:
npx -y @ohah/react-native-mcp-server init
The init command runs through these steps:
Step 1 — Project Detection (automatic)
Reads package.json, lock files, and config files to detect:
dependencies.react-native)dependencies.expo, app.json, app.config.ts)babel.config.js, .babelrc, etc.)bun.lock → bun, yarn.lock → yarn, pnpm-lock.yaml → pnpm, otherwise npm) Detecting project...
✓ React Native 0.83.1
✓ Expo detected (expo@~52.0.0)
✓ Package manager: bun
Step 2 — MCP Client Selection (interactive prompt)
Asks which MCP client you use. This determines where the server config file is created.
? Which MCP client do you use?
1. Cursor
2. Claude Code (CLI)
3. Claude Desktop
4. Windsurf
5. Antigravity
> 1
| Client | Config location |
|---|---|
| Cursor | {project}/.cursor/mcp.json |
| Claude Code | claude mcp add CLI command |
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
| Antigravity | ~/.gemini/antigravity/mcp_config.json |
Step 3 — Apply Changes (automatic)
@ohah/react-native-mcp-server/babel-preset to the presets array. Skipped if already present./results/ if not already present.Step 4 — Run your app and start using MCP tools
# Bare RN
npx react-native start
# Expo
npx expo start
# Non-interactive mode — skip prompts, use Cursor as default client
npx -y @ohah/react-native-mcp-server init -y
# Specify client explicitly
npx -y @ohah/react-native-mcp-server init --client cursor
npx -y @ohah/react-native-mcp-server init --client claude-code
# Help
npx -y @ohah/react-native-mcp-server init --help
Running init multiple times is safe — each step checks if the change is already applied.
Monorepo: Run init from the repo root. It adds @ohah/react-native-mcp-server to the detected app package’s devDependencies and runs install from the root. See CLI Init for options like --no-install.
Add to .cursor/mcp.json:
{
"mcpServers": {
"react-native-mcp": {
"command": "npx",
"args": ["-y", "@ohah/react-native-mcp-server"]
}
}
}
# Claude Code CLI (recommended)
claude mcp add --transport stdio react-native-mcp -- npx -y @ohah/react-native-mcp-server
Or edit ~/Library/Application Support/Claude/claude_desktop_config.json with the same JSON structure.
Run /mcp add react-native-mcp in Copilot CLI, or edit ~/.copilot/mcp-config.json.
Install React Native MCP DevTools from the Marketplace, or in VS Code: Ctrl+Shift+X (Extensions) → search React Native MCP DevTools → Install. Gives you Console, Network, State, Renders, and Component Tree in the sidebar. See VS Code Extension for local .vsix install.
For detailed client setup, see Cursor / Claude / Copilot.
The MCP server uses idb (iOS) and adb (Android) for native touch injection and screenshots.
# Android
brew install --cask android-platform-tools # or install Android Studio
adb devices # verify
# iOS Simulator
brew tap facebook/fb && brew install idb-companion
pip3 install fb-idb
idb list-targets # verify
idb is macOS-only, simulators only. See idb Setup Guide for details.
React Native App (iOS/Android)
↓ (WebSocket)
└─ Runtime (auto-injected via Babel preset)
↓
MCP Server (developer's machine, port 12300)
↓ (stdio/MCP protocol)
Cursor / Claude Desktop / Copilot CLI
See Architecture for the full design.
.mise.toml), oxlint/oxfmt for linting/formattingbun run build - Build the serverbun run mcp - Run MCP serverbun run dev - Watch modebun run test - Run testsbun run test:mcp - Spawn server, call evaluate_script via stdioMIT © ohah
Add this to claude_desktop_config.json and restart Claude Desktop.
{
"mcpServers": {
"react-native-mcp-server": {
"command": "npx",
"args": [
"-y",
"@ohah/react-native-mcp-server"
]
}
}
}pro tip
Just installed React Native Mcp Server? Say to Claude: "remember why I installed React Native Mcp Serverand what I want to try" — it'll save into your Vault.