*MCP › Connect*

# Connect OpenAI Codex

> Add Filmo to Codex (CLI and IDE) with OAuth or with an API key read from an environment variable.

## Before you start

| What | What the vendor documents |
| --- | --- |
| Plan | Plans: not documented by the vendor. |
| Who adds the connector | You, with `codex mcp add` or `config.toml`. Workspace admins can restrict servers with managed requirements. |
| Who connects | `codex mcp login filmo` for OAuth. |
| Administration | The enterprise `mcp_servers` requirement. |

verified on 2026-10-09: [MCP in Codex](https://learn.chatgpt.com/docs/extend/mcp?surface=cli) · [Configuration reference](https://learn.chatgpt.com/docs/config-file/config-reference)

> **Use exactly this URL:** Type `https://app.filmo.io/api/v1/mcp` exactly. Do not use the Filmo domain of your company or any other host: the OAuth metadata names this origin, and a client that compares it with what you typed rejects a different one.

## Connect with OAuth

1. **Add the server** Add the entry with only `url` (see the file below without `bearer_token_env_var`).
2. **Log in** Run `codex mcp login filmo`; the browser opens Filmo's consent screen.

- If the server advertises `scopes_supported`, Codex prefers those scopes during login; otherwise it uses the scopes in `config.toml`. Filmo's resource metadata advertises every scope: choose in the consent screen.
- By default Codex uses a client metadata document when the server supports it and dynamic registration otherwise.

## The consent screen

- Only the `*:read` scopes the client asked for are checked (every read scope when it asks for none).
- Write scopes, `workflows:run` and `ai:ask` always start unchecked, even if the client asks for them; the ones it asked for carry the label “Requested by the integration”.
- Check by hand only what the assistant needs, and leave `ai:ask` unchecked unless you want it to spend AI credits.

To change the scopes later, remove the connector and add it again.

Before you approve, read [Authentication](https://docs.filmo.io/mcp/authentication#before-you-approve).

## Connect with an API key

1. **Export the key** Set `FILMO_API_KEY` in the environment Codex starts from.
2. **Name the variable** `bearer_token_env_var` holds the name of the variable, never its value.

*~/.codex/config.toml*

```text
[mcp_servers.filmo]
url = "https://app.filmo.io/api/v1/mcp"
bearer_token_env_var = "FILMO_API_KEY"
```

> **Keep the key out of the repository:** Never paste an API key into a file that goes to version control. The examples read it from the environment or ask for it; if one leaks, revoke it and create another.

## Limits of this client

| What | What the vendor documents |
| --- | --- |
| Tools | A limit on the number of tools: not documented by the vendor. |
| Output | `output_token_limit` per tool, and `tool_output_token_limit` for what goes into history. |
| Time | `tool_timeout_sec` is 60 by default: raise it for `filmo_ai_ask`, which can take tens of seconds. |

## Recommended preset

Rental operations (21): `orders:read`, `orders:write`, `availability:read`, `items:read`, `contacts:read`, `account:read`. It includes the order writes, cancelling included: pair it with the approval mode below, or pick a preset marked (read).

Every preset and its size are in [Limits and context](https://docs.filmo.io/mcp/guides/limits-and-context).

## What to put on “ask before running”

`default_tools_approval_mode` accepts `auto`, `prompt`, `writes` and `approve`; `writes` prompts for tools not marked read-only. Per tool: `approval_mode`.

The tools that must ask for approval are in [Safe writes](https://docs.filmo.io/mcp/guides/safe-writes#requires-confirmation).

- Scope step-up and listing tools again after login: not documented by the vendor.

## Check the connection

Ask the assistant: “Which Filmo account am I connected to?” It should call `filmo_account_get`, a read tool that returns no personal data.

---

Canonical URL: https://docs.filmo.io/mcp/connect/codex  
Last updated: 2026-10-25