codex mcp add command has no option for custom headers, so you add Telivy by editing the configuration file.
Prerequisites
- The Codex CLI installed and signed in.
- Your agency’s Telivy API key from Account → Integrations. See Authentication and permissions for what the key can do.
Store the key in an environment variable
- macOS and Linux
- Windows
Add this line to your shell profile (for example
~/.zshrc or ~/.bashrc), then open a new terminal:Add the server
1
Open the configuration file
Open
~/.codex/config.toml in your home folder, creating it if it does not exist. To add Telivy to one trusted project only, use .codex/config.toml in that project instead.2
Add the Telivy table
env_http_headers maps the x-api-key header to the name of the environment variable, and Codex reads the value from the environment when it connects. Write the variable name exactly as shown, without $ or ${}. default_tools_approval_mode = "writes" makes Codex ask for approval before it runs any Telivy tool that is not marked read-only.Verify the connection
Runcodex mcp list in a terminal and check that telivy is listed. Then start codex and type /mcp to see the active MCP servers and their tools. If Telivy is listed without tools or reports an error, see Troubleshooting.
Approvals
Withdefault_tools_approval_mode = "writes", Codex runs Telivy tools that read data without asking and asks before tools that create, update, rescan or uninstall something. To be asked before every Telivy tool call, set the value to "prompt". You can also override a single tool with tools.<tool name>.approval_mode, or hide tools with disabled_tools. Avoid "auto" for the Telivy server, because it lets the assistant change data without asking.
Try it
Startcodex and send a prompt such as:
Remove the server
Run:[mcp_servers.telivy] table from config.toml, or keep it and add enabled = false to turn the server off without deleting it.