# 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. 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.

### Sign in from a remote terminal

```bash
codex mcp login i2v --no-browser --scopes mcp:read
```

Open the displayed authorization link in your browser. After approving access on i2v.ai, copy the full redirect URL from the browser and paste it into the same Codex prompt. Run `codex mcp get i2v` to verify the configuration. [Codex MCP guide](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)

## 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). Run `codex mcp logout i2v` to clear the saved credential. To remove the server configuration as well, run `codex mcp remove i2v`. See [access and updates](/docs/mcp/account-and-access) for stale tool lists and revoked credentials.