# Codex

Connect Codex to Silan with one click, start Codex again, and allow it once.

Codex reaches your devices through `silan mcp`, Silan's MCP server, written into Codex's settings by the Silan app. Status: **supported**. It is proven with a real Codex on a Mac with no phone attached. Codex acting on a phone from start to end is still owed, as it is for every connected app. A Codex plugin also lives in the Silan repository, but installing it is not tested.

## Setup

1. Open **Connections** in Silan's sidebar, or setup's **Your AI tools**. Press **Connect an app**, then **Connect** on the Codex row.
2. Silan asks **Do you test your own app with Codex?** **Just my devices** gives the `core` set of 16 tools. **Test my app** gives the `testing` set of 27, with installs, recordings and test pushes.
3. Silan writes one table into `~/.codex/config.toml`:

   ```toml
   [mcp_servers.silan]
   command = "/Applications/Silan.app/Contents/Helpers/silan"
   args = ["mcp"]
   ```

   **Test my app** writes `args = ["mcp", "--profile", "testing"]`. Every other line of the file stays byte for byte, and the first change keeps a copy at `~/.codex/config.toml.silan-backup`. If the file already sets up `silan` another way, as a dotted key or an inline table, Silan does not guess: it asks you to remove those lines, then connect again. No key is written.
4. Start Codex again. Quit it, then type `codex`. A Codex that was open before Connect does not see Silan.
5. Type `Use Silan to list my devices`. On its first tool call Silan shows **Codex wants to use your devices**, with who signed it. Press **Allow**, **Allow this time** or **Don't allow**. **Allow this time** adds a row marked **This time only** to **Connections**, and the row goes by itself when Codex quits.

### The Codex plugin

`Plugins/silan` in the Silan repository holds a `.codex-plugin/plugin.json`, the server config `codex-mcp.json` and Silan's skills. `Plugins/.agents/plugins/marketplace.json` is a local marketplace that lists it. The plugin gives the server up to 900 seconds per call (`tool_timeout_sec`), because `wait_for` and a take-over can run long, and it reads `SILAN_MCP_PROFILE` for the tool set. Installing it in Codex is **not tested**: the Codex command line on the build Mac did not start. Use **Connect** in the app.

## Try it

```text
Use Silan to list my devices, then open Settings on the first one and read me the iOS version.
```

You should see Codex call `list_devices` first. The first call brings the Allow sheet in Silan. Then `launch_app` and `observe` follow, each answer with a fresh observation of the screen. On **Connections** the Codex row says when it was last used.

## Limits

- Codex acting on a phone from start to end is not yet proved on a real device. The Connect proof ran with no phone.
- Installing the plugin in Codex is not tested. The one-click Connect is the proven way.
- The testing set shows 27 tools over Connect: the five scenario tools are not served over XPC.
- Silan must be open on this Mac to ask you. With Silan closed, Codex gets **Open Silan on this Mac to allow Codex** at once.
- Codex must be the signed build. A build Silan cannot check gets **Allow this time** only.
- **Disconnect** on the row takes the `[mcp_servers.silan]` table out again and leaves every other line as it was.
- A risky step answers `APPROVAL_REQUIRED` until you say yes in Silan. See [Safety](/safety/).

:::note[Proof]
Proved on this Mac with no phone, 15 Oct 2026, by a Silan worker, with a real signed Codex: Connect wrote `~/.codex/config.toml`, the sheet named who signed it, **Allow this time** gave the **This time only** row while Codex held the session and the row went by itself when Codex quit. With the Silan app stopped, Codex got "Open Silan on this Mac to allow Codex" in 0.1 s. Runs `20261015-054025-90938` and `20261015-055213-59818`, pictures `c10-*.png`. Source: verify-silan feature map, connections.
:::