MCP client for `playwright` failed to start: program not found
Resolved 💬 46 comments Opened Aug 30, 2025 by SphaeroX Closed Nov 16, 2025
💡 Likely answer: A maintainer (25621, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.25.0
Which model were you using?
gpt-5 medium
What platform is your computer?
Windows 11 (Microsoft Windows NT 10.0.26100.0 x64 )
What steps can reproduce the bug?
- Install like on the Dexcription here: https://github.com/microsoft/playwright-mcp
- Run Codex it rteunrs
MCP client forplaywrightfailed to start: program not found
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
_No response_
46 Comments
Same thing happened to me. All MCP servers seem to be bugged or something. Here's what I added to my config.toml
[mcp_servers.supabase]
command = "npx"
args = ["-y", "@supabase/mcp-server-supabase@latest", "--access-token", "my_access_token"]
I even tried doing this:
[mcp_servers.supabase]
command = "cmd"
args = ["/c", "npx", "-y", "@supabase/mcp-server-supabase@latest", "--access-token", "my_access_token"]
But got:
MCP client for
supabasefailed to start: program not found@SphaeroX
First, run Playwright in the terminal—you can stop it afterwards, and then it works. There might be an issue that Playwright starts up more slowly than Codex, so they’re not synchronized
how can I do that? If I just run the command in a terminal, codex doesn't pick it up. I'm using the vs code extension atm
edit: actually, same thing happens in the codex CLI upon startup:
🖐 MCP client for
supabasefailed to start: program not found@sloikod
Before starting Codex, run:
npx playwright testor, for a specific browser:
npx playwright open chromium https://example.comnpx playwright open firefox https://example.comAfter that, when you launch Codex, Playwright should not throw an error and will start correctly.
I don't have access to a computer right now to confirm this precisely, but that's the general idea.
Playwright will simply start faster the second time, and there won’t be an error caused by incorrect synchronization.
doesnt work for me, i can open example.com but codex wont find the mcp server.
@SphaeroX
First, install Playwright locally. Then check on GPT how to do it
If you still can’t get it working, I’ll upload it in a few hours once I’m back at my PC."
I have Playwright installed, and I also installed Microsoft’s MCP server. I can run Playwright normally without any issues, but whenever I start Codex, I keep getting this error message. I don’t think this is just happening to me, other people using Windows are running into the same problem as well.
For example, with Kilo Code I don’t have any issues. Even Microsoft confirmed on GitHub that this isn’t a problem with the MCP server itself, but rather an issue with Codex.
Take a look at this https://github.com/openai/codex/issues/2905
Yes, thank you very much, but I would still prefer if the bug could be fixed directly in Codex before I start trying to work around the problem. It would make more sense to address the root cause first.
@SphaeroX Yeah, I hope they can fix it directly in the update. I'm not a developer either, so I can't submit code.
I have the same Problem under win 11 - no MCP Server would like to start :-( ! I have installed codex-cli 0.27.0 !!
<img width="726" height="455" alt="Image" src="https://github.com/user-attachments/assets/cc7906cc-46a6-4be0-b8ab-c6aab0eeca3f" />
@SphaeroX @jtuttas I wrote the reason why.
Each of the above will work if you run it before Codex.
<img width="630" height="270" alt="Image" src="https://github.com/user-attachments/assets/241cf4f4-499a-4f71-bbf8-5789c80be190" />
npx @playwright/mcp@latest --browser=chromium
<img width="1143" height="270" alt="Image" src="https://github.com/user-attachments/assets/1a81c09d-d430-4bc7-a26d-5d89fece14e2" />
@AdsQnn
are you on windows?
I’m using Ubuntu, but it doesn’t matter.
It’s just that Codex starts before MCP is loaded. You see that after the initial call, it loads fine.
Yes I'am on Win 11
~~It looks like only Windows is affected. As mentioned, it works with other tools, but not with Codex. I also started the server before~~
I clearly wrote that I’m on Ubuntu and even shared screenshots showing that the problem also occurs and how to solve it :) Please read carefully.
@AdsQnn I'm sorry if I'm mistaken, but are you not facing a different error? Yours says request timed out whilst ours is saying program not found. We are also using Windows, which this issue appears to affect specifically, though I'm not 100% sure. I think @SphaeroX was right
@sloikod
Does running
npx @playwright/mcp@latest --browser=chromiumdirectly in the terminal work correctly? After running this and then starting Codex, do you still experience the same problem?Either way, it’s probably not a coincidence that the MCP loading error appears on both systems. Try adding the Codex MCP as shown in the screenshot and see if it starts — on my side, that’s the only one that runs without an error. So it’s clearly something related to the runtime.
In the screenshot @jtuttas you can see that the GitHub MCP also has a request timeout.
No need to apologize — everyone can make mistakes :) The point is just to get the problem solved
Besides, it also seems that on Windows the terminal may open in an environment where not all PATH variables propagate correctly. A similar issue occurred earlier in the context of env.
@sloikod
Sure, no problem. I just want to get it running here and have the issue fixed, not only for me but for others as well. I ran the command and nothing happened. There was no error message. I am not sure if that is expected, but when I try to launch Codex in a new tab afterward I get the same error again.
https://github.com/user-attachments/assets/05e98753-7653-4165-bfce-c38ebd35b99a
Same on VSCode, i started the Server and its running.
https://github.com/user-attachments/assets/5910f659-ae18-4929-ac5f-9a432f260f4b
Problem:
On Windows, Rust’s std::process::Command directly calls the system API (CreateProcessW).
This API does not append extensions (.exe, .bat, .cmd) and does not interpret batch scripts.
CMD/PowerShell perform that “magic” (PATHEXT resolution, batch handling), so something that works in the console fails in Rust with program not found.
MCP (client/server) tries to launch a process but cannot find the file in the required form → error.
Solution:
In short: Rust is not a shell, so you must explicitly specify the correct executable file and how to launch it. This ensures MCP starts correctly.
@SphaeroX
So you were right — the issue is indeed about program not found on Windows :)
However, fixing it requires a PR to Codex.
@AdsQnn
Yes, I can now confirm that the MCP server is running. I tested it with MCP Inspector and everything works. I hope this gets fixed soon for Windows Users...
https://github.com/user-attachments/assets/870accbc-afb0-420c-84a5-762eef76150e
I've looked at another issue and actually got it to now display the request timed out error:
MCP client for
supabasefailed to start: request timed outHere's how I did it:
I found the node.exe executable, for me it's this: "C:\\Users\\username\\AppData\\Local\\nvm\\v22.14.0\\node.exe"
And I also ran this command in a separate terminal: npx -y @supabase/mcp-server-supabase@latest --access-token my_access_token
Then I manually searched through the C:\Users\username\AppData\Local\npm-cache\_npx directory to find the process that I just launched in the terminal and found the \dist\index.js file location, for me it was C:\\Users\\username\\AppData\\Local\\npm-cache\\_npx\\53c4795544aaa350\\node_modules\\@supabase\\mcp-server-supabase\\dist\\index.js
Then I changed config.toml to this:
[mcp_servers.supabase]
command = "C:\\Users\\username\\AppData\\Local\\nvm\\v22.14.0\\node.exe"
args = ["C:\\Users\\username\\AppData\\Local\\npm-cache\\_npx\\53c4795544aaa350\\node_modules\\@supabase\\mcp-server-supabase\\dist\\index.js"]
And now I'm getting the request timed out that @AdsQnn was talking about earlier. Not sure what to do now
Try:
npx -y @supabase/mcp-server-supabase@latest --access-token my_access_tokenAlternatively, you can run it this way:
C:\Users\your_username\AppData\Local\nvm\v22.14.0\node.exe C:\Users\d\AppData\Local\npm-cache\_npx\53c4795544aaa350\node_modules\@supabase\mcp-server-supabase\dist\index.jsThis will start the MCP server in a separate terminal. Keep that terminal open and running, and then in a different window, launch Codex.
I’m not entirely sure how this will behave in the Windows context, so please try it out and let me know what happens. The important thing is: keep the MCP server running in one terminal, while running Codex in another.
It’s probably caused by the fact that Codex starts before the MCP server is up — in other words, a synchronization issue. On my Ubuntu setup, it works.
PS.
@sloikod "I've looked at another issue and actually got it to now display the request timed out error:"
That’s good — I think it’s worth mentioning that I already wrote this above, since it outlines what the problem actually stems from.
Well so what I tried is: 'npx -y @supabase/mcp-server-supabase@latest --access-token my_access_token' in a separate terminal, then launched codex with this in the config.toml:
[mcp_servers.supabase]
command = "C:\\Users\\username\\AppData\\Local\\nvm\\v22.14.0\\node.exe"
args = ["C:\\Users\\username\\AppData\\Local\\npm-cache\\_npx\\53c4795544aaa350\\node_modules\\@supabase\\mcp-server-supabase\\dist\\index.js"]
Maybe one of these steps is unnecessary? Stopping the terminal process still results in the 'MCP client for
supabasefailed to start: request timed out' error, and, well, removing from the config.toml would just make the error not even show up so noOk, so the problem must be with the communication between the Windows shell and the Rust command, since on Ubuntu both the PATH and the initial startup work fine.
well I might just setup WSL, since that's what worked for #2555
Good idea — however, that removes the symptom rather than the root cause. It would be better to fix it properly sooner or later, without relying on such workarounds.
#2968
I’ve submitted a PR with the fix — let’s see how it goes.
I haven’t tested it on Windows directly, but it should work as intended.
On Ubuntu, the request timeout issue has been resolved.
Got the same exact issue. Tried debugging the whole day yesterday. No luck
I use the PlayWright MCP in Windows too,this is my mcp settings in config.toml
[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]
env = {}
I have the same problem that the codex reports MCP client for
playwrightfailed to start: program not foundDid you solve the problem?
It's not just for playwright, it's for every MCP.
ok after debugging and trying a ton of stuff - I fixed it. so I re-installed playwright and playwright-mcp globally for the quadruple time then just set my config.toml as follows
calling the cmd directly seems to be just as fast as running codex on windows which does not provoke the race in between the two.
FYI -- Got Codex / Playwright MCP working on Windows11 w/o installing either globally.
Verify 'npx' path and replace 'xxxxxx' with your User name.
-- command fixes the 'Program Not Found'
-- env config resolved timeout.
[mcp_servers.playwright]
command = "C:\\\Users\\\xxxxxx\\\AppData\\\Roaming\\\npm\\\npx.cmd"
args = ["@playwright/mcp@latest"]
[mcp_servers.playwright.env]
SYSTEMROOT = 'C:\Windows'
This seems to also be an issue for WSL. 🥲
Yes, I sent a PR that uses which, which means you don’t have to manually replace it with the full path — it happens under the hood, making it Windows-friendly. This is required instead of running the Rust binary directly through a raw command.
I also added reactive loading instead of using a timeout for MCP.
Unfortunately, the PR hasn’t been reviewed at all, and now it already has conflicts.
---
Why which is needed in Rust:
The which crate in Rust locates the full path to an executable by searching through the system’s PATH environment variable. This ensures your program works reliably across platforms, especially on Windows, where direct execution often fails without resolving the full path first.
So, what @mikekidder does, which does automatically.
Why Windows has a problem with this:
On Windows, executables often can’t be run directly by name because the system doesn’t automatically resolve them through the PATH like Unix-based systems do. You need the full path to the binary, and which takes care of finding it for you.
Another way to fix for anyone still struggling with this is to install the MCP node package globally, then configure it like so:
This is obviously for github, so for Playwright you can remove the env section entirely, but swap out
@modelcontextprotocol\\server-githubfor whatever package you've been trying to run via npx.Initially I tried using the absolute path to the relevant .cmd file in the
AppData\\Roaming\\npmdirectory, both with an emptyargsarray and withargs = ["--stdio"]but this always resulted in a request timed out error rather than the original program not found error. The key was using node.exe as the command and passing the arguments as above.I have tested the following, but unfortunately it doesn’t work. And I can’t seem to get it running with any of the other setups either. Especially context7 would be another MCP that could be really useful.
@SphaeroX you should really just try WSL at this point. Switch took me like half an hour and I don't regret it. Though the issue on windows has to be fixed, I don't disagree
I tagged a thread somewhere earlier that had a guy explain the full setup in a single message, if you need it
You can try next toml config, it works for me under windows 11:
to install extension, use https://github.com/microsoft/playwright-mcp/blob/main/extension/README.md
Inspired by this discussion, I've opened PR #3828 to resolve this issue.
@bolinfest - would appreciate a review when you have a chance. Thanks!
Just tested right now. The issue persists on Windows 11.
Having the same problem, I tried everything listed here, under Windows 10, nothing works, full path to npx.cmd does not work either. Sometimes it is hard to believe that a gazilion $ companies can not fix a problem that simple. There is an actual PR with a fix open, which is not moving... I will stick to Claude Code until this is fixed.
@n-kostadinov
Try this workaround:
cmd /C where npxto list all npx locations. Test each path ending in.cmdas your command until one works.PATH,APPDATA, andSYSTEMROOTto your MCP server's env configuration. Get these values by running:cmd /C echo %PATH%cmd /C echo %APPDATA%cmd /C echo %SYSTEMROOT%Important: When adding paths to the config, replace all single backslashes (
\) with double backslashes (\\).Example configuration:
Note: The PATH can be long. You don't need to include the entire PATH - just ensure it contains:
C:\\Program Files\\nodejs\\)C:\\Users\\YourUsername\\AppData\\Roaming\\npm)C:\\Windows\\system32;C:\\Windows)Very simple alternative to run playwright mcp in windows without WSL and figuring out paths...
Start and keep running MCP Server:
Then in your codex configuration file config.toml simply add:
Then execute your codex command.
This assumes both MCP Server and MCP Client (codex) run on the same host, if not then replace localhost with actual host where MCP Server is running.