# Codex CLI

Connect Codex CLI to Shortcut through the hosted Shortcut MCP server.

## Overview

Connect Codex CLI to Shortcut through the hosted [Shortcut MCP Server](/help/integrations/mcp-server). Codex CLI can then use Shortcut context while planning, writing, and reviewing code from your terminal.

## Installation

1. Open or create `~/.codex/config.toml`. For a project-only connection, use `.codex/config.toml` in your workspace.
2. Add the Shortcut server:

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

3. Save the file.
4. Start authentication for the Shortcut server:

```bash
codex mcp login shortcut
```

5. Follow the browser prompt to authorize Shortcut.

Authentication is handled with OAuth. You do not need to create or store a Shortcut API token.

## Optional OAuth scopes

Most MCP clients select the appropriate OAuth scopes automatically. To manually limit the Shortcut permissions Codex requests, add `scopes` to the Shortcut server configuration:

```toml
[mcp_servers.shortcut]
url = "https://mcp.shortcut.com/mcp"
scopes = ["read", "write"]
```

For available scopes, see [MCP Server](/help/integrations/mcp-server#available-oauth-scopes).

## Troubleshooting

Codex CLI provides MCP commands for managing servers and authentication:

* `codex mcp list` shows configured MCP servers.
* `codex mcp --help` shows available MCP commands.
* `codex mcp login shortcut` starts authentication again for the Shortcut server.

For available entities and general troubleshooting, see [MCP Server](/help/integrations/mcp-server).