MCPs do not work natively on Windows (Powershell)
Resolved 💬 20 comments Opened Sep 10, 2025 by nikitakot Closed Nov 22, 2025
💡 Likely answer: A maintainer (LaelLuo, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.31.0
Which model were you using?
_
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What steps can reproduce the bug?
$ codex --version
codex-cli 0.31.0
>_ 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
config.toml
[mcp_servers.fetch]
command = "uvx"
args = ["mcp-server-fetch"]
startup_timeout_ms = 30000
[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]
startup_timeout_ms = 30000
[mcp_servers.context7]
args = ["-y", "@upstash/context7-mcp"]
command = "npx"
startup_timeout_ms = 30000
What is the expected behavior?
MCPs work on Windows.
What do you see instead?
MCPs time out on Windiows.
Additional information
This issue is a duplicate of https://github.com/openai/codex/issues/2555, which was closed, but the bug is not fixed.
20 Comments
Same problem here.
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- https://github.com/openai/codex/issues/3424I'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 --versioncodex-cli 0.31.0
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 https://github.com/openai/codex/pull/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.
Check out my solution! 😉
https://github.com/openai/codex/issues/3385
@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 :(
Yo @wbdb , just checked and it's all good 👍
<img width="547" height="712" alt="Image" src="https://github.com/user-attachments/assets/fb1776c5-b8a7-45e6-9fc2-7116c72dd09b" />
ver=v0.5.8
Yo @wbdb, here's my setup!:
Hey @wbdb, you free to hop on a remote sesh with me via todesk? Kinda curious what went wrong, lol. 😄
same here, no windows native support!
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
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
@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?
config.toml for Codex CLI/VSCode Extension:
Codex CLI Terminal App - Powershell 7:
For Windows users, this works for me with Codex 0.38.0:
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.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.You are right , I love you!
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.