MCP not listing tools, timeout 10 seconds
Resolved 💬 3 comments Opened Oct 26, 2025 by phillippc Closed Oct 26, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.50.0
What subscription do you have?
pro
Which model were you using?
gpt5-codex
What platform is your computer?
macosx m4
What issue are you seeing?
when calling a mcp server that has previously worked, suddenly i get timeout on startup of codex-cli.
2025-10-26T11:15:37.223575Z WARN Failed to list tools for MCP server 'bhmcp': Err(
Error {
context: "timed out awaiting tools/list after 10s",
source: Elapsed(
(),
),
},
)
2025-10-26T11:15:37.223653Z INFO aggregated 0 tools from 1 servers
the mcp server is responding however when using curl to verify.
What steps can reproduce the bug?
Uploaded thread: 019a2026-73fe-7e71-a2c1
What is the expected behavior?
_No response_
Additional information
_No response_
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I’ve reproduced the timeout with Codex CLI 0.50.0 and captured both the server response and Codex’s internal trace to show the
sequence.
Running the exact tools/list payload over HTTPS returns HTTP 200 in ~300 ms with the full 15‑tool catalog and
_meta.progressToken. (Verified with curl -H 'MCP-Protocol-Version: 2025-06-18' -H 'Authorization: Bearer …' POSTing
{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{"_meta":{"progressToken":0}}}`.)
With RUST_LOG=trace, Codex emits:
INFO serve_inner: Service initialized … logging={"setLevel": Bool(true)} …
TRACE serve_inner: new event evt=ProxyMessage(Request … ListToolsRequest …)
TRACE transport_worker: got new sse stream
TRACE serve_inner: new event evt=SendTaskResult(Request { id: Number(1), result: Ok(()) })
DEBUG sse stream terminated
So the client accepts the response and tears down the stream immediately after the server reply.
WARN Failed to list tools for MCP server 'bhmcp': Err(
Error { context: "timed out awaiting tools/list after 20s", source: Elapsed(()) }
)
INFO aggregated 0 tools from 1 servers
This happens despite the successful SendTaskResult … Ok(()) above.
The server side confirms matching timestamps: tools/list answer logged at … 58.753Z and streams notifications/message via SSE
without errors.
• Here’s what finally fixed it on our side, in case it helps other MCP implementers:
events as JSON-RPC payloads, so it dropped the frame, never resolved the promise, and then hit its 20 s timeout.
process the response immediately. The payload hadn’t changed—just the event name.
If you’re building an MCP server, make sure your streamable HTTP responses use the default SSE event name for request/response
messages.