rn-debug-mcp

v0.1.5
rn-debug-mcp Checked 2 days ago Published 9 months ago

RN Debug MCP server

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

connect_app

Connect to a running React Native app session on Android emulator or iOS simulator and start log collection.

ParameterTypeDescription
deviceIdstring
metroPortinteger
platformstring

get_connection_status

Get current RN Inspector MCP session status and log buffer state.

ParameterTypeDescription
sessionIdstring

disconnect_app

Disconnect the active React Native app session.

ParameterTypeDescription
sessionIdstring

list_sessions

List all active MCP device sessions.

set_active_session

Set the active session used when sessionId is omitted.

ParameterTypeDescription
sessionId *string

close_session

Close a specific session by sessionId.

ParameterTypeDescription
sessionId *string

reload_app

Reload the active app session via Metro, with ADB fallback.

ParameterTypeDescription
sessionIdstring

get_logs

Read buffered non-error logs using cursor-based pagination.

ParameterTypeDescription
levelsarray
limitinteger
sessionIdstring
sinceCursorinteger
sourcesarray
tagsarray

get_errors

Read buffered error and fatal logs using cursor-based pagination.

ParameterTypeDescription
levelsarray
limitinteger
sessionIdstring
sinceCursorinteger
sourcesarray
tagsarray

get_network_requests

Read buffered network request/response/error events using cursor-based pagination.

ParameterTypeDescription
limitinteger
methodsarray
phasesarray
sessionIdstring
sinceCursorinteger
sourcesarray
statusesarray
urlContainsstring

get_screen_context

Get inferred current Android screen context for remediation guidance. Use after testID lookup fails.

ParameterTypeDescription
sessionIdstring

get_test_id_remediation_plan

Build deterministic patch/remediation guidance when a desired testID is missing. Recommended flow: get_screen_test_ids -> get_elements_by_test_id (exact/contains) -> this tool -> reload_app -> retry lookup.

ParameterTypeDescription
desiredAction *string
desiredTestIdstring
matchModestring
sessionIdstring

get_ui_tree

Read the current accessibility hierarchy from Android UIAutomator or iOS WDA.

ParameterTypeDescription
maxDepthinteger
maxNodesinteger
sessionIdstring

get_visible_elements

Return flattened visible accessibility elements derived from the current UI tree. Use as fallback discovery after testID-first lookup.

ParameterTypeDescription
clickableOnlyboolean
includeTextlessboolean
limitinteger
maxDepthinteger
maxNodesinteger
sessionIdstring
skipVisibilityCheckboolean
testIdstring
testIdMatchstring

get_screen_test_ids

List testIDs present on the current screen with metadata. Start UI interaction flows with this tool before get_elements_by_test_id.

ParameterTypeDescription
includeInvisibleboolean
includeNonClickableboolean
limitinteger
maxDepthinteger
maxNodesinteger
sessionIdstring

get_elements_by_test_id

Find visible elements matching a React Native testID. Use exact first, then contains. If none, call get_screen_context + get_test_id_remediation_plan.

ParameterTypeDescription
testId *string
clickableOnlyboolean
includeTextlessboolean
limitinteger
maxDepthinteger
maxNodesinteger
sessionIdstring
skipVisibilityCheckboolean
testIdMatchstring

tap

Tap the screen at absolute coordinates. Final fallback only when testID and element-based targeting fail.

ParameterTypeDescription
x *integer
y *integer
sessionIdstring

type_text

Type text into the currently focused input field, with optional submit/enter key press.

ParameterTypeDescription
text *string
sessionIdstring
submitboolean

press_back

Trigger back navigation on the current platform.

ParameterTypeDescription
sessionIdstring

scroll

Scroll screen content in a direction via swipe gesture.

ParameterTypeDescription
direction *string
distanceRationumber
durationMsinteger
sessionIdstring

tap_element

Tap a visible element by element id from get_visible_elements/get_ui_tree. Preferred fallback before coordinate tapping.

ParameterTypeDescription
elementId *string
maxDepthinteger
maxNodesinteger
sessionIdstring

take_screenshot

Capture a screenshot from the connected device.

ParameterTypeDescription
sessionIdstring