# rn-devtools-hub > The agent runtime for React Native and Expo: a pure JavaScript SDK in the > app (inert in production, zero dependencies), a local hub (Bun or Node 20+, > a web dashboard, and a local MCP server. The SDK runs INSIDE the app's JS > runtime, so an agent perceives the UI as React sees it, gets the source file > and line behind each element, acts through the app's own props rather than > pixel coordinates, controls the clock and the network, and proves results > with assertions instead of screenshots. Dashboard panels: project context, > network, crashes, logs, storage, SQLite, React Query cache, screens, > uploads, remote actions, design, screen mirror. Key points to integrate the package into an app: - Install as a devDependency: `npm i -D rn-devtools-hub` (the hub runs on Bun or Node 20+, whichever is on the machine) - Start the hub from the host project root: `npx rn-devtools-hub` - In the app: `import { devtools } from "rn-devtools-hub/client"` in a glue file loaded via `if (__DEV__) require(...)` - API: init({serverUrl, appName, stableId}), emit, emitRaw, onCommand, attachAxios, wrapFetch, attachConsole, attachCrashReporting, startPerformanceSampler, registerAction, attachUiAutomation, markScreenReady, attachDeterminism, attachOriginTracking, registerStore, registerPreview, onPreviewChange - Two transports: streamable HTTP on 127.0.0.1:8973/mcp, or `npx rn-devtools-hub mcp` for stdio-only clients - Claude Code: `/plugin marketplace add rn-devtools-hub/rn-devtools-hub` installs the server plus a skill that teaches an agent to chain the tools - The events/commands contract of each panel is in docs/protocol.md: implementing it is enough to feed the dashboard - Security: dashboard token, secret redaction, read-only SQLite, MCP on localhost only ## Documentation - [README](https://github.com/rn-devtools-hub/rn-devtools-hub/blob/main/README.md): overview, quick start, feature table - [Integration guide](https://rn-devtools-hub.github.io/rn-devtools-hub/integration.html): step-by-step recipes per feature (network, cache, storage, SQLite, actions, mirror) - [Protocol](https://rn-devtools-hub.github.io/rn-devtools-hub/protocol.html): complete contract of events and commands between app, hub and dashboard - [AGENTS.md](https://github.com/rn-devtools-hub/rn-devtools-hub/blob/main/AGENTS.md): integration procedure for AI agents, known pitfalls, validation - [CONTRIBUTING](https://github.com/rn-devtools-hub/rn-devtools-hub/blob/main/CONTRIBUTING.md): architecture, invariants, conventional commits, release ## Optional - [MCP server](https://rn-devtools-hub.github.io/rn-devtools-hub/integration.html#mcp): tools list_devices, get_recent_network, get_crashes, query_sqlite, run_action, list_actions, get_ui_tree, query_ui, ui_act, get_events_since, wait_for_event, plus the native adapter (list_targets, set_permission, launch_app, screenshot_native, tap_native, set_location, send_push, session_start...) at http://127.0.0.1:8973/mcp