Repository navigation
MCP HTTP/SSE (Rube/Composio) fails to start with 'request timed out' on macOS (Codex 0.29.0) #3196
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingmcpIssues related to the use of model context protocol (MCP) serversIssues related to the use of model context protocol (MCP) servers
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/mcpwith Codex CLI. - Direct
transport = "http"+url = …in~/.codex/config.tomlis 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/mcpover 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"withurland 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"+urlwas rejected by Codex config parser (requires[mcp_servers.<name>]withcommand). - Deno-based stdio proxy worked functionally but still resulted in
request timed outfrom Codex. - Node-based proxy (using
@modelcontextprotocol/sdk1.17.5) connects in background; still see Codex timeout on client start with valid token and header.
Related Issues
- 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmcpIssues related to the use of model context protocol (MCP) serversIssues related to the use of model context protocol (MCP) servers
Activity
fix: improve MCP server initialization error handling(openai#3196)
fix: improve MCP server initialization error handling(openai#3196)
fix: improve MCP server initialization error handling #3196 #2346 #2555…
Bit-urd commentedon Sep 8, 2025
@bolinfest This was my case in the PR you merged [https://github.com//pull/3243] , and your change works
perfectly — it resolves the my issue case in a clean way. Thanks for the review!
We need this defensive
Err(e)branch becauseMcpClient::new_stdio_client()covers business logic errors as
(server_name, Err(error)), but task-levelfailures (panic/cancellation) surface as
JoinError. Without handling JoinError,a single faulty MCP server could crash the entire connection manager and block
other servers from initializing.
Here’s a concrete example I ran into while debugging
list_all_tools():my debug log:
fix: improve MCP server initialization error handling openai#3196 ope…
bolinfest commentedon Sep 9, 2025
https://github.com/openai/codex/releases/tag/rust-v0.31.0 now supports
startup_timeout_ms, so please use that!fix: improve MCP server initialization error handling openai#3196 ope…
fix: improve MCP server initialization error handling openai#3196 ope…