SecureAuth AI Gateway
IntegrationsAgents

Codex CLI

Connect OpenAI Codex CLI to SecureAuth AI Gateway

OpenAI's agentic coding CLI for software engineering tasks.

Setup

  1. Add the MCP server — Add the following to ~/.codex/config.toml:
[mcp_servers.secureauth]
url = "https://your-gateway-url/gateway/mcp"
  1. Authenticate
codex mcp login secureauth
  1. Start Codex
codex

The agent is auto-registered on first connect.

Connecting to just one MCP? To stay under an agent's tool limit, point the URL at a single MCP — /gateway/mcp/{slug} instead of /gateway/mcp. Grab the exact URL from the resource's detail page; see Scope a connection to one MCP.

On this page