Skip to main content
Glama

Detox MCP

An MCP (Model Context Protocol) server for integrating the Detox mobile testing framework with Claude Code.

Features

  • Test Execution: Build and run Detox E2E tests with full options

  • Configuration Management: Read, validate, and generate Detox configurations

  • Code Generation: Generate test code, matchers, actions, and expectations

  • Device Management: List iOS simulators and Android emulators

  • Resources: Access configuration, devices, tests, and API reference

  • Prompts: Slash commands for common workflows

Related MCP server: Expo iOS Development MCP Server

Installation

npm install -g detox-mcp

Or install locally in your project:

npm install detox-mcp

Usage with Claude Code

Add to Claude Code

# Add globally
claude mcp add detox-mcp

# Or with npx
claude mcp add --transport stdio detox-mcp -- npx detox-mcp

Project Configuration

Create .mcp.json in your project root:

{
  "mcpServers": {
    "detox": {
      "command": "npx",
      "args": ["detox-mcp"],
      "env": {
        "DETOX_PROJECT_PATH": "/path/to/your/react-native/project"
      }
    }
  }
}

Available Tools

Test Execution

Tool

Description

detox_build

Build app for Detox testing

detox_test

Run E2E tests with full options

detox_init

Initialize Detox in a project

Configuration

Tool

Description

detox_read_config

Read and parse .detoxrc.js

detox_list_configurations

List available configurations

detox_validate_config

Validate configuration

detox_create_config

Generate new configuration

Code Generation

Tool

Description

detox_generate_test

Generate complete test file

detox_generate_matcher

Generate element matcher code

detox_generate_action

Generate action code

detox_generate_expectation

Generate expectation code

Devices

Tool

Description

detox_list_devices

List iOS simulators and Android emulators

Resources

Access contextual data via the resource URIs:

URI

Description

detox://config

Current Detox configuration

detox://devices

Available simulators/emulators

detox://tests

Test file listings

detox://api/matchers

Matchers API reference

detox://api/actions

Actions API reference

detox://api/expectations

Expectations API reference

detox://api/device

Device API reference

Prompts (Slash Commands)

Use these prompts in Claude Code for common workflows:

Prompt

Description

/detox-test

Run tests with smart defaults

/detox-generate

Generate test from description

/detox-setup

Initialize Detox in project

/detox-debug

Debug failing tests

Examples

Run Tests

Ask Claude: "Run my Detox tests on iOS simulator"

Claude will use detox_build and detox_test tools to execute your tests.

Generate Test Code

Ask Claude: "Generate a Detox test for the login flow"

Claude will use detox_generate_test to create test code.

Check Configuration

Ask Claude: "What Detox configurations are available?"

Claude will use detox_list_configurations to show available configs.

Requirements

  • Node.js 18+

  • Detox installed in your React Native project

  • For iOS: Xcode and applesimutils

  • For Android: Android SDK and emulator

Environment Variables

Variable

Description

Default

DETOX_PROJECT_PATH

Path to React Native project

Current directory

Development

# Clone the repo
git clone https://github.com/your-username/detox-mcp

# Install dependencies
npm install

# Build
npm run build

# Run in development
npm run dev

License

MIT

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    A
    maintenance
    Enables AI assistants to automate mobile app testing and development for iOS and Android through natural language interactions. Supports intelligent element identification, session management, automated test generation, and comprehensive device interactions including clicks, swipes, screenshots, and app management.
    7,411
    450
    Apache 2.0
  • A
    license
    -
    quality
    B
    maintenance
    Enables automated testing and development of Expo/React Native apps through session-based Expo dev server management and Maestro UI automation tools for tapping, text input, screenshots, and flow execution.
    147,902
    5
    MIT

View all related MCP servers

Related MCP Connectors

  • Connect Claude to Fathom meeting recordings, transcripts, and summaries

  • WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.

  • Persistent context for Claude. Your AI always knows your projects and next actions across sessions.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gayancliyanage/detox-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server