# Codex CLI and IDE extension

## Add the server

```bash
codex mcp add i2v --url https://i2v.ai/api/mcp
```

The CLI and the Codex IDE extension can use the same Codex configuration. If you already have an `i2v` entry, inspect it with `codex mcp get i2v` before changing its URL or authentication method.

## Authorize and verify

```bash
codex mcp login i2v --scopes mcp:read
codex mcp list
```

Complete the i2v.ai sign-in and consent in your browser. In a headless session, add `--no-browser` and follow the CLI's callback instructions. Open a new Codex session or reload the extension after changes. Ask Codex to call `get_account` for scopes and `list_models` for the current public catalog.

## Enable generation when needed

```bash
codex mcp login i2v --scopes mcp:read,mcp:write
```

Choose write access on the i2v.ai consent screen. Check `get_account.scopes` after reconnecting, then follow [Generation and recovery](/docs/mcp/workflow). If you prefer a secret supplied by your environment, see the [API key configuration](/docs/mcp/api-key).

## Disconnect

Revoke the grant in [Connections](/settings/connections). To remove the local server entry, run `codex mcp remove i2v`. See [access and updates](/docs/mcp/account-and-access) for stale tool lists and revoked credentials.