[GH-ISSUE #9] Add installer support for Codex #5

Closed
opened 2026-10-26 22:27:40 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @kygdigital on GitHub (May 31, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-cloud-mcp/issues/9

Summary

It would be useful for the installer to detect and configure OpenAI Codex as an MCP client, similar to the existing support for Claude Code, Cursor, and Amp.

Codex supports streamable HTTP MCP servers via ~/.codex/config.toml and can pass custom HTTP headers with the http_headers table. That makes it compatible with the Comfy Cloud MCP server's X-API-Key authentication.

Suggested Codex config

The installer could write the following entry:

[mcp_servers.comfyui-cloud]
url = "https://cloud.comfy.org/mcp"

[mcp_servers.comfyui-cloud.http_headers]
X-API-Key = "comfyui-..."

If CODEX_HOME is set, the config path should be:

$CODEX_HOME/config.toml

Otherwise the default path is:

~/.codex/config.toml

Suggested installer behavior

For install.sh:

  • Add detect_codex, checking either command -v codex or the existence of ${CODEX_HOME:-$HOME/.codex}.
  • Add get_codex_config_path, returning ${CODEX_HOME:-$HOME/.codex}/config.toml.
  • Add configure_codex, creating the config directory if needed and writing/replacing these sections:
    • [mcp_servers.comfyui-cloud]
    • [mcp_servers.comfyui-cloud.http_headers]
  • Include Codex in client detection, the "no supported clients found" condition, and the client configuration flow.

For install.ps1:

  • Add Test-Codex, checking either Get-Command codex or the existence of $env:CODEX_HOME / $HOME\.codex.
  • Add Get-CodexConfigPath, returning $env:CODEX_HOME\config.toml or $HOME\.codex\config.toml.
  • Add Install-Codex, writing/replacing the same TOML sections as above.
  • Include Codex in client detection, the "no supported clients found" condition, and the client configuration flow.

Why write config directly?

Codex has a codex mcp add --url command for streamable HTTP MCP servers, but currently its public CLI flags expose bearer-token auth rather than arbitrary request headers. Since Comfy Cloud MCP uses X-API-Key, direct config writing appears to be the most practical approach, similar to how the installer already writes JSON config directly for some clients that need header support.

Slash commands / skills

I would suggest not installing the existing Claude/Cursor-style slash command markdown files for Codex in this initial change. Codex skills use a different structure, and the MCP tools should still be available after Codex restarts and reloads the MCP server.

Validation ideas

  • Run bash -n install.sh.
  • Run git diff --check.
  • On a machine with Codex installed, verify codex mcp get comfyui-cloud shows:
transport: streamable_http
url: https://cloud.comfy.org/mcp
http_headers: X-API-Key=*****

Happy to open a PR with a small implementation if this direction sounds acceptable.

Originally created by @kygdigital on GitHub (May 31, 2026). Original GitHub issue: https://github.com/Comfy-Org/comfy-cloud-mcp/issues/9 ## Summary It would be useful for the installer to detect and configure OpenAI Codex as an MCP client, similar to the existing support for Claude Code, Cursor, and Amp. Codex supports streamable HTTP MCP servers via `~/.codex/config.toml` and can pass custom HTTP headers with the `http_headers` table. That makes it compatible with the Comfy Cloud MCP server's `X-API-Key` authentication. ## Suggested Codex config The installer could write the following entry: ```toml [mcp_servers.comfyui-cloud] url = "https://cloud.comfy.org/mcp" [mcp_servers.comfyui-cloud.http_headers] X-API-Key = "comfyui-..." ``` If `CODEX_HOME` is set, the config path should be: ```text $CODEX_HOME/config.toml ``` Otherwise the default path is: ```text ~/.codex/config.toml ``` ## Suggested installer behavior For `install.sh`: - Add `detect_codex`, checking either `command -v codex` or the existence of `${CODEX_HOME:-$HOME/.codex}`. - Add `get_codex_config_path`, returning `${CODEX_HOME:-$HOME/.codex}/config.toml`. - Add `configure_codex`, creating the config directory if needed and writing/replacing these sections: - `[mcp_servers.comfyui-cloud]` - `[mcp_servers.comfyui-cloud.http_headers]` - Include Codex in client detection, the "no supported clients found" condition, and the client configuration flow. For `install.ps1`: - Add `Test-Codex`, checking either `Get-Command codex` or the existence of `$env:CODEX_HOME` / `$HOME\.codex`. - Add `Get-CodexConfigPath`, returning `$env:CODEX_HOME\config.toml` or `$HOME\.codex\config.toml`. - Add `Install-Codex`, writing/replacing the same TOML sections as above. - Include Codex in client detection, the "no supported clients found" condition, and the client configuration flow. ## Why write config directly? Codex has a `codex mcp add --url` command for streamable HTTP MCP servers, but currently its public CLI flags expose bearer-token auth rather than arbitrary request headers. Since Comfy Cloud MCP uses `X-API-Key`, direct config writing appears to be the most practical approach, similar to how the installer already writes JSON config directly for some clients that need header support. ## Slash commands / skills I would suggest not installing the existing Claude/Cursor-style slash command markdown files for Codex in this initial change. Codex skills use a different structure, and the MCP tools should still be available after Codex restarts and reloads the MCP server. ## Validation ideas - Run `bash -n install.sh`. - Run `git diff --check`. - On a machine with Codex installed, verify `codex mcp get comfyui-cloud` shows: ```text transport: streamable_http url: https://cloud.comfy.org/mcp http_headers: X-API-Key=***** ``` Happy to open a PR with a small implementation if this direction sounds acceptable.
Author
Owner

@mattmillerai commented on GitHub (Jun 22, 2026):

Installer retired and repo archived, so installer-side Codex support is moot. Codex (and any MCP client) can point directly at the hosted server — see https://docs.comfy.org/development/cloud/mcp-server. Closing.

<!-- gh-comment-id:4774078561 --> @mattmillerai commented on GitHub (Jun 22, 2026): Installer retired and repo archived, so installer-side Codex support is moot. Codex (and any MCP client) can point directly at the hosted server — see https://docs.comfy.org/development/cloud/mcp-server. Closing.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-cloud-mcp#5
No description provided.