You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCPs do not work natively on Windows (Powershell) #3408
>_ You are using OpenAI Codex in C:\Users\zzz\zzz
To get started, describe a task or try one of these commands:
/init - create an AGENTS.md file with instructions for Codex
/status - show current session configuration and token usage
/approvals - choose what Codex can do without approval
/model - choose what model and reasoning effort to use
🖐 MCP client for`playwright` failed to start: request timed out
🖐 MCP client for`fetch` failed to start: request timed out
🖐 MCP client for`context7` failed to start: request timed out
▌ Summarize recent commits
⏎ send Ctrl+J newline Ctrl+T transcript Ctrl+C quit
I'm trying to implement my MCP.
But no matter what I do, I get... Works with claude, other, but not with codex. I assume it codex issue.
🖐 MCP client for xxx-mcp failed to start: request timed out
Same issue with 0.34.0, this is not related to powershell. I have the problem using good ol' cmd.exe: MCP client for context7 failed to start: request timed out
This issue was intended to be fixed in 0.31.0 via #3182 but that fix is not effective, no matter how long the timeout you specify. you now just wait longer before the error message appears.
Reacted by wbdb, truebest, Jeff1573, hitcky and Fabio Andres Espinosa Valcarcel
@seocorp@TheCircus Did you get it working in Codex CLI only or in the VS Code Extension also? I would find it most helpful here at the moment; with Codex CLI, I'll continue to use WSL.
@sfz009900 I'm from Germany, so I'm not familiar with the software or client todesk. All I see on the page are Chinese characters :). Do you also have Windows 11 (Pro) 24H2?
I have a simpler solution if you don't mind manually updating MCPs.
Install bun, then use bun install -g to install MCP packages globally just like you would install any other MCP. Then run bun pm bin -g to get bun's global bin path and add it to your PATH environment variable.
For example, if I install @upstash/context7-mcp, after installation I only need to configure:
This approach bypasses the timeout issues with npx/uvx on Windows by using pre-installed executables instead of on-demand package execution.
This might indicate that if you don't provide env = { SystemRoot="C:\Windows" }, you need to execute .exe binary executables directly. But if it's a .cmd file, it will cause timeout issues.
Hi everyone, I've opened a follow-up PR at #3994 that includes the fix and adds a comprehensive test suite.
This new suite empirically validates exactly which environment variables are critical for MCP servers (especially those using npx) to function correctly on Windows. The tests confirm that PATH, APPDATA, and SYSTEMROOT are all necessary.
By adding APPDATA and SYSTEMROOT to the default environment, this PR provides a proper fix that should resolve the timeout issues without requiring the manual env workarounds in config.toml.
I think this issue is no longer relevant, so I'm closing. If you see problems with mcp servers on Windows with the latest version of codex, please open a new issue and provide details. Use the /feedback slash command to upload the session if applicable.
Activity
RodrigoMunozP commentedon Sep 10, 2025
Same problem here.
wbdb commentedon Sep 10, 2025
I can confirm that the problem has not been fixed. Despite several comments confirming this, the previous issue was simply closed.
With v32.0 also: 🖐 MCP client for
context7failed to start: missing fielduser_agent- #3424truebest commentedon Sep 10, 2025
I'm trying to implement my MCP.
But no matter what I do, I get... Works with claude, other, but not with codex. I assume it codex issue.
🖐 MCP client for
xxx-mcpfailed to start: request timed outPS C:\Users\xxx> codex --version codex-cli 0.31.0sebthom commentedon Sep 10, 2025
Same issue with 0.34.0, this is not related to powershell. I have the problem using good ol' cmd.exe:
MCP client forcontext7failed to start: request timed outThis issue was intended to be fixed in 0.31.0 via #3182 but that fix is not effective, no matter how long the timeout you specify. you now just wait longer before the error message appears.
sfz009900 commentedon Sep 11, 2025
Check out my solution! 😉
#3385
wbdb commentedon Sep 11, 2025
@sfz009900 I tried it that way, but then Codex no longer loads in VS Code at all.
We've had this error for almost a month now :(
sfz009900 commentedon Sep 11, 2025
Yo @wbdb , just checked and it's all good 👍
ver=v0.5.8
sfz009900 commentedon Sep 11, 2025
Yo @wbdb, here's my setup!:
sfz009900 commentedon Sep 11, 2025
Hey @wbdb, you free to hop on a remote sesh with me via todesk? Kinda curious what went wrong, lol. 😄
iamysfy commentedon Sep 11, 2025
same here, no windows native support!
seocorp commentedon Sep 11, 2025
THANK YOU!
it works!
using npm (npx)
[mcp_servers.context7]
command = 'C:\Program Files\nodejs\npx.cmd'
args = ["-y", "@upstash/context7-mcp@latest"]
env = { APPDATA='C:\Users\{username}\AppData\Roaming', LOCALAPPDATA='C:\Users\{username}\AppData\Local', HOME='C:\Users\{username}', SystemRoot='C:\Windows' }
startup_timeout_ms = 20_000
using bun (bunx)
[mcp_servers.context7]
command = "bunx"
args = ["-y", "@upstash/context7-mcp@latest"]
env = { APPDATA='C:\Users\{username}\AppData\Roaming', LOCALAPPDATA='C:\Users\{username}\AppData\Local', HOME='C:\Users\{username}', SystemRoot='C:\Windows' }
startup_timeout_ms = 20_000
TheCircus commentedon Sep 12, 2025
Adding the env variables also fixed it for me, thanks!
[mcp_servers.gdai-mcp]
command = "uv"
args = ["run", "C:/{project folder}/addons/gdai-mcp-plugin/gdai_mcp_server.py"]
env = { APPDATA='C:\Users{username}\AppData\Roaming', LOCALAPPDATA='C:\Users{username}\AppData\Local', HOME='C:\Users{username}', SystemRoot='C:\Windows' }
startup_timeout_ms = 20_000
wbdb commentedon Sep 12, 2025
@seocorp @TheCircus Did you get it working in Codex CLI only or in the VS Code Extension also? I would find it most helpful here at the moment; with Codex CLI, I'll continue to use WSL.
@sfz009900 I'm from Germany, so I'm not familiar with the software or client todesk. All I see on the page are Chinese characters :). Do you also have Windows 11 (Pro) 24H2?
Bedolla commentedon Sep 12, 2025
config.toml for Codex CLI/VSCode Extension:
Codex CLI Terminal App - Powershell 7:
domtisdell commentedon Sep 13, 2025
wbdb commentedon Sep 17, 2025
For Windows users, this works for me with Codex 0.38.0:
LaelLuo commentedon Sep 18, 2025
I have a simpler solution if you don't mind manually updating MCPs.
Install bun, then use
bun install -gto install MCP packages globally just like you would install any other MCP. Then runbun pm bin -gto get bun's global bin path and add it to your PATH environment variable.For example, if I install
@upstash/context7-mcp, after installation I only need to configure:This approach bypasses the timeout issues with npx/uvx on Windows by using pre-installed executables instead of on-demand package execution.
This might indicate that if you don't provide
env = { SystemRoot="C:\Windows" }, you need to execute .exe binary executables directly. But if it's a .cmd file, it will cause timeout issues.🐛 fix(mcp): resolve Windows MCP timeout issues
fix(mcp): Add APPDATA and SYSTEMROOT to Windows environment variables
25621 commentedon Sep 21, 2025
Hi everyone, I've opened a follow-up PR at #3994 that includes the fix and adds a comprehensive test suite.
This new suite empirically validates exactly which environment variables are critical for MCP servers (especially those using
npx) to function correctly on Windows. The tests confirm thatPATH,APPDATA, andSYSTEMROOTare all necessary.By adding
APPDATAandSYSTEMROOTto the default environment, this PR provides a proper fix that should resolve the timeout issues without requiring the manualenvworkarounds inconfig.toml.🐛 fix(mcp): resolve Windows MCP timeout issues
wardlee commentedon Oct 22, 2025
You are right , I love you!
etraut-openai commentedon Nov 22, 2025
I think this issue is no longer relevant, so I'm closing. If you see problems with mcp servers on Windows with the latest version of codex, please open a new issue and provide details. Use the
/feedbackslash command to upload the session if applicable.