Detox MCP

Detox MCP

Integrates the Detox mobile testing framework with Claude, enabling test execution, configuration management, code generation, and device management for React Native E2E testing.

Category
Visit Server

README

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

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured