OpenAI Codex (CLI & IDE extension)
Codex stores MCP configuration in a config.toml file shared between the CLI and the IDE extension — configure it once and both clients pick it up. You can either use the codex mcp add command or edit the TOML directly. The file location determines whether the configuration applies to a single project or globally across all projects.
Project Scope
For the configuration to work just within one project, create .codex/config.toml in the project root. This is useful if you wish to maintain multiple similar projects and define a different API key in each, e.g. if you have scoped the API key for a specific Veyo Project. This ensures the MCP will query the correct Veyo project. The project must be marked as trusted in Codex for this file to be loaded.
[mcp_servers.veyo-mcp]
command = "npx"
args = ["-y", "@darkloop/veyo-mcp@latest"]
[mcp_servers.veyo-mcp.env]
VEYO_API_URL = "https://portal.veyomcp.com"
VEYO_API_KEY = "YOURAPIKEYHERE"
User Scope
This is the most simple, as it will add Veyo tools automatically to any project you open in Codex, however it will always query the same Veyo project. To easily switch projects, modify the "Default Project" on your Veyo dashboard to match the dev project you're working on.
Run from any terminal:
codex mcp add veyo-mcp --env VEYO_API_URL=https://portal.veyomcp.com --env VEYO_API_KEY=YOURAPIKEYHERE -- npx -y @darkloop/veyo-mcp@latest
This writes to ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml). Alternatively, you can edit that file manually with the same [mcp_servers.veyo-mcp] block shown in the project scope example above.
Verifying
Run codex mcp list to confirm Veyo is registered, or type /mcp inside an interactive Codex session.