Skip to content
FLORA DocsGo to app

OpenAI Codex

Add FLORA MCP to OpenAI Codex via the CLI or config.toml.

OpenAI Codex supports streamable HTTP MCP servers with OAuth. Config lives in TOML — not the JSON used by Cursor or VS Code. The ChatGPT desktop app, Codex CLI, and IDE extension share MCP configuration for the same Codex host, so this setup carries over to all three.

Terminal window
codex mcp add flora --url https://agents.flora.ai/mcp
codex mcp login flora

codex mcp add writes the server into ~/.codex/config.toml. codex mcp login flora starts the browser OAuth flow. Sign in with your FLORA account and approve.

Edit ~/.codex/config.toml (create it if needed) and add:

[mcp_servers.flora]
url = "https://agents.flora.ai/mcp"

Then authenticate:

Terminal window
codex mcp login flora

Codex defaults to auth = "oauth" for HTTP MCP servers, so it uses the credentials codex mcp login stored. You do not need mcp-remote — Codex speaks streamable HTTP natively. See the Codex MCP docs for every supported option.

For a repo-scoped config that teammates can share, put the same table in .codex/config.toml at the project root:

[mcp_servers.flora]
url = "https://agents.flora.ai/mcp"

Codex only loads project-scoped MCP config when the project is trusted. After cloning, trust the project in Codex, then each teammate runs codex mcp login flora once.

In the Codex TUI:

Terminal window
/mcp

flora should appear with its tools (execute, search_docs). Confirm with:

List my FLORA Techniques.

Outside the TUI — useful for scripted or CI setups:

Terminal window
codex mcp list
codex mcp get flora --json
Terminal window
codex mcp logout flora
codex mcp remove flora

If you added the server by hand, delete the [mcp_servers.flora] table from ~/.codex/config.toml (or the project’s .codex/config.toml) instead. To revoke server-side, go to FLORA → Settings → Connected apps.

  • OAuth callback rejected — Codex binds an ephemeral callback port by default. If your OAuth app requires fixed redirect URIs, set the top-level mcp_oauth_callback_port in config.toml; for remote or devbox setups, set mcp_oauth_callback_url. Codex appends a server-specific callback ID before sending the final redirect_uri, so register the full derived URI with the provider, not the base URL.
  • /mcp shows flora but tools fail with auth errors — re-run codex mcp logout flora && codex mcp login flora.
  • Project config ignored — project .codex/config.toml only applies when the project is trusted.