OpenAI Codex CLI
For OpenAI's Codex CLI, add the configuration to your codex.toml or ~/.codex/config.toml. The rmcp client requires specific configuration keys for headers:
These examples use the default full endpoint. If you want the regional read or write profile instead, swap the URL and see MCP Endpoint Profiles.
Option 1: Static Headers (Direct Value)
Use this when you want to put the API key directly in the config file:
[mcp_servers.spotto]
url = "https://mcp-au.spotto.ai/mcp"
http_headers = { "X-API-Key" = "YOUR_API_KEY" }
Option 2: Environment Variable Headers (Secure)
Use this to reference an environment variable for better security:
[mcp_servers.spotto]
url = "https://mcp-au.spotto.ai/mcp"
env_http_headers = { "X-API-Key" = "SPOTTO_API_KEY" }
Then set the environment variable:
export SPOTTO_API_KEY="your_api_key_here"