MCP needs a greater timeout for startup (Windows)
What version of Codex is running?
v0.5.0
Which model were you using?
gpt-5
What platform is your computer?
Windows_X64
What steps can reproduce the bug?
Before I had sent a post https://github.com/openai/codex/issues/2893 use MCP in Windows environment, for example, will get an error "MCP client for context7 failed to start: "request timed out", all kinds of tinkering didn't solve the problem. Later, I modified two files in the source code and then repackaged codex.exe to solve it:
codex-rs\core\src\mcp_connection_manager.rs codex-rs\mcp-client\src\mcp_client.rs
[mcp_servers.context7]
command = "F:\\software\\nodejsold\\npx.cmd"
args = ["-y", "@upstash/context7-mcp", "--api-key", "xxxxxxxxxxxxxxxxxxxxxxxxxx"]
=====================================The following is the effect after the solution:
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response
Same here for Playwright
https://github.com/microsoft/playwright-mcp/issues/967
@SphaeroX I'll give you two modified files. You can package them into exe files yourself to replace the cod in "C:\Users\username\.vscode\extensions\openai.chatgpt-0.5.0-win32-x64\bin\windows-x86_64" ex.exe will do
codex-rs\core\src\mcp_connection_manager.rs codex-rs\mcp-client\src\mcp_client.rs
Use this command to package as an exe file: cd codex-rs; cargo build --release and get it :"\codex\codex-rs\target\release\codex.exe"
macOS same error
🖐 MCP client for `context7` failed to start: request timed out
🖐 MCP client for `playwright` failed to start: request timed out
Same issue here for the Serena MCP Server in the VSCode Terminal. Very frustrating
@SphaeroX I'll give you two modified files. You can package them into exe files yourself to replace the cod in "C:\Users\username.vscode\extensions\openai.chatgpt-0.5.0-win32-x64\bin\windows-x86_64" ex.exe will do
codex-rs\core\src\mcp_connection_manager.rs codex-rs\mcp-client\src\mcp_client.rs
Use this command to package as an exe file: cd codex-rs; cargo build --release and get it :"\codex\codex-rs\target\release\codex.exe"
So great that you found this!
I am trying to follow these steps but there are several mismatches:
- I fresh installed code cli and vscode extension today
- In '....vscode\extensions', I only see "openai.chatgpt-0.4.3-win32-x64". No 0.5.0 present.
- In its 'bin\windows-x86_64', I see 'codex' and 'rg' exe files.
Now, What is codex-rs? Is it a tool? OR Can I just rename downloaded .rs files to .exe? would it work? [Let me know if I am missing something here]
Attached the screenshot as well:
Is it solved in latest release?
https://github.com/openai/codex/releases/tag/rust-v0.31.0 now supports startup_timeout_ms, so please use that!