---
title: "Codex"
description: "Connect ChatGPT/Codex with OAuth in the browser. Codex CLI takes a static key instead."
url: https://www.unitpost.com/guides/mcp/codex
section: MCP
updated: 2026-08-28
---
# Codex

## Connection settings

- **Server URL**: https://mcp.unitpost.com/mcp
- **Transport**: Streamable HTTP
- **Auth (recommended)**: OAuth 2.1 — add the URL, approve in the browser (scopes match API capabilities; tokens refresh automatically)
- **Auth (legacy)**: Authorization: Bearer pk_live_YOUR_KEY (workspace API key from Settings → API keys; for clients that can only paste a key)
- **Tools**: one per API operation (email_send, email_campaigns_send, …)

## Codex

> Connect ChatGPT/Codex with OAuth in the browser. Codex CLI takes a static key instead.

In ChatGPT, add the server URL as a connector and approve in the browser. The Codex CLI reads static config only (no browser flow) — its key setup lives on the headless page.

### 1. Connect with OAuth (recommended)

In ChatGPT, open the MCPs tab and connect a custom MCP. Select Streamable HTTP (not STDIO), paste the server URL below, then complete the browser approval. No key to copy. Your client opens Unitpost in the browser — pick a workspace, approve the scopes, and you're connected. Tokens refresh automatically.

- MCP server URL: https://mcp.unitpost.com/mcp

### 2. Verify

The unitpost connector should show as connected with its tools available. Codex CLI users: the CLI can't do the browser flow — follow the headless guide instead.

> Adding a connector requires a restart before chats see it: restart the Codex app, then check `/mcp`. Don't see it? Fully quit and reopen the client — closing the window is often not enough — then check again.

### 3. Send a test

Ask Codex to send an email from a verified domain and confirm it in Unitpost Activity.

## Related

- [GitHub Copilot](https://www.unitpost.com/guides/mcp/copilot): Connect VS Code agent mode to Unitpost with OAuth — approve in the browser. API key as fallback.
- [Gemini CLI](https://www.unitpost.com/guides/mcp/gemini): Connect the Gemini CLI to Unitpost — OAuth in the browser, or a key block.
- [Windsurf](https://www.unitpost.com/guides/mcp/windsurf): Connect Windsurf (Cascade) to Unitpost — OAuth in the browser, or a key block.
