-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Closed
Labels
Description
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 stdiocommand
). - 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
- 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" }
- Restart Codex CLI and open a session.
- Observe error in TUI:
🖐 Failed to create MCP connection manager: request timed out
(and/orMCP client for 'rube' failed to start: request timed out
). - 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"
withurl
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>]
withcommand
). - 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
- Feature Request: Native SSE transport support for MCP servers #2129 Feature Request: Native SSE transport support for MCP servers
- SSE based MCP servers are non-configurable #2320 SSE based MCP servers are non-configurable
- feat: enable Streamable HTTP MCP servers & lazy loading of tools #2550 feat: enable Streamable HTTP MCP servers & lazy loading of tools
- Codex CLI on Windows 11: MCP server (Context7) fails with “request timed out” #2555 Windows 11: MCP server (Context7) fails with “request timed out”
- feat(mcp): per-server startup timeout #3182 feat(mcp): per-server timeout and capture server stdout/stderr
- Make MCP Request timeout configurable #2346 Make MCP Request timeout configurable
Request
- Add native support for HTTP/Streamable HTTP/SSE MCP servers in
~/.codex/config.toml
(e.g.,transport = "http"
,url
, andheaders
). - 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.
schickling