rn-agent-observer
Provides runtime observability for Android apps, including driving the device via ADB/UIAutomator, capturing screenshots and UI trees, recording video, collecting device-level network and app state, and generating Perfetto traces.
Offers observability for Expo apps, including launching, observing, and interacting with the app, plus capturing performance metrics, network requests, React renders, and JS CPU profiles through Metro's CDP integration.
Allows exporting console logs, exceptions, heap snapshots, and JS CPU profiles, and capturing per-request network traffic via the Chrome DevTools Protocol connected through Metro.
Provides React Native-specific observability, including React render metrics, UI snapshots and diffs, and JS performance profiling via instrumentation and CDP.
Persists sessions and observational data in SQLite databases under the project's artifact directory, allowing historical analysis and replay.
Click on "Install 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., "@rn-agent-observercapture a screenshot and UI tree of the current screen on emulator-5554"
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.
RN Agent Observer
VI · English
RN Agent Observer 2.4.0 is a local runtime observability bridge for React Native/Expo. The tool uses the same TypeScript core for both CLI and MCP, drives Android via ADB/UIAutomator, receives telemetry from development instrumentation, exports console/exception/heap/JS CPU profiles through Metro's Chrome DevTools Protocol, captures per-request network traffic without instrumentation, produces screen understanding with state/headline/actions/UI findings for agents, provides session-stable ref snapshots + diffs + auto-recorded replay, records screen video, persists sessions in SQLite, and keeps screenshots/traces/UI trees as on-disk artifacts.
The current release completes Android v1 on Windows: 45 MCP tools, the matching CLI, an Expo demo with deterministic labs, transparent heuristic diagnosis, and pixel + structural UI comparison.
Requirements
Node.js 22.12 or newer
pnpm 9.6
Android Platform Tools (
adb)Android emulator or physical device with USB debugging enabled
Expo development build if you need app-specific telemetry
Related MCP server: React Native MCP Server
Quick Start
pnpm install
pnpm check
adb devices -l
pnpm rn-observe --help
pnpm mcp:checkPoint the observer at your Expo/React Native app:
$env:RN_OBSERVER_PROJECT_ROOT = 'C:\path\to\expo-app'
$env:RN_OBSERVER_DEVICE_ID = 'emulator-5554'
# Có thể bỏ qua nếu app.json chứa expo.android.package
$env:RN_OBSERVER_APP_ID = 'com.example.app'
pnpm rn-observe launch
pnpm rn-observe observe
pnpm rn-observe understand-screen
pnpm rn-observe ui-model
pnpm rn-observe tap --test-id buy-button
pnpm rn-observe performance
pnpm rn-observe diagnoseArtifacts and SQLite are created under <projectRoot>/.artifacts/; large binaries are never embedded in MCP responses.
Deterministic demo
pnpm --filter @rn-agent-observer/demo-expo android -- --device <device-name>The demo includes PerformanceLab, NetworkLab, RenderLab, AnimationLab, ErrorLab, and VisualLab. NetworkLab uses internal fixtures (0/500/2000ms and 503) so it doesn't depend on Internet services. PerformanceLab accurately reports its 100ms long JS task through instrumentation.
MCP
pnpm mcp:check
pnpm mcp:startThe server uses stdio. Client configuration and the list of 45 tools are in docs/protocol.md.
AI agent integration
There are 3 ways for agents (OpenCode/Claude Code/Cursor/Codex...) to use the observer:
1. MCP server (recommended — structured tools)
{
"mcpServers": {
"rn-agent-observer": {
"command": "node",
"args": [
"C:\\abs\\rn-agent-observer\\packages\\mcp-server\\dist\\server.js"
],
"env": {
"RN_OBSERVER_PROJECT_ROOT": "C:\\path\\to\\expo-app",
"RN_OBSERVER_DEVICE_ID": "emulator-5554"
}
}
}
}2. Install as a skill (teaches the agent the debugging workflow via CLI)
npx skills add GinzaTech/rn-agent-observerThe skill is at skills/rn-agent-observer/SKILL.md — it teaches the agent the observe -> understand-screen -> reproduce -> diagnose -> fix -> understand-screen -> compare loop, how to read metrics honestly, and common error handling. After installing, just say "debug laggy app X" and the agent will know to use rn-observe.
3. AGENTS.md (when the agent works directly in this repo) — already present at the root; the agent reads it automatically.
All 3 can be used at the same time: skill/AGENTS.md teaches the workflow, MCP provides directly callable tools.
Documentation
Current version
Android/Windows is the only target of Observer 2.4.0.
ADB has no reliable JS FPS signal; the field is returned as
available: false, no guessed numbers.JS blocking, route, React renders, and network metadata require development instrumentation in the app.
DevTools export via CDP (
devtools-export,devtools-profile) and per-request network (metro-network) require Metro running and the app connected to Metro (adb reverse tcp:8081 tcp:8081); not usable when another React Native DevTools session holds the connection.reload --fastuses CDP Page.reload (JS-only); automatically falls back to force-stop when Metro is unavailable.Apps without instrumentation: use
metro-network(CDP),app-state(foreground activity, PID), anddevice-network(device-level byte counters, not app-attributed) as fallback evidence.record(screenrecord) is limited to 180s/clip by Android.Perfetto trace supports Android; deep trace analysis still uses Perfetto UI/Android Studio.
CDP commands are queued between processes; external React Native DevTools must still be closed because it doesn't use the observer lock.
session stopauto-generates replay; refs in session are stable across reorder/scroll; missing sessions emitEVIDENCE_NOT_RECORDED.understand-screen/MCPunderstand_screenreturns route instrumentation when available, screen state, headline, text/action refs, UI findings, and screenshot/UI-tree evidence; repeated calls detect unchanged loading. Classification is heuristic and text fields are always redacted.ui-model/MCPruntime_ui_modelparses TSX with TypeScript AST to get component +file:line, then correlates with instrumentation and native tree. Results distinguishrendered,visible/offscreen/hidden/unmounted/flattened-or-unobserved,enabled, andcanPresswith reason.The development-only Babel plugin auto-adds source testID and wraps
onPress; session stop collects interactionstart/success/error, puts testID taps into replay. Never records handler arguments, props, or input values.Observer doesn't capture network bodies by default. Development-only opt-in uses fail-closed allowlists but should still only be used with development fixtures.
RN Agent Observer (English)
RN Agent Observer 2.4.0 is a local runtime observability bridge for React Native/Expo. It uses one shared TypeScript core behind both a CLI and an MCP server, drives Android through ADB/UIAutomator, receives telemetry from development instrumentation, exports console/exceptions/heap/JS CPU profiles through Metro's Chrome DevTools Protocol, captures per-request network traffic without app instrumentation, produces structured screen understanding (state/headline/actions/UI findings) for agents, provides session-stable ref snapshots + diffs + automatically recorded replay scripts, records on-screen video, persists sessions in SQLite, and keeps screenshots/traces/UI trees as on-disk artifacts.
The current release completes Android v1 on Windows: 45 MCP tools, the matching CLI, an Expo demo app with deterministic labs, transparent heuristic diagnosis, and pixel + structural UI comparison.
Requirements
Node.js 22.12 or newer
pnpm 9.6
Android Platform Tools (
adb)An Android emulator or physical device with USB debugging enabled
An Expo development build if you need app-specific telemetry
Quick Start
pnpm install
pnpm check
adb devices -l
pnpm rn-observe --help
pnpm mcp:checkPoint the observer at your Expo/React Native app:
$env:RN_OBSERVER_PROJECT_ROOT = 'C:\path\to\expo-app'
$env:RN_OBSERVER_DEVICE_ID = 'emulator-5554'
# Optional when app.json contains expo.android.package
$env:RN_OBSERVER_APP_ID = 'com.example.app'
pnpm rn-observe launch
pnpm rn-observe observe
pnpm rn-observe understand-screen
pnpm rn-observe ui-model
pnpm rn-observe tap --test-id buy-button
pnpm rn-observe performance
pnpm rn-observe diagnoseArtifacts and SQLite data are created under <projectRoot>/.artifacts/; large binaries are never embedded in MCP responses.
Deterministic demo
pnpm --filter @rn-agent-observer/demo-expo android -- --device <device-name>The demo ships PerformanceLab, NetworkLab, RenderLab, AnimationLab, ErrorLab, and VisualLab. NetworkLab uses internal fixtures (0/500/2000ms and HTTP 503) so it never depends on Internet services. PerformanceLab reports its intentional 100ms long JS task precisely through instrumentation.
MCP
pnpm mcp:check
pnpm mcp:startThe server speaks stdio. Client configuration and the full list of 45 tools are documented in docs/protocol.md.
Documentation
AI agent integration
Three ways for agents (OpenCode/Claude Code/Cursor/Codex...) to use the observer:
1. MCP server (recommended — structured tools)
{
"mcpServers": {
"rn-agent-observer": {
"command": "node",
"args": [
"C:\\abs\\rn-agent-observer\\packages\\mcp-server\\dist\\server.js"
],
"env": {
"RN_OBSERVER_PROJECT_ROOT": "C:\\path\\to\\expo-app",
"RN_OBSERVER_DEVICE_ID": "emulator-5554"
}
}
}
}2. Install as a skill (teaches the agent the debugging workflow via CLI)
npx skills add GinzaTech/rn-agent-observerThe skill lives at skills/rn-agent-observer/SKILL.md — it teaches the observe -> understand-screen -> reproduce -> diagnose -> fix -> understand-screen -> compare loop, how to read metrics honestly, and common failure recovery. After installing, just say "app X feels laggy" and the agent knows to reach for rn-observe.
3. AGENTS.md (when the agent works inside this repo) — already present at the repo root; agents read it automatically.
All three can be combined: the skill/AGENTS.md teach the workflow, MCP provides directly callable tools.
Current boundary
Android/Windows is the only supported target of Observer 2.4.0.
ADB has no trustworthy JS FPS signal; the field is returned as
available: false— values are never guessed.JS blocking, route, React renders, and network metadata require development instrumentation inside the app.
CDP features (
devtools-export,devtools-profile,metro-network) need Metro running for the right app and the app connected to it (adb reverse tcp:8081 tcp:8081); they cannot attach while another React Native DevTools session holds the connection.reload --fastuses CDP Page.reload (JS-only) and automatically falls back to force-stop when Metro is unavailable.Observer CDP commands queue across processes; external React Native DevTools must still be closed because it does not participate in the observer lock.
session stopautomatically writes a replay, session refs survive reorder/scroll, and missing sessions produceEVIDENCE_NOT_RECORDED.understand-screen/MCPunderstand_screenreturns the instrumented route when available, screen state, headline, text/action refs, UI findings, and screenshot/UI-tree evidence; repeated calls detect unchanged loading. Classification is heuristic and text-field values are always redacted.ui-model/MCPruntime_ui_modelparses TSX with the TypeScript AST for component +file:line, then correlates source with instrumentation and the native tree. It distinguishes rendered, visible/off-screen/hidden/unmounted/flattened-or-unobserved, enabled, and evidence-backedcanPressstates.The development-only Babel plugin injects a source-derived testID and wraps
onPress; session stop collects interaction start/success/error and promotes testID taps into replay. Handler arguments, props, and input values are never recorded.Network body capture is off by default. Development-only opt-in uses fail-closed allowlists and should still be limited to fixtures.
Apps without instrumentation: use
metro-network(CDP),app-state(foreground activity, PID), anddevice-network(device-level byte counters, not app-attributed) as fallback evidence.record(screenrecord) is limited to 180s per clip by Android.Perfetto tracing is supported on Android; deep trace analysis remains in Perfetto UI/Android Studio.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceThis MCP server enables real-time debugging and inspection of running React Native apps, providing access to console logs, errors, network requests, navigation state, storage, and performance profiling.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables automation and monitoring of React Native apps by providing tools to tap, swipe, screenshot, inspect component state, profile renders, and mock network requests via MCP.86MIT
- AlicenseNot gradedqualityAmaintenanceA plugin-based MCP server for React Native runtime debugging, inspection, and automation via Chrome DevTools Protocol. Works with Expo, bare React Native, and any Metro + Hermes project without app code changes.1,04475MIT
- FlicenseNot gradedqualityAmaintenanceMCP server that provides AI coding agents real Android development tools—Gradle, adb, logcat, lint, crash triage—through a local, permissioned interface. Enables agents to inspect projects, run safe Gradle tasks, capture logs/screenshots, and triage crashes.2
Related MCP Connectors
Remote MCP for Android CLI agent build gate, structured receipts, audit logs, and reviewer-ready evi
Remote MCP for AI Studio Android release gate MCP, structured receipts, audit logs, and reviewer-rea
Live browser debugging for AI assistants — DOM, console, network via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/GinzaTech/rn-agent-observer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server