> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobilerun.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Codex

> Connect OpenAI Codex to Mobilerun phones using MCP or the mobile-harness skill.

Codex is OpenAI's coding agent. Connect a Mobilerun phone to inspect mobile behavior while working on your code.

## Setup

1. [Set up a phone](https://docs.mobilerun.ai/devices.md) and install Codex.

2. Register the remote MCP server in your terminal:

   ```bash theme={null}
   codex mcp add mobilerun --url https://cloud.mobilerun.ai/api/mcp
   ```

   Alternatively, add this entry to `~/.codex/config.toml`:

   ```toml ~/.codex/config.toml theme={null}
   [mcp_servers.mobilerun]
   url = "https://cloud.mobilerun.ai/api/mcp"
   ```

3. Run `codex mcp login mobilerun` and complete sign-in.

Alternatively, install the [mobile-harness skill](https://docs.mobilerun.ai/skills/mobile-harness.md) for Python-based local and cloud device control.

## First task

> List my Mobilerun devices and take a screenshot of the ready device.

Review tool permissions before approving actions. See [MCP Server](https://docs.mobilerun.ai/mcp-server.md) for available tools and authentication.

See the [Codex MCP documentation](https://developers.openai.com/codex/mcp).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.