react-native-mcp-server
v0.1.0-rc.14MCP server for React Native app automation and monitoring
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
evaluate_script
Run JS in React Native app context (not WebView). Returns JSON result. For WebView JS, use webview_evaluate_script. Use measureView(uid) for coords.
| Parameter | Type | Description |
|---|---|---|
function * | string | JS function string. E.g. "() => measureView(uid)". require() not available. |
args | array | Arguments array for the function. |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
platform | string | Target platform. Auto when single device of that platform. |
take_snapshot
Capture component tree. Compact text output. uid = testID or path for tap/swipe. Use interactive=true for minimal token usage.
| Parameter | Type | Description |
|---|---|---|
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
interactive | boolean | If true, show only interactive elements (Touchable, Button, TextInput, Switch, etc.). |
maxDepth | integer | Max tree depth. Default 30. |
platform | string | Target platform. Auto when single device of that platform. |
take_screenshot
Capture device screen as JPEG. EXPENSIVE: consumes large image tokens. Prefer text-based tools first: query_selector/assert_text for native UI, webview_evaluate_script for WebView DOM. Use screenshot only when visual layout check is needed or text tools cannot verify the state. After one screenshot, switch back to text-based tools.
| Parameter | Type | Description |
|---|---|---|
platform * | string | android: adb. ios: simctl (simulator only). |
filePath | string | Path to save screenshot. |
accessibility_audit
Run accessibility audit on component tree. Returns violations with rule, selector, and severity.
| Parameter | Type | Description |
|---|---|---|
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
maxDepth | integer | Max tree depth. Default 999. |
platform | string | Target platform. Auto when single device of that platform. |
webview_evaluate_script
Run JS inside a WebView (DOM query, click, read text, etc). Use this instead of tap for any WebView content — tap cannot target DOM elements. Get webViewId via evaluate_script with getRegisteredWebViewIds().
| Parameter | Type | Description |
|---|---|---|
script * | string | JS to run in WebView (DOM query, click, etc). Must evaluate to value for result. |
webViewId * | string | WebView id. Use evaluate_script getRegisteredWebViewIds() to discover. |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
platform | string | Target platform. Auto when single device of that platform. |
type_text
Type text into TextInput by uid (from query_selector). Supports Unicode. Use instead of input_text for non-ASCII.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to type. |
uid * | string | testID or path of TextInput. Get from query_selector first. |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
platform | string | Target platform. Auto when single device of that platform. |
query_selector
Find first RN element matching selector. Returns uid, type, and position (pageX, pageY, width, height) in points — use these coordinates directly with tap. For WebView inner elements, use webview_evaluate_script instead.
| Parameter | Type | Description |
|---|---|---|
selector * | string | Selector for RN Fiber tree. Read resource docs://guides/query-selector-syntax for full syntax (type, #testID, :text, hierarchy, etc.). |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
platform | string | Target platform. Auto when single device of that platform. |
query_selector_all
Find all RN elements matching selector. Returns array with positions (pageX, pageY, width, height) in points. Use query_selector for single element.
| Parameter | Type | Description |
|---|---|---|
selector * | string | Selector for RN Fiber tree. Read resource docs://guides/query-selector-syntax for full syntax (type, #testID, :text, hierarchy, etc.). |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
platform | string | Target platform. Auto when single device of that platform. |
get_component_source
Get source file location (file, line, column) for a component. Use selector or uid from take_snapshot.
| Parameter | Type | Description |
|---|---|---|
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
platform | string | Target platform. Auto when single device of that platform. |
selector | string | Selector to find the component. If omitted, uid is required. |
uid | string | uid from take_snapshot (testID or path like "0.1.2"). If omitted, selector is required. |
assert_text
Assert text exists on screen. Supports polling via timeoutMs.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text substring to assert exists on screen |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
intervalMs | number | Poll interval ms. Used only when timeoutMs > 0. |
platform | string | Target platform. Auto when single device of that platform. |
selector | string | Optional selector to narrow scope. |
timeoutMs | number | Max wait ms. 0 = single check; >0 = poll until pass or timeout. |
assert_visible
Assert element matching selector is visible. Supports polling via timeoutMs.
| Parameter | Type | Description |
|---|---|---|
selector * | string | Selector to check visibility. |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
intervalMs | number | Poll interval ms. Used only when timeoutMs > 0. |
platform | string | Target platform. Auto when single device of that platform. |
timeoutMs | number | Max wait ms. 0 = single check; >0 = poll until pass or timeout. |
assert_not_visible
Assert element matching selector is NOT visible. Supports polling via timeoutMs.
| Parameter | Type | Description |
|---|---|---|
selector * | string | Selector of element that must not be visible. |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
intervalMs | number | Poll interval ms. Used only when timeoutMs > 0. |
platform | string | Target platform. Auto when single device of that platform. |
timeoutMs | number | Max wait ms. 0 = single check; >0 = poll until pass or timeout. |
assert_element_count
Assert element count matching selector. Use expectedCount or minCount/maxCount range.
| Parameter | Type | Description |
|---|---|---|
selector * | string | Selector to count matching elements. |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
expectedCount | number | Exact count. Mutually exclusive with min/maxCount. |
intervalMs | number | Poll interval ms. Used only when timeoutMs > 0. |
maxCount | number | Max count (inclusive). |
minCount | number | Min count (inclusive). |
platform | string | Target platform. Auto when single device of that platform. |
timeoutMs | number | Max wait ms. 0 = single check; >0 = poll until pass or timeout. |
get_debugger_status
MCP connection status. appConnected, devices list (deviceId, platform). Call first to see connected devices.
| Parameter | Type | Description |
|---|---|---|
deviceId | string | Target device for topInsetDp override. |
topInsetDp | number | Set Android top inset override (dp). Overrides ADB auto-detect. Persists for the connection. |
list_console_messages
List captured console logs. Filter by level, since, limit. Levels: log, info, warn, error.
| Parameter | Type | Description |
|---|---|---|
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
level | string | Filter by level. Omit for all. |
limit | number | Max logs. Default 100. |
platform | string | Target platform. Auto when single device of that platform. |
since | number | Only logs after timestamp (ms). |
list_network_requests
List captured network requests. Filter by url, method, status, since, limit.
| Parameter | Type | Description |
|---|---|---|
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
limit | number | Max requests. Default 50. |
method | string | HTTP method filter. |
platform | string | Target platform. Auto when single device of that platform. |
since | number | Only requests after timestamp (ms). |
status | number | Status code filter. |
url | string | URL substring filter. |
clear
Clear one buffer: console logs, network requests, network mocks, state changes, or render profile. Use target param. App data reset is clear_state.
| Parameter | Type | Description |
|---|---|---|
target * | string | Which buffer to clear: console logs, network requests, network mocks, state changes, or render profile data. |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
platform | string | Target platform. Auto when single device of that platform. |
tap
Tap at (x,y) in points. Get coordinates from query_selector (pageX/pageY). For WebView DOM elements, use webview_evaluate_script instead. Long press via duration param.
| Parameter | Type | Description |
|---|---|---|
platform * | string | ios or android. |
x * | number | X in points (dp). Pixels auto on Android. |
y * | number | Y in points (dp). Pixels auto on Android. |
deviceId | string | Device ID. Auto if single. list_devices to find. |
duration | number | Hold ms for long press. Omit for tap. |
iosOrientation | number | iOS orientation 1-4. Portrait=1,2; Landscape=3,4. Skips auto-detect. |
swipe
Swipe from (x1,y1) to (x2,y2) in points. Get coordinates from query_selector. For scrolling and drawers.
| Parameter | Type | Description |
|---|---|---|
platform * | string | Target platform. |
x1 * | number | Start X in points (dp). Auto-converted to pixels on Android. |
x2 * | number | End X in points (dp). Auto-converted to pixels on Android. |
y1 * | number | Start Y in points (dp). Auto-converted to pixels on Android. |
y2 * | number | End Y in points (dp). Auto-converted to pixels on Android. |
deviceId | string | Device ID. Auto if single. list_devices to find. |
duration | number | Swipe duration ms. Default 300. |
iosOrientation | number | iOS orientation 1-4. Skips auto-detect. |
input_text
Type into focused input. ASCII only. Use type_text for Korean/Unicode.
| Parameter | Type | Description |
|---|---|---|
platform * | string | Target platform. |
text * | string | Text to type. ASCII only. Use type_text for Unicode. |
deviceId | string | Device ID. Auto if single. list_devices to find. |
input_key
Send key event to device (Return, Backspace, ENTER, BACK, etc.).
| Parameter | Type | Description |
|---|---|---|
keycode * | number | Keycode. iOS: 40=Return, 42=Backspace, 44=Space, 41=Escape. Android: 4=BACK, 66=ENTER, 67=DEL. |
platform * | string | Target platform. |
deviceId | string | Device ID. Auto if single. list_devices to find. |
press_button
Press hardware button (HOME, BACK, LOCK, VOLUME, etc.).
| Parameter | Type | Description |
|---|---|---|
button * | string | Android: HOME, BACK, MENU, APP_SWITCH, POWER, VOLUME_UP/DOWN, ENTER, DEL. iOS: HOME, LOCK, SIDE_BUTTON. |
platform * | string | Target platform. |
deviceId | string | Device ID. Auto if single. list_devices to find. |
duration | number | Hold seconds. iOS only. |
describe_ui
Query native UI/accessibility tree. Large payload. Cannot see inside WebView content. Prefer query_selector for RN elements, webview_evaluate_script for WebView DOM.
| Parameter | Type | Description |
|---|---|---|
platform * | string | Target platform. |
deviceId | string | Device ID. Auto if single. list_devices to find. |
mode | string | iOS: "all" or "point" at (x,y). Android: ignored. |
nested | boolean | iOS: hierarchical tree. Android: ignored. |
x | number | X in points. iOS, required for mode=point. |
y | number | Y in points. iOS, required for mode=point. |
file_push
Push local file to device. iOS requires bundleId.
| Parameter | Type | Description |
|---|---|---|
localPath * | string | Absolute path to the local file to push. |
platform * | string | Target platform. |
remotePath * | string | Destination. iOS: in app container. Android: e.g. /sdcard/Download/file.txt. |
bundleId | string | Bundle ID. iOS only, required. |
deviceId | string | Device ID. Auto if single. list_devices to find. |
add_media
Add images/videos to simulator photo library or device gallery.
| Parameter | Type | Description |
|---|---|---|
filePaths * | array | Absolute paths to images/videos for gallery. |
platform * | string | Target platform. |
deviceId | string | Device ID. Auto if single. list_devices to find. |
list_devices
List connected simulators/devices. Returns deviceId, state, model. Use for other tools.
| Parameter | Type | Description |
|---|---|---|
platform * | string | ios: idb simulators. android: adb devices. |
list_apps
List installed apps. No app connection required. Returns bundle IDs or package names.
| Parameter | Type | Description |
|---|---|---|
platform * | string | Target platform. list_devices for deviceId. |
deviceId | string | Optional. iOS: UDID. Android: serial. Auto if single device. |
terminate_app
Terminate app by bundle ID or package name. No app connection required.
| Parameter | Type | Description |
|---|---|---|
appId * | string | iOS bundle ID or Android package name (e.g. com.example.app). Use list_apps to find IDs. |
platform * | string | Target platform. |
deviceId | string | Optional. iOS: UDID. Android: serial. Auto if single device. |
get_orientation
Get current device orientation (portrait/landscape). No app connection required.
| Parameter | Type | Description |
|---|---|---|
platform * | string | Target platform. |
deviceId | string | Optional. iOS: UDID. Android: serial. Auto if single device. |
set_orientation
Set device orientation to portrait or landscape. iOS: simulator only.
| Parameter | Type | Description |
|---|---|---|
orientation * | string | Desired orientation. Android: 0 or 1. iOS: one rotation toggles. |
platform * | string | Target platform. |
deviceId | string | Optional. iOS: UDID. Android: serial. Auto if single device. |
get_screen_size
Get screen size (width/height in px). iOS requires app connection.
| Parameter | Type | Description |
|---|---|---|
platform * | string | Target platform. |
deviceId | string | Optional. iOS: UDID. Android: serial. Auto if single device. |
switch_keyboard
Switch keyboard language on simulator/emulator. Use before input_text for correct layout.
| Parameter | Type | Description |
|---|---|---|
action * | string | list: available keyboards. get: current. switch: toggle (iOS) or set IME (Android). |
platform * | string | Target platform. |
keyboard_id | string | Android switch only. IME ID. Use action=list to see IDs. |
open_deeplink
Open deep link on simulator/device. Navigate to screens via URL scheme.
| Parameter | Type | Description |
|---|---|---|
platform * | string | Target platform. |
url * | string | Deep link URL (e.g. myapp://product/123). |
deviceId | string | Device ID. Auto if single. list_devices to find. |
clear_state
Clear app data (Android) or reset permissions (iOS). iOS full reset needs uninstall+reinstall.
| Parameter | Type | Description |
|---|---|---|
appId * | string | Bundle ID (iOS) or package name (Android). |
platform * | string | Target platform. |
deviceId | string | Optional. iOS: UDID. Android: serial. Auto if single device. |
set_location
Set GPS on iOS simulator or Android emulator. Android: emulator only.
| Parameter | Type | Description |
|---|---|---|
latitude * | number | Latitude (-90–90). |
longitude * | number | Longitude (-180–180). |
platform * | string | Target platform. |
deviceId | string | Optional. iOS: UDID. Android: serial. Auto if single device. |
scroll_until_visible
Scroll until RN element matching selector becomes visible. For long lists and off-screen elements. After scrolling, use query_selector to get the element position for tap.
| Parameter | Type | Description |
|---|---|---|
platform * | string | Target platform. |
selector * | string | Selector of element to find. |
deviceId | string | Device ID. Auto if single. |
direction | string | Scroll direction. Default "down". |
iosOrientation | number | iOS orientation 1-4. Skips auto-detect. |
maxScrolls | number | Max scroll attempts. Default 10. |
scrollableSelector | string | Selector for scroll container. Omit to use center. |
inspect_state
Inspect React state hooks by selector. Works with useState, Zustand, etc.
| Parameter | Type | Description |
|---|---|---|
selector * | string | Selector for component (e.g. CartScreen, #cart-view). |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
platform | string | Target platform. Auto when single device of that platform. |
get_state_changes
List captured state changes. Filter by component, since, limit.
| Parameter | Type | Description |
|---|---|---|
component | string | Filter by component name. Omit for all. |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
limit | number | Max changes to return. Default 100. |
platform | string | Target platform. Auto when single device of that platform. |
since | number | Only changes after timestamp (ms). |
assert_state
Assert React state hook value matches expected. Use with selector and hookIndex.
| Parameter | Type | Description |
|---|---|---|
expected * | Expected value. Number, string, boolean, or JSON object/array. | |
selector * | string | Selector for component (e.g. #cart-view, CartScreen). |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
hookIndex | integer | Zero-based hook index. Default 0. |
path | string | Dot-notation path into hook value (e.g. "items.length"). Omit to compare whole value. |
platform | string | Target platform. Auto when single device of that platform. |
set_network_mock
Add network mock. Matching XHR/fetch return mock without hitting network.
| Parameter | Type | Description |
|---|---|---|
urlPattern * | string | URL pattern (substring or regex). |
body | string | Mock body. |
delay | number | Delay ms before mock. |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
headers | object | Mock headers. |
isRegex | boolean | urlPattern is regex. |
method | string | HTTP method. Omit to match all. |
platform | string | Target platform. Auto when single device of that platform. |
status | number | Mock status. Default 200. |
statusText | string | Mock status text. |
list_network_mocks
List all active network mock rules.
| Parameter | Type | Description |
|---|---|---|
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
platform | string | Target platform. Auto when single device of that platform. |
remove_network_mock
Remove a specific network mock rule by ID.
| Parameter | Type | Description |
|---|---|---|
id * | number | Mock rule ID to remove. |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
platform | string | Target platform. Auto when single device of that platform. |
visual_compare
Visual regression: capture current screen (or crop by selector), pixel-diff against baseline PNG; use to verify UI didn’t change or to update baseline.
| Parameter | Type | Description |
|---|---|---|
baseline * | string | Absolute path to baseline PNG file. |
platform * | string | Target platform. |
deviceId | string | |
saveCurrent | string | Path to save current screenshot PNG. |
saveDiff | string | Path to save diff image PNG. |
selector | string | CSS-like selector to crop a specific element. If omitted, compares full screen. |
threshold | number | pixelmatch threshold (0~1). Default 0.1. |
updateBaseline | boolean | If true, save current screenshot as new baseline and skip comparison. |
start_render_profile
Start render profiling. Tracks mounts, re-renders, and unnecessary renders.
| Parameter | Type | Description |
|---|---|---|
components | array | Whitelist: track only these components. Overrides ignore. |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
ignore | array | Blacklist: skip these components (added to default ignore list). Ignored when components is set. |
platform | string | Target platform. Auto when single device of that platform. |
get_render_report
Get render profile report. Shows hot components, unnecessary renders, and trigger analysis.
| Parameter | Type | Description |
|---|---|---|
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
platform | string | Target platform. Auto when single device of that platform. |
start_render_highlight
Show visual re-render overlay on device. Highlights re-rendering components with count badges.
| Parameter | Type | Description |
|---|---|---|
components | array | Whitelist: highlight only these components. Overrides ignore. |
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
fadeTimeout | number | Milliseconds before highlights fade out. Default: 500 (react-scan native align). |
ignore | array | Blacklist: skip these components (added to default ignore list). |
maxHighlights | number | Maximum simultaneous highlights on screen. Default: 100. |
platform | string | Target platform. Auto when single device of that platform. |
showLabels | boolean | Show component name labels on each highlight rect. Default: false. |
stop_render_highlight
Stop React component render overlay. Removes highlight rects and resets counts.
| Parameter | Type | Description |
|---|---|---|
deviceId | string | Target device ID. Auto if single device. Use get_debugger_status to list. |
platform | string | Target platform. Auto when single device of that platform. |
start_video_recording
Start screen recording. Call stop_video_recording to save.
| Parameter | Type | Description |
|---|---|---|
filePath * | string | Host path to save the recording (must be under e2e-artifacts or cwd). |
platform * | string | ios or android. |
deviceId | string | Device ID. iOS: udid, Android: serial. Omit for single device. |
stop_video_recording
Stop the current screen recording and return the saved file path.
| Parameter | Type | Description |
|---|---|---|
platform | string | Platform to stop. Omit when only one recording. |