Metro MCP server
MCP server for React Native/Expo runtime debugging, inspection, and automation via Metro/CDP
81 stars432 downloads/wk
Reviews
Write oneNobody has reviewed Metro MCP yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Metro MCP tools (89, 4 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
add_recording_annotationAdd a human-readable annotation (comment marker) to the current recording.
app_lifecycleLaunch, terminate, install, or uninstall an app on the simulator/emulator.
audit_accessibilityAudit the current screen within bounded Fiber traversal limits. Checks labels, roles, testIDs, and alt text; returns issues, summary, and traversal coverage.
check_element_accessibilityCheck accessibility properties of a specific component by name or testID.
clear_console_logsClear the console log buffer.
clear_errorsClear the error buffer.
clear_network_requestsClear the network request buffer.
delete_filewrite actionDelete a file from the app sandbox.
dispatch_redux_actionDispatch a Redux action to the store.
evaluate_jswrite actionExecute a JavaScript expression in the running React Native app and return the result. Use this for inspecting variables, calling functions, or querying app state.
find_componentsSearch for components by name inside the app runtime. Check traversal.complete before treating no matches as definitive.
generate_test_from_recordingConvert the most recent recording into a test file.
generate_wdio_configGenerate a minimal but runnable wdio.conf.ts for Appium + React Native testing, along with the npm install command.
get_accessibility_summaryQuick overview: counts of elements with and without proper accessibility props.
get_all_storageDump all AsyncStorage key-value pairs.
get_app_directoriesGet known app sandbox directory paths (documents, cache, temp, library).
get_app_infoGet information about the connected React Native app (bundle URL, platform, device name).
get_build_infoReturn build-time and runtime flags for the running React Native app: __DEV__, platform, OS version, RN version, Hermes engine, New Architecture, and expo-application fields if available.
get_bundle_errorsGet recent Metro compilation/transform errors.
get_component_treeGet a paged flat React component tree. Follow nextCursor to complete the snapshot and check traversal.complete before treating an empty page as authoritative.
get_connection_statusCheck the connection status to Metro bundler.
get_console_logsGet recent console output. Filter by level or search text.
get_current_routeGet the currently focused route name and params.
get_env_varsReturn a filtered subset of process.env from the running app. Credential-like keys (SECRET, KEY, TOKEN, PASSWORD, etc.) are redacted by default. Use filter to search by key name substring.
get_errorsGet recent uncaught exceptions from the React Native app.
get_expo_configReturn expo-constants manifest/expoConfig fields if the app uses Expo, otherwise null.
get_file_infoGet file or directory metadata: size, modification date, and whether it is a directory.
get_flamegraphReturn the current profiling results as a human-readable text chart.
get_memory_infoGet current JavaScript heap memory usage from the running app.
get_native_logsGet native platform logs from iOS simulator (syslog) or Android device (logcat).
get_navigation_stateGet the full React Navigation / Expo Router state tree including current route, params, and stack history.
get_network_requestsGet recent network requests from the React Native app.
get_network_statsGet aggregated network statistics: breakdown by domain, status code, and response times.
get_platform_constantsReturn the full Platform.constants object from React Native, including OS-specific build details.
get_profile_statusCheck whether profiling is active, which mode is in use, and whether a previous profile is available.
get_react_rendersRead React render timing data collected via <Profiler onRender={trackRender}>.
get_redux_actionsGet recent Redux actions (requires metro-mcp client SDK for real-time tracking).
get_redux_stateGet the current Redux state tree or a specific slice. Works without client SDK if Redux DevTools extension is present or store is exposed globally.
get_request_detailsGet full details of a specific network request including headers and body.
get_response_bodyGet response body for a network request (cached if small; requires active session if large).
get_route_historyGet the navigation back stack / history.
get_screen_orientationGet the current screen orientation of the device.
get_storage_itemRead a specific AsyncStorage key value.
get_storage_keysList all AsyncStorage keys in the React Native app.
get_testable_elementsGet elements with testID or accessibilityLabel. Check traversal.complete before treating an empty elements array as definitive.
grant_permissionGrant a permission to the app on the connected iOS simulator or Android emulator.
hello_worldA sample tool — replace with your own logic
inspect_at_pointInspect the smallest measured host component at screen coordinates. Uses awaited Fabric/Paper measurement and returns traversal completeness metadata.
inspect_componentGet props, state, and hooks for the first exact component-name match, with traversal completeness metadata.
install_certificateInstall a root certificate on the iOS simulator or Android device.
list_commandsList all custom commands registered by the app. Commands are registered on global.__METRO_BRIDGE__.commands or global.__METRO_BRIDGE_COMMANDS__.
list_debug_globalsAuto-discover well-known global debugging objects (Redux stores, Apollo Client, Expo Router, React DevTools hook, etc.) available in the app runtime.
list_devicesList connected devices and debuggable targets from Metro bundler.
list_directoryList files and directories in an app sandbox path.
list_elementsGet labelled or interactive elements from the focused React screen. Check traversal.complete before treating an empty elements array as definitive.
list_permissionsList all app permission statuses on the connected iOS simulator or Android emulator. Returns compact text: one name=status line per permission.
list_routesList registered route names from available navigation state. Uninitialized nested navigators are not discoverable.
list_simulatorsList available iOS simulators or Android emulators.
list_test_recordingsList all previously saved test recordings in ~/.metro-mcp/recordings/.
list_url_schemesList URL schemes registered by an installed iOS app or Android package.
load_test_recordingLoad a previously saved recording from disk and make it available for test generation.
long_pressLong press using a React handler by label/testID, then semantic native input through SimView or IDB when the handler is unavailable. Explicit coordinates use native input directly; native results identify the backend and dispatch state.
open_app_settingsOpen the connected app's system settings page using React Native Linking.openSettings().
open_deeplinkOpen a URL or deep link on the connected iOS simulator or Android device.
open_devtoolsOpen the React Native DevTools debugger panel in Chrome. Connects through the CDP proxy so DevTools and the MCP can share the same Hermes connection.
press_buttonPress a device button (HOME, BACK, VOLUME_UP, etc.).
profile_actionProfile a specific JavaScript expression or code path in a single call.
read_fileRead the contents of a file from the app sandbox.
reload_appReload the connected app and verify a fresh runtime. Uses Page.reload, with a directed Metro message fallback only for a verified app/device peer.
reset_permissionsReset one or all permissions for the app on the connected iOS simulator or Android emulator. On iOS, omitting service resets all services. On Android, omitting service resets all runtime permissions.
revoke_permissionRevoke a permission from the app on the connected iOS simulator or Android emulator.
run_commandwrite actionExecute a custom command registered by the app. Pass parameters as a JSON object.
save_test_recordingSave the current recording events to disk as JSON so they can be reloaded later.
search_networkSearch network requests by URL pattern, method, or status code.
setup_statuslinewrite actionWrites the Metro CDP connection status script to ~/.claude/metro-mcp-statusline.sh.
start_heap_samplingStart Hermes heap allocation sampling via CDP HeapProfiler.
start_profilingStart profiling the running React Native app.
start_test_recordingInject interaction interceptors into the running app via the React fiber tree.
stop_heap_samplingStop heap allocation sampling and return the top allocation sites.
stop_profilingStop profiling and return an analysis of the captured data.
stop_test_recordingStop the active recording, retrieve all captured events, and store them for test generation.
swipeScroll through React, then use installed SimView or IDB on iOS and the selected ADB serial on Android. Native results identify the backend and dispatch state.
symbolicateSymbolicate a stack trace using Metro bundler source maps. Converts minified/bundled locations back to original source files.
take_screenshotCapture a screenshot from the connected iOS simulator or Android device.
tap_elementTap by label, testID, or logical device-point coordinates. Uses React handlers, then installed SimView or IDB on iOS and adb on Android. Coordinates use native input directly; native results identify the backend and dispatch state.
type_textType text into an input field. Targets a specific input by testID/label, or the first visible TextInput. Uses the React handler first, then SimView or IDB on iOS and the selected ADB serial on Android.
wait_for_conditionPoll a JavaScript expression in the app until it returns a truthy value, then return that value.
wait_for_elementPoll the component tree until an element matching the given testID or accessibilityLabel appears.
wait_for_navigationPoll the active navigation route until it matches the expected route name, then return.
Public scan report
scanner v0.1.9 · 2026-09-20 · same rubric, same numbers if you re-run it
- Code scan73 source files scanned13/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 16 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Findings (1)
- highShell command built from a string (injection risk)
exec.shell-concatdist/bin/metro-mcp.js: …allations.push(customChromePath); } execSync(`${LSREGISTER} -dump` + " | grep -i 'google…
What the publisher says
From the Metro MCP repository's README, as published. We do not edit it. Read it on GitHub
metro-mcp
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.
Contents
- Quick Start
- Requirements
- How It Works
- Features
- Chrome DevTools
- Claude Code Status Bar
- Test Recording
- App Integration
- Configuration
- Custom Plugins
- Compatibility
Quick Start
Claude Code
claude mcp add metro-mcp -- npx -y metro-mcp
# or with Bun
claude mcp add metro-mcp -- bunx metro-mcpCodex
codex mcp add metro-mcp -- npx -y metro-mcp
# or with Bun
codex mcp add metro-mcp -- bunx metro-mcpCodex stores MCP servers in ~/.codex/config.toml by default, and the Codex CLI and IDE extension share that configuration.
If you prefer to configure it manually:
[mcp_servers.metro-mcp]
command = "npx"
args = ["-y", "metro-mcp"]OpenCode
Run OpenCode's interactive MCP installer:
opencode mcp addChoose a local server, name it metro-mcp, and use npx -y metro-mcp as the command.
If you prefer to configure it manually, add this to opencode.json in your project, or to ~/.config/opencode/opencode.json for a global install:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"metro-mcp": {
"type": "local",
"command": ["npx", "-y", "metro-mcp"],
"enabled": true
}
}
}Or with Bun:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"metro-mcp": {
"type": "local",
"command": ["bunx", "metro-mcp"],
"enabled": true
}
}
}Cursor / VS Code
{
"mcpServers": {
"metro-mcp": {
"command": "npx",
"args": ["-y", "metro-mcp"]
}
}
}Or with Bun:
{
"mcpServers": {
"metro-mcp": {
"command": "bunx",
"args": ["metro-mcp"]
}
}
}Install across multiple agents
If you use several MCP clients, add-mcp can write the config for supported agents, including Claude Code, Codex, Cursor, OpenCode, and VS Code:
npx add-mcp metro-mcp --all -g -ymetro-mcp supports multiple agents at the same time. Standard stdio installs start or reuse a local shared daemon for the same project directory and Metro/config options, so Codex, Claude Code, Cursor, and other clients can connect concurrently to the same running Metro app and see the same logs, network requests, errors, and runtime state.
Shared HTTP server / Supergateway
If you want to expose one long-lived MCP endpoint yourself, start the shared server explicitly:
npx -y metro-mcp serve --mcp-port 8765This serves Streamable HTTP at http://127.0.0.1:8765/mcp. The endpoint supports both the 2025-era MCP handshake and the 2026-07-28 negotiation; /sse and /messages are intentionally unavailable. Tools such as supergateway can point at the Streamable HTTP endpoint instead of launching a fresh stdio process per request.
With custom Metro port
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Install directly
Runs npx -y metro-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add metro-mcp -- npx -y metro-mcp
Metro MCP: common questions
- Is Metro MCP server safe?
- Mostly: it is graded B (74/100). Read the Metro MCP safety report
- How do I install Metro MCP?
- It runs on your machine. Copy the Claude Code, Claude Desktop or Cursor config from the install section.
- Does Metro MCP need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Metro MCP maintained?
- The last commit was 16 days ago (2026-09-04). The latest release is v0.15.0.
- What can I use instead of Metro MCP?
- Servers from other publishers that do the same job: ExecBro MCP server.
Alternatives to Metro MCP
Same job from other publishers: the closest match first, then the best rated.
- ExecBroGives AI agents eyes and hands into running React Native apps: logs, REPL, tap, screenshotsnot reviewedEstablishedA