Skip to content

MCP HTTP/SSE (Rube/Composio) fails to start with 'request timed out' on macOS (Codex 0.29.0) #3196

@danialhasan

Description

@danialhasan

Title: MCP HTTP/SSE servers (Rube/Composio) fail to start with "request timed out" in Codex CLI on macOS

Summary

  • Attempting to use the Rube (Composio) MCP hub via its MCP URL https://rube.app/mcp with Codex CLI.
  • Direct transport = "http" + url = … in ~/.codex/config.toml is rejected (schema expects stdio command).
  • Implemented stdio→HTTP/SSE proxy (first Deno, then Node 20) to bridge Codex to Rube. Codex still reports timeouts when starting the MCP client.
  • Even after providing the signed token from Rube (Authorization or X-API-Key), Codex shows: MCP client for 'rube' failed to start: request timed out.

Steps to Reproduce

  1. Add an MCP entry (stdio) that launches a small proxy which forwards to https://rube.app/mcp over Streamable HTTP with SSE fallback.
[mcp_servers.rube]
command = "/Users/danialhasan/.nvm/versions/node/v20.19.0/bin/node"
args = [
  "/Users/danialhasan/Desktop/dev.nosync/scripts/rube-proxy-node/index.mjs"
]
# Token redacted; header can be Authorization or X-API-Key depending on provider docs
env = { RUBE_URL = "https://rube.app/mcp", RUBE_TOKEN = "<redacted>", RUBE_AUTH_HEADER = "Authorization" }
  1. Restart Codex CLI and open a session.
  2. Observe error in TUI: 🖐 Failed to create MCP connection manager: request timed out (and/or MCP client for 'rube' failed to start: request timed out).
  3. Proxy stderr with invalid token shows 401 from SSE; with token provided, Codex still times out at startup.

Expected

  • Codex should support HTTP/Streamable HTTP/SSE MCP servers natively (e.g., transport = "http" with url and headers), or at least not time out when a stdio proxy is used.
  • On auth/network errors from the remote MCP server, surface the HTTP status/message instead of a generic startup timeout.

Actual

  • Codex fails to initialize the MCP connection with a generic timeout.
  • No actionable error details are surfaced in the TUI; proxy logs show SSE/HTTP behavior but Codex reports only a timeout.

Environment

  • macOS 15.2 (arm64)
  • Codex CLI 0.29.0
  • Node.js v20.19.0 for stdio proxy (also tried Deno 2.4.4)
  • Deno and Node proxies both attempted; Node 20 used to avoid older Node fetch/stream incompatibilities

Additional Notes / Attempts

  • Direct TOML with transport = "http" + url was rejected by Codex config parser (requires [mcp_servers.<name>] with command).
  • Deno-based stdio proxy worked functionally but still resulted in request timed out from Codex.
  • Node-based proxy (using @modelcontextprotocol/sdk 1.17.5) connects in background; still see Codex timeout on client start with valid token and header.

Related Issues

Request

  • Add native support for HTTP/Streamable HTTP/SSE MCP servers in ~/.codex/config.toml (e.g., transport = "http", url, and headers).
  • Improve error propagation so Codex surfaces HTTP status (401/403/405) and response body from remote MCP servers on startup.
  • Document recommended auth header handling for HTTP MCP (Authorization vs X-API-Key) with examples.
  • Consider a per-server configurable connect timeout and retry policy.

Happy to provide a minimal proxy repo or more logs if helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmcp

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions