The Expo iOS Development MCP Server enables AI models to programmatically control iOS simulators, manage Expo/Metro development servers, and perform comprehensive UI automation and testing for Expo/React Native applications.
Simulator Management: List, boot, shutdown, and erase iOS simulator devices; capture screenshots with custom naming; record videos; stream real-time system logs.
Expo/Metro Control: Start/stop development server with optional cache clearing; check status and get bundle information; reload app; tail recent logs with configurable line count.
UI Automation (via Detox): Initialize and manage Detox sessions with health checks and session reuse; perform tap, long press, type, swipe, scroll, and key press actions; wait for elements with timeout control; assert element text and visibility; select elements by testID, text, or label.
Testing Workflows: Parse and run acceptance criteria from markdown files; execute test flows; perform visual regression testing with baseline screenshots and pixelmatch comparison; compare against design mockups (e.g., Figma); report missing testIDs for improved testability.
Flow Orchestration: Execute multi-step sequences of tool calls as macros with configurable error handling; chain actions for complex test scenarios; stop on error or continue through failures.
Debugging & Monitoring: Collect evidence for bugs; access real-time logs from simulator, Expo, and Detox; retrieve current server state; features concurrency control with lock manager and automatic retry with backoff for robustness.
Enables control of Expo development server and Metro bundler, including starting/stopping the server, checking status, tailing logs, and reloading the app.
Provides comprehensive control over iOS Simulator including booting/shutting down devices, factory resets, screenshot capture, video recording, log streaming, and UI automation via Detox for testing Expo/React Native applications.
Enables control of Metro bundler for React Native development, including server management and app reloading capabilities.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Expo iOS Development MCP Serverboot the iPhone 15 simulator and take a screenshot"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Expo iOS Development MCP Server
An MCP (Model Context Protocol) server that enables LLM tools like Claude Code, Cursor, and Codex to control iOS Simulator, Expo/Metro, and run UI automation via Detox.
Features
Simulator Control: Boot, shutdown, erase simulators via
simctlScreenshots & Video: Capture screenshots and record videos
Log Streaming: Real-time simulator log capture with ring buffer
Expo/Metro: Start/stop Expo development server
UI Automation: Execute Detox actions (tap, swipe, type, wait, assert)
Visual Regression: Screenshot comparison with pixelmatch
Acceptance Criteria Testing: Parse markdown criteria, run automated tests, report missing testIDs
Concurrency Control: Lock manager prevents conflicting operations
Retry with Backoff: Automatic retry for transient failures
Prerequisites
macOS with Xcode and Command Line Tools
Node.js 18+ (20+ recommended)
iOS Simulator available
An Expo/React Native project with Detox configured (for UI automation)
Quick Start
Configuration
Create mcp.config.json in the project root (see mcp.config.example.json):
MCP Client Configuration
Claude Code
Add to your Claude Code MCP settings:
Cursor
Add to ~/.cursor/mcp.json:
Available Tools
Simulator
Tool | Description |
| List all available iOS simulators |
| Boot a simulator device |
| Shut down a simulator |
| Factory reset a simulator |
| Take a screenshot |
| Start video recording |
| Stop video recording |
| Start log streaming |
| Stop log streaming |
Expo
Tool | Description |
| Start Expo/Metro server |
| Stop Expo/Metro server |
| Get Expo/Metro status |
| Get recent Expo logs |
| Reload the app |
Detox Session
Tool | Description |
| Initialize Detox session |
| Terminate Detox session |
| Verify Detox is ready |
UI Automation
Tool | Description |
| Tap an element |
| Long press an element |
| Type text into an input |
| Swipe gesture |
| Scroll in a direction |
| Press a keyboard key |
| Wait for element visibility |
| Assert element text content |
| Assert element is visible |
Visual Regression
Tool | Description |
| Save baseline screenshot |
| List saved baselines |
| Delete a baseline |
| Compare against baseline (uses pixelmatch) |
| Compare simulator screenshot against pasted Figma/design image |
Acceptance Criteria Testing
Tool | Description |
| Parse acceptance criteria markdown file into structured data |
| Run all acceptance tests with comprehensive reporting |
| Execute a specific test flow by name |
| Check a single criterion by ID or description match |
Flow
Tool | Description |
| Execute a sequence of tool calls |
Prompt Templates
The server provides discoverable prompt templates for common workflows:
Prompt | Description |
| Reproduce a bug and collect evidence |
| Perform visual regression testing |
| Test a complete user flow |
| Debug an app crash |
| Set up a fresh test session |
Resources
The server exposes these MCP resources:
resource://state- Current server state (simulator, expo, detox)resource://logs/simulator/latest- Recent simulator logsresource://logs/expo/latest- Recent Expo logsresource://logs/detox/latest- Recent Detox logsresource://artifacts/latest- Artifact manifest
Usage Guide
Getting Started
Once the MCP server is configured in your LLM client (Claude Code, Cursor, etc.), you can interact with it using natural language. The LLM will automatically invoke the appropriate tools.
Step 1: Set Up Your Development Session
Before running UI automation, you need to:
Boot the simulator - Start an iOS Simulator device
Start Expo - Launch the Metro bundler and load your app
Initialize Detox - Set up the Detox session for UI automation
Step 2: Develop and Test
With the session ready, you can:
Run UI interactions (tap, type, swipe)
Take screenshots at any point
Assert element states and text content
Record videos of interactions
Perform visual regression tests
Step 3: Debug Issues
When something goes wrong:
Check logs from Expo/Metro and simulator
Take screenshots to see current state
Use the debug prompts to investigate crashes
Example Prompts
Here are example prompts you can use with Claude Code, Cursor, or other MCP-enabled LLM tools during Expo app development:
Session Setup
Taking Screenshots
UI Automation - Navigation
UI Automation - Forms
UI Automation - Gestures
Assertions and Verification
Visual Regression Testing
Design Comparison (Figma to Implementation)
The MCP server supports comparing Figma design screenshots directly against the iOS Simulator. Simply copy and paste a Figma screenshot into your prompt!
Acceptance Criteria Testing
The acceptance criteria testing system allows you to write human-readable acceptance criteria in markdown and have them automatically tested against your app.
Writing Acceptance Criteria Files
Create a markdown file with checkbox items organized into sections:
Parsing Acceptance Criteria
Running Acceptance Tests
Running Specific Test Flows
Checking Individual Criteria
Understanding Test Results
The acceptance criteria runner produces detailed reports with:
Pass: Criterion was verified successfully
Fail: Criterion check failed (element not found, assertion failed)
Blocked: Cannot test because required testIDs are missing
When tests are blocked, the report includes a "Missing Requirements" section:
This helps developers add the necessary testIDs to make criteria testable.
Debugging and Logs
Complex Flows
Using Flow Runner
Expo Development
Cleanup
Common Workflows
Workflow 1: Daily Development Cycle
Workflow 2: Bug Reproduction
Workflow 3: Visual Regression Suite
Workflow 4: End-to-End Testing
Workflow 5: Design-Driven Development
Workflow 6: Acceptance Criteria Testing
Workflow 7: Continuous Acceptance Testing During Development
Tips for Effective Prompts
Use testIDs: Reference elements by their
testIDprop for reliable targetingTap the button with testID "submit-button"Be specific about selectors: Specify whether you're using id, text, or label
Tap the element with text "Continue" (not the testID)Chain actions clearly: Break complex flows into clear steps
First wait for the login screen, then fill the form, then tap submitRequest evidence: Ask for screenshots and logs when debugging
Take a screenshot before and after tapping the buttonUse flow.run for sequences: For repeatable test flows, use the flow runner
Execute this as a flow: tap login, type email, type password, tap submitWrite acceptance criteria in markdown: Use checkbox format for testable criteria
- [ ] Button with testID "submit-btn" is visible - [ ] Tapping "Login" navigates to home screenInclude test flows in acceptance criteria: Define step-by-step flows under
## Test Flows### Login Flow 1. Type "user@example.com" into `email-input` 2. Tap `submit-button`
Development
Architecture
The server is organized into modular subsystems:
Key Patterns
State Machine: Tracks simulator, Expo, and Detox states; UI commands require
simulator.booted + detox.readyDetox Micro-Tests: UI actions generate temporary Jest tests, run via Detox CLI, parse
[MCP_RESULT]markersError Taxonomy: LLM-friendly error codes with auto-populated remediation hints
Ring Buffer Logging: Per-source log retention (20,000 entries each)
Code Metrics
Metric | Value |
Total Files | 41 |
Total Lines | 8,574 |
Avg Complexity | 12.9 |
Code Consistency | 99% |
Circular Deps | 0 |
Documentation
Architecture Documentation - Detailed technical architecture with diagrams
Implementation Plan - Full implementation document with code examples
Author
Andrea Salvatore andreahaku@gmail.com
License
MIT