OpenAI Codex CLI

Connect Forvibe MCP to the OpenAI Codex CLI via config.toml.

Updated 2026-05-12
2 min read

Codex CLI reads MCP servers from a TOML config at ~/.codex/config.toml (global) or .codex/config.toml inside a trusted project. Streamable HTTP is supported natively — Forvibe plugs in with one table.

Prerequisites

Setup

1

Export the API key as an env var

Codex pulls the bearer token from an environment variable so the secret never lands in the TOML file. Add to your shell startup (~/.zshrc, ~/.bashrc):

bash
export FORVIBE_API_KEY="fvk_live_..."
2

Edit ~/.codex/config.toml

Create the file if it doesn't exist. Add a [mcp_servers.forvibe] table:

toml
[mcp_servers.forvibe]
url = "https://www.forvibe.app/mcp"
bearer_token_env_var = "FORVIBE_API_KEY"
enabled = true
startup_timeout_sec = 15
tool_timeout_sec = 120

bearer_token_env_var is the name of the env var, not the token itself. Codex reads $FORVIBE_API_KEY at startup and sends it as Authorization: Bearer …. Bumping tool_timeout_sec to 120 covers simulate_metadata_only runs that can take 60-90 seconds.

3

Reload Codex

If you're using the IDE extension, reload the editor window. For the standalone CLI, the next codex invocation reads the new config.

Verify

Inside a Codex session, use the built-in command to list active MCP servers:

text
/mcp

forvibe should appear in the list with all 36 tools. Then ask: "List my Forvibe projects." Codex should call list_projects.

Disable temporarily

Set enabled = false in the same table to disable the server without removing the config. Useful for debugging or working offline.

toml
[mcp_servers.forvibe]
enabled = false