codex icon indicating copy to clipboard operation
codex copied to clipboard

MCP needs a greater timeout for startup (Windows)

Open sfz009900 opened this issue 5 months ago • 6 comments

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

Image Image Image
[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:

Image Image

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

sfz009900 avatar Aug 29 '25 16:08 sfz009900

Same here for Playwright

https://github.com/microsoft/playwright-mcp/issues/967

SphaeroX avatar Aug 29 '25 16:08 SphaeroX

@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"

conversation_manager.zip

mcp_client.zip

sfz009900 avatar Aug 29 '25 16:08 sfz009900

macOS same error


🖐 MCP client for `context7` failed to start: request timed out

🖐 MCP client for `playwright` failed to start: request timed out

jksmx avatar Sep 02 '25 02:09 jksmx

Same issue here for the Serena MCP Server in the VSCode Terminal. Very frustrating

tarnan3751 avatar Sep 05 '25 00:09 tarnan3751

@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"

conversation_manager.zip

mcp_client.zip

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:

Image

dheerajawale-svg avatar Sep 05 '25 07:09 dheerajawale-svg

Is it solved in latest release?

dheerajawale-svg avatar Sep 07 '25 12:09 dheerajawale-svg

https://github.com/openai/codex/releases/tag/rust-v0.31.0 now supports startup_timeout_ms, so please use that!

bolinfest avatar Sep 09 '25 17:09 bolinfest