Skip to main content

OpenAI Codex CLI

OpenAI Codex CLI is OpenAI's command-line coding assistant. It supports MCP servers through global configuration.

Configuration

Codex CLI uses global configuration only - there is no project-level MCP config support.

ScopeLocationFormat
Global~/.codex/config.tomlTOML

Choose the configuration based on whether you have the Desktop App or VS Code Extension installed.

Desktop App

If you have the SF Veritas Desktop App installed:

macOS

[mcp_servers.sailfishTelemetry]
command = "node"
args = ["/Applications/SF Veritas.app/Contents/Resources/app.asar.unpacked/dist/mcp-server/index.js"]
enabled = true

Windows

[mcp_servers.sailfishTelemetry]
command = "node"
args = ["%LOCALAPPDATA%\\Programs\\SF Veritas\\resources\\app.asar.unpacked\\dist\\mcp-server\\index.js"]
enabled = true

Linux

[mcp_servers.sailfishTelemetry]
command = "node"
args = ["/opt/SF Veritas/resources/app.asar.unpacked/dist/mcp-server/index.js"]
enabled = true

VS Code Extension

If you have the SF Veritas VS Code Extension installed:

macOS / Linux

[mcp_servers.sailfishTelemetry]
command = "bash"
args = ["-c", "node \"$(ls -d ~/.vscode/extensions/sailfish-ai.sf-veritas-extension-* 2>/dev/null | sort -V | tail -1)/dist/mcp-server-bundled.js\""]
enabled = true

This command:

  • Uses glob pattern to find the extension (no hardcoded version)
  • Sorts by version and picks the latest if multiple exist
  • Uses bash -c to handle path expansion

Windows

[mcp_servers.sailfishTelemetry]
command = "cmd"
args = ["/c", "for /d %d in (%USERPROFILE%\\.vscode\\extensions\\sailfish-ai.sf-veritas-extension-*) do @node \"%d\\dist\\mcp-server-bundled.js\""]
enabled = true

Verification

After configuring, verify the connection:

  1. Open your terminal
  2. Run codex to start the CLI
  3. Type /mcp to see connected MCP servers
  4. You should see sailfishTelemetry listed

Usage

Once connected, ask Codex to use the telemetry tools:

> List my telemetry sessions
> Show me errors from the latest session
> What functions are taking the longest to execute?
> Analyze network requests to external APIs

Codex will use the MCP tools to query your local telemetry data.

Troubleshooting

Server not appearing in /mcp

  1. Desktop App: Verify the app is installed at the expected location
  2. VS Code Extension: Verify the extension is installed: ls ~/.vscode/extensions | grep sf-veritas
  3. Check TOML syntax - ensure quotes around string values
  4. Verify enabled = true is set
  5. Restart Codex CLI

Config file not found

Create the config directory and file:

mkdir -p ~/.codex
touch ~/.codex/config.toml

"No telemetry data found"

  1. Ensure your application has been instrumented with SF Veritas SDK
  2. Run your application to generate telemetry data
  3. Check that the database exists: ls ~/.sailfish/telemetry.db