expo-mcp-bridge
Enables control of Android hardware keys (volume up/down, mute, back, home, power) via adb and supports USB-only Android device connections through adb reverse.
Allows AI agents to inspect and interact with a live Expo / React Native app running in Expo Go or a dev build, including reading the visible screen outline, tapping, typing, scrolling, navigating, taking screenshots, and reading console logs and network requests.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@expo-mcp-bridgeopen the app, try the sign-up form with bad input, and tell me what breaks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
expo-mcp-bridge
Let your AI agent use your phone app the way it uses a browser.
Claude Code, Antigravity, Cursor and any other MCP agent can read the screen, tap, type and fill forms, scroll, take screenshots, read console errors and network requests, and press volume / back / home in your Expo / React Native app, running live in Expo Go on your real phone. No more pasting screenshots into the chat.
π± Real devices, zero native setup β Expo Go or a dev build, iPhone or Android, over Wi-Fi.
πͺΆ Token-cheap β the agent reads a compact outline of the visible screen; every action returns only what changed.
β‘ Fast β actions finish as soon as the UI settles;
app_batchruns a whole flow in one call.π Sees what's broken β new JS errors and failed requests are attached to the action that caused them.
π€ Skill included β
initinstalls an agent skill (Claude Code) and anAGENTS.mdguide (Antigravity, Cursor, Codexβ¦).π Dev only β in production builds
<AgentBridge />renders its children and nothing else.
scroll [e1]
button "icon:chevron-back" [e2]
text "Welcome back"
input "you@example.com" value="" [e3]
input "β’β’β’β’β’β’β’β’" value="" (secure) [e4]
button "icon:eye" [e5]
button "Log In" [e7]What the agent sees of a real login screen: ~70 tokens instead of ~1,000 for a screenshot. Tapping e5 returns just:
Tapped.
Changes (+ added, - removed):
~ input "β’β’β’β’β’β’β’β’" value="" [e4]
+ button "icon:eye-off" [e9]
- button "icon:eye" [e5]π Quick start
Option A β let your AI do it (one shot)
Paste this to Claude Code, Antigravity or Cursor inside your Expo project:
Read https://raw.githubusercontent.com/Rudrasamadhiya/expo-mcp-bridge/main/AI_SETUP.md and set it up in this project.
Option B β by hand (2 minutes)
npx expo install expo-mcp-bridge react-native-view-shot
npx expo-mcp-bridge initMount the bridge once in your root layout (app/_layout.tsx):
import { Stack, router } from 'expo-router';
import { AgentBridge } from 'expo-mcp-bridge';
export default function RootLayout() {
return (
<>
<Stack />
<AgentBridge router={router} />
</>
);
}Run npx expo start (LAN mode), open the app on your phone (same Wi-Fi), restart your agent and ask:
"Open the app, try the sign-up form with bad input, and tell me what breaks."
Agent configuration
init writes .mcp.json (Claude Code). Other agents:
Agent | Config |
Claude Code |
|
Cursor |
|
Antigravity / Windsurf / Cline | MCP settings: |
On Windows: "command": "cmd", "args": ["/c", "npx", "expo-mcp-bridge"].
Related MCP server: React Native Debug MCP
π§° Tools
Tool | What it does |
| Connected device, OS, screen size |
| Outline of the visible screen with stable refs ( |
| Press by ref, |
| Fill an input ( |
| Several taps/types/scrolls/navigations in one call |
| down / up / top / bottom |
| Flip a |
| expo-router path or deep link ( |
| Wait for text / testID to appear or disappear |
| Hide the keyboard |
| JPEG of the visible screen; |
| Element positions (dp) and font sizes |
| Console logs and JS errors (cursor-based) |
| fetch/XHR requests with status, timing and bodies |
| Run JS inside the app (dev only) |
| Reload the JS bundle (tells you honestly if it can't) |
|
|
π» CLI
npx expo-mcp-bridge init # in your Expo project: .mcp.json + agent skill + AGENTS.md section
npx expo-mcp-bridge init --cursor # also write .cursor/mcp.json
npx expo-mcp-bridge # run the MCP server (your agent starts this from .mcp.json)
npx expo-mcp-bridge --helpEnvironment variable | Default | What |
|
| WebSocket port the phone connects to (match |
You normally never run the server yourself β the agent launches it over stdio. To try it by hand, any MCP client works, e.g. npx @modelcontextprotocol/inspector npx expo-mcp-bridge.
βοΈ Props
<AgentBridge
router={router} // expo-router's router, for exact app_navigate
host="192.168.1.20" // computer IP (auto-detected from Metro)
port={8347} // must match EXPO_MCP_PORT
allowEval={false} // disable app_eval
enabled={false} // turn the bridge off
/>π§ How it works
AI agent ββMCP (stdio)βββΆ expo-mcp-bridge server βββWebSocket :8347ββ <AgentBridge /> in your appThe in-app component reads React's live component tree, so it sees exactly what you rendered: your testIDs, labels, inputs and lists. It calls your real onPress / onChangeText handlers, so app logic runs exactly as if a user did it. Native-stack screens hidden under the current one are skipped, modals are captured as overlays, and screenshots capture the visible screen view (whole-window capture can return stale frames on Android).
π©Ί Troubleshooting
Symptom | Fix |
| Same Wi-Fi, LAN mode (not |
| Another agent session runs the server β close it or set |
Metro: |
|
| Metro was restarted; shake the phone β Reload once. |
Screenshots fail | Install |
π¬ Make launch videos too
expo-launch-video builds on this bridge: your agent records the app live from the phone and edits a launch video with motion graphics, pop-outs and sound, in a browser studio you can prompt.
Limits
An in-app library controls your own app only; the OS blocks system dialogs and other apps. device_key covers hardware keys via adb on Android. Gestures that exist only in native code (a pan handler with no onPress) can't be triggered from JS.
Contributing
npm install && npm test β the bridge runs in Node against the real MCP server. See CONTRIBUTING.md. MIT licensed.
This server cannot be deployed
Maintenance
Related MCP Connectors
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
Drive and test your React Native and Expo apps end-to-end on iOS and Android. Supports real devices, simulators, and emulators. Snapshots, taps, typing, swipes, screenshots, deep links, reloads, builds and runtime errors.
Control real Android and iOS devices with LLM agents β tap, swipe, type, automate flows.
Melaya is a remote MCP server. It gives an assistant hands on your own Android phone and browser: it reads the screen through the accessibility tree, then taps, types and navigates inside the apps and sites you allow-list, with no per-app API. It also builds, schedules and runs agent pipelines across 6k+ connected tools. OAuth 2.1, nothing to install.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceAn MCP server that lets AI agents control iOS and Android devices (tap, scroll, type, take screenshots, read UI trees, and run code). Works with multiple devices at the same time.66 npm50MIT
- AlicenseBqualityDmaintenanceEnables AI agents to inspect, log, and control React Native apps on Android emulators or iOS simulators, including UI tree, tap, scroll, and hot reload.22576 npm5MIT
- AlicenseBqualityBmaintenanceGive any LLM agent a real Android or iPhone. 62 MCP tools: tap, swipe, type, screenshot, screen-tree reading, app launch, camera, TTS, crash reports, batched execution. Android via ADB, iPhone via WebDriverAgent, on-device inference, Docker+KVM emulators. Works with Claude Code, Cursor, LangChain, LlamaIndex, and any MCP client. MIT.66537 PyPI387MIT
- AlicenseBqualityBmaintenanceAn MCP server that gives AI agents hands-on control of a live React Native app, enabling UI taps, screenshots, UI/component trees, native logs, and JS/React profiling to debug, verify fixes, and diagnose performance issues.164 npmMIT