# Connect Codex

> Documentation index: https://docs.thefaceanalysis.com/llms.txt · HTML version: https://docs.thefaceanalysis.com/mcp/codex · Updated 2026-10-18

The Codex CLI and the IDE extension read the same `config.toml`. Use `--url` for hosted, `npx` for local.

## Steps

1. Run one of the commands. Codex writes the configuration to `~/.codex/config.toml`.
2. To edit by hand, add a `[mcp_servers.thefaceanalysis]` table to that file. For a per-project setup, put the table in `.codex/config.toml` at the root of a trusted project.
3. Restart Codex and try the check prompt below.

## Configuration

**Hosted (recommended)**

```
codex mcp add thefaceanalysis --url https://mcp.thefaceanalysis.com/mcp
```

**Local (npx)**

```
codex mcp add thefaceanalysis -- npx -y thefaceanalysis-mcp
```

**config.toml (hosted)**

```
[mcp_servers.thefaceanalysis]
url = "https://mcp.thefaceanalysis.com/mcp"
```

**config.toml (local)**

```
[mcp_servers.thefaceanalysis]
command = "npx"
args = ["-y", "thefaceanalysis-mcp"]
```

## Check it works

Ask: “Using The Face Analysis, what is the median fWHR across your 102 reference faces?” The answer should be 1.78.

Source for the Codex syntax: [Codex: MCP](https://learn.chatgpt.com/docs/extend/mcp?surface=cli). Client menus and file locations change; if a step no longer matches, follow that page and tell us on [GitHub](https://github.com/The-Face-Analysis/thefaceanalysis-mcp/issues).

See also the [tool reference](https://docs.thefaceanalysis.com/mcp/tools) and [troubleshooting](https://docs.thefaceanalysis.com/faq#troubleshooting).
