expo-headless-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| EXPO_MCP_ADB | No | Optional path to a specific adb executable. | |
| EXPO_PROJECT | Yes | Path to the Expo / React Native app project. | |
| EXPO_MCP_METRO_CMD | No | Optional override for the command used to start the Expo dev server. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
You can see and operate the user's Expo / React Native app through this server (headless render, no emulator).
MANDATORY WORKFLOW whenever you add or change app code (a new feature, screen, button, form, bug fix, refactor):
refresh_screen to rebuild and look at the result. Read the screenshot AND the "Layout warnings" and "App console" text.
Exercise the new/changed behaviour yourself: click_screen every new control, type_text into every new field (valid, empty, too short, too long, special characters), scroll_screen to reach content below the fold, answer Alerts with click_screen target "alert:".
Run auto_test to monkey-test the whole app for crashes, console errors, layout overlaps, clipped text and dead buttons. Also use describe_screen when you need exact coordinates or a text outline.
If anything is wrong (wrong text, overlap, off-screen element, crash, console error, button that does nothing), fix the code, then go back to step 1 and verify again. Repeat until a full pass is clean.
After the final fix, re-check the features you did NOT touch (auto_test covers this) to catch regressions. Never report a feature as done without having seen it work on screen. State resets on every refresh_screen, so re-do the steps (e.g. type the form again) after each rebuild. Multilingual: test with several languages and scripts (e.g. Cyrillic, CJK, Arabic/Hebrew RTL, emoji, long German words) because translated text is a common cause of overflow and clipping; auto_test already does this for text inputs. Always answer the user in the language they write in. REAL DEVICE MODE (optional; Android emulator or USB phone via adb on Windows/macOS/Linux, and booted iOS Simulators on macOS with idb; physical iPhones are not supported): only use it when the user asks for testing on a real device/emulator. Call device_list first.
If nothing is connected (or adb is missing), say so plainly, change nothing, recommend that the user check the app themselves on their phone/emulator, and offer headless testing instead. Do not try workarounds.
If USB debugging is off or not authorized, tell the user how to enable it (device_list gives the steps) and warn them BEFORE you start that you will be tapping, typing and scrolling on their phone.
Then call use_target with target="device". It asks the user for consent before controlling a physical phone, before installing Expo Go (when it is missing), and before replacing an Expo Go that does not match the project's SDK. If the user declines, do nothing more and never retry. If a tool asks you to relay a question to the user, ask it verbatim and only continue if they agree.
On a device only click_screen / type_text / scroll_screen / describe_screen / press_key / refresh_screen work, and only inside Expo Go. auto_test is headless-only (it taps everything, which is unsafe on a real phone). Non-ASCII text cannot be typed on a device: test other languages in headless mode.
Call use_target with target="headless" when done (it also stops the dev server). Limits: this is an approximate renderer (fonts/shadows/animations differ from a device; expo-router/react-navigation are not supported). Say so if a problem might be a renderer artefact.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| refresh_screenA | Bundles the Expo / React Native project (no emulator, phone or browser), renders it headlessly and returns a PNG screenshot of the screen. Call first; call again after editing code (re-bundles and restarts the app). Pass reload=false to just re-capture the current state. |
| click_screenA | Taps the screen at (x, y) in screen dp coordinates, or an element by "target" (testID, accessibilityLabel, or visible text). Fires onPress of the nearest pressable, focuses TextInputs, then returns a new screenshot. Use target "alert:" to answer an Alert. |
| type_textA | Types text into a TextInput (replacing its value unless append=true) so forms and validation can be tested. Locate the field by "target" (testID, placeholder, accessibilityLabel, current value), by x/y, or omit both to use the focused field. Returns a new screenshot. |
| scroll_screenA | Scrolls the ScrollView/FlatList under (x, y) by dy (vertical) or dx (horizontal) dp; positive dy scrolls down. Returns a new screenshot. |
| describe_screenA | Text outline of the current screen: every text, input, image and pressable with its position, size and tap-center, plus detected layout problems (overlaps, clipped text, off-screen elements). No image. |
| auto_testA | Automatically exercises the whole app: reloads it several times, fills every TextInput with different data (empty, invalid, valid, very long, special characters), taps every button/switch (scrolling to reach them), dismisses alerts, and reports crashes, console errors/warnings, layout problems (overlaps, clipped text, off-screen elements) and buttons that do nothing, with screenshots of problems. Run it after every change, then fix what it reports and run it again. |
| device_listA | Lists connected Android emulators / USB phones (adb) and booted iOS Simulators (macOS only) and tells what, if anything, must be done before they can be used (USB debugging, authorization, idb). Read-only: changes nothing. If nothing is connected, tell the user and recommend they check the app themselves. Physical iPhones cannot be driven. |
| use_targetA | Chooses where the app is tested: "headless" (default, built-in renderer) or "device" (Expo Go on an Android emulator / USB phone via adb, or a booted iOS Simulator on macOS). Selecting "device" first asks the user for consent to control a physical phone, to install Expo Go if missing, and to replace an Expo Go whose SDK does not match the project; then starts the Expo dev server and opens the app. If the user declines, nothing is changed. |
| press_keyA | Device mode only: presses a hardware key inside Expo Go. Allowed: back (Android only), enter, tab, delete. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| verify_changes | Rebuild the app and verify that everything you just added or changed really works. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Each tool targets a distinct action: refresh (bundled screenshot), click, type, scroll, describe, press_key, auto_test, use_target, device_list. The only mild overlap is between auto_test and refresh_screen (both reload and capture) and between device_list and use_target (both deal with devices), but descriptions clearly delineate the read-only listing vs. target selection and the exhaustive automated pass vs. manual re-capture.
Eight of nine names use a verb_noun pattern with predictable suffixes (_screen, _text, _key) and a clear action-first style (refresh_screen, click_screen, scroll_screen, describe_screen). The outlier is device_list, which inverts to noun_verb and breaks the otherwise uniform convention.
Nine tools is well within the ideal 3-15 range and each earns its place: a coherent interaction loop (refresh/describe/click/type/scroll/press_key) plus higher-level automation (auto_test) and environment setup (use_target, device_list). No redundancy or padding.
The surface covers the essential test lifecycle: render, inspect, interact (tap/type/scroll/key), automate, and choose headless vs. device targets. Minor gaps remain—no drag/swipe/pinch gesture tool, no standalone console-log retrieval outside auto_test, and no explicit wait/idle primitive—but these are workaroundable.