Back to Marketplace
Metro MCP

Metro MCP

Installable
steve228uk
GitHubnpm

About

A plugin-based MCP server for React Native runtime debugging, inspection, and automation. Connects to Metro bundler via Chrome DevTools Protocol — no app code changes needed for most features.

Works with Expo, bare React Native, and any project using Metro + Hermes.


Requirements

  • Node.js 18+ or Bun 1.0+
  • iOS: Xcode 14+ with Simulator (xcrun simctl is used for most operations)
  • Android: Android SDK with adb on your PATH
  • IDB (optional): Some iOS operations fall back to IDB (idb-companion) — install with brew install idb-companion. Tools will tell you when IDB is needed.

How It Works

metro-mcp connects to your running Metro dev server the same way Chrome DevTools does:

  1. Discovers Metro via port scanning (8081, 8082, 19000–19002)
  2. Connects to Hermes via Chrome DevTools Protocol (CDP)
  3. Streams console logs, network requests, and errors into buffers
  4. Exposes everything as MCP tools, resources, and prompts

No app modifications required for core debugging features.


Features

PluginToolsDescription
console2Console log collection with filtering
network6Network request tracking, response body inspection, and stats
errors3Runtime exception collection + Metro bundle error detection
evaluate1Execute JavaScript in the app runtime
device4Device management, connection status, and app reload
environment4Build flags, platform constants, env vars, and Expo config inspection
source1Stack trace symbolication
redux3Redux state inspection and action dispatch
components5React component tree inspection
storage3AsyncStorage reading
simulator6iOS simulator / Android device control
deeplink2Cross-platform deep link testing
permissions5Inspect and manage app permissions on iOS Simulator and Android Emulator
ui-interact6UI automation (tap, swipe, type)
navigation4React Navigation / Expo Router state
accessibility3Accessibility auditing
commands2Custom app commands
automation3Wait/polling helpers for async state changes
profiler9CPU profiling (React DevTools hook) + heap sampling + render tracking
test-recorder7Record interactions and generate Appium, Maestro, or Detox tests
filesystem5Browse and read files in app sandbox directories (Documents, caches, SQLite DBs)
devtools1Open Chrome DevTools alongside the MCP via CDP proxy
debug-globals1Auto-discover Redux stores, Apollo Client, and other debug globals
inspect-point1Coordinate-based React component inspection (experimental)
statusline1Claude Code status bar integration

→ See the full tools reference.


Chrome DevTools

Hermes (the React Native JavaScript engine) only allows a single CDP debugger connection at a time. Since metro-mcp uses that connection, pressing "j" in Metro or tapping "Open Debugger" in the dev menu will steal the connection and disconnect the MCP.

metro-mcp solves this with a built-in CDP proxy that multiplexes the single Hermes connection, allowing Chrome DevTools and the MCP to work simultaneously.

Opening DevTools

Use the open_devtools MCP tool instead of the usual methods. It opens the same React Native DevTools frontend (rn_fusebox) that Metro uses, but routes the WebSocket connection through the proxy so both can coexist.

The tool automatically finds Chrome or Edge using the same detection as Metro and opens a standalone DevTools window.

What to avoid

MethodWhat happens
Pressing "j" in Metro terminalDisconnects the MCP
"Open Debugger" in the dev menuDisconnects the MCP
open_devtools MCP toolWorks alongside the MCP
0Installs
0Tools
0Resources
0Prompts

Categories

Debugging