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
There's a good way to do this: check the configuration paths for your commands. This way, you can configure multiple MCPs for uv, uvx, and npx. Here are some examples:
[mcp_servers.context7]
type = "stdio"
command = 'C:\Program Files\nodejs\npx.cmd'
args = ["-y", "@upstash/context7-mcp@latest"]
env = { APPDATA = 'C:\Users\lenovo\AppData\Roaming', LOCALAPPDATA = 'C:\Users\lenovo\AppData\Local', HOME = 'C:\Users\lenovo', SystemRoot = 'C:\Windows' }
startup_timeout_ms = 20_000
Of course, if you are sse please use this uv tool install mcp-proxy, here is an example:
[mcp_servers."graphiti-memory-stdio-via-proxy"]
type = "stdio"
command = 'C:\Users\lenovo\.local\bin\uvx.exe'
args = ["mcp-proxy", "http://127.0.0.1:15627/sse"]
env = { APPDATA = 'C:\Users\lenovo\AppData\Roaming', LOCALAPPDATA = 'C:\Users\lenovo\AppData\Local', HOME = 'C:\Users\lenovo', SystemRoot = 'C:\Windows' }
startup_timeout_ms = 20_000
I'm not able to run any MCPs on codex in native windows due to a winsocket error; switching to WSL resolves the issue
File "C:\Users\...\AppData\Roaming\uv\tools\serena-agent\Lib\site-packages\typing_extensions.py", line 2997, in call
import asyncio.coroutines
File "C:\Users\...\AppData\Roaming\uv\python\cpython-3.11.13-windows-x86_64-none\Lib\asyncio\init.py", line 42, in <module>
from .windows_events import *
File "C:\Users\...\AppData\Roaming\uv\python\cpython-3.11.13-windows-x86_64-none\Lib\asyncio\windows_events.py", line 8, in <module>
import _overlapped
OSError: [WinError 10106] The requested service provider could not be loaded or initialized
There's a good way to do this: check the configuration paths for your commands. This way, you can configure multiple MCPs for uv, uvx, and npx. Here are some examples:
[mcp_servers.serena] type = "stdio" command = 'C:\Users\lenovo.local\bin\uv.exe' args = ["run", "--directory", "F:\Homework\MyMCP\serena", "serena-mcp-server"] env = { APPDATA = 'C:\Users\lenovo\AppData\Roaming', LOCALAPPDATA = 'C:\Users\lenovo\AppData\Local', HOME = 'C:\Users\lenovo', SystemRoot = 'C:\Windows' } startup_timeout_ms = 20_000
Love you, this is the first way I found that can run serena in my environment.
But I did a little bit adjustments to run it in VScode codex extension, here is my config:
[mcp_servers.serena]
type = "stdio"
command = "THE PATH TO YOUR uv.exe"
args = ["run", "--directory", "G:\\serena", "serena", "start-mcp-server", "--context", "codex"]
env = { APPDATA = "C:\\Users\\<YOUR WINDOWS ACCOUT USER ID>\\AppData\\Roaming", LOCALAPPDATA = "C:\\Users\\<YOUR WINDOWS ACCOUT USER ID>\\AppData\\Local", HOME = "C:\\Users\\<YOUR WINDOWS ACCOUT USER ID>", SystemRoot = "C:\\Windows" }
startup_timeout_ms = 20_000``
This is the format I used to get the MCP servers to work on Windows 11. You have to replace REDACTED with your own character sequence. Notice that I used "cmd" command instead of "npx"
Error loading configuration: TOML parse error at line 25, column 16
|
25 | APPDATA = "C:\Users\user\AppData\Roaming"
| ^
too few unicode value digits, expected unicode hexadecimal value
We have fixed many mcp-related bugs for Windows since this bug was first filed. If you're still seeing problems with the latest version of codex, please open a new bug report with details.
I keep having this error MCP client for autodeskAECModel failed to start: handshaking with MCP server failed: connection closed: initialize response
I find the problem.
In the code, I was having some Write.Console for debugging! Interesting, Claude Code don't care; instead, Codex was literally causing the handshaking to fail.
Activity
AyinMostima commentedon Sep 12, 2025
There's a good way to do this: check the configuration paths for your commands. This way, you can configure multiple MCPs for uv, uvx, and npx. Here are some examples:
[mcp_servers.context7]
type = "stdio"
command = 'C:\Program Files\nodejs\npx.cmd'
args = ["-y", "@upstash/context7-mcp@latest"]
env = { APPDATA = 'C:\Users\lenovo\AppData\Roaming', LOCALAPPDATA = 'C:\Users\lenovo\AppData\Local', HOME = 'C:\Users\lenovo', SystemRoot = 'C:\Windows' }
startup_timeout_ms = 20_000
[mcp_servers."perplexity-mcp"]
type = "stdio"
command = 'C:\Users\lenovo.local\bin\uvx.exe'
args = ["perplexity-mcp"]
env = { PERPLEXITY_API_KEY = "XXXXXXX", PERPLEXITY_MODEL = "sonar", APPDATA = 'C:\Users\lenovo\AppData\Roaming', LOCALAPPDATA = 'C:\Users\lenovo\AppData\Local', HOME = 'C:\Users\lenovo', SystemRoot = 'C:\Windows' }
[mcp_servers.serena]
type = "stdio"
command = 'C:\Users\lenovo\.local\bin\uv.exe'
args = ["run", "--directory", "F:\Homework\MyMCP\serena", "serena-mcp-server"]
env = { APPDATA = 'C:\Users\lenovo\AppData\Roaming', LOCALAPPDATA = 'C:\Users\lenovo\AppData\Local', HOME = 'C:\Users\lenovo', SystemRoot = 'C:\Windows' }
startup_timeout_ms = 20_000
AyinMostima commentedon Sep 12, 2025
Of course, if you are sse please use this uv tool install mcp-proxy, here is an example:
[mcp_servers."graphiti-memory-stdio-via-proxy"]
type = "stdio"
command = 'C:\Users\lenovo\.local\bin\uvx.exe'
args = ["mcp-proxy", "http://127.0.0.1:15627/sse"]
env = { APPDATA = 'C:\Users\lenovo\AppData\Roaming', LOCALAPPDATA = 'C:\Users\lenovo\AppData\Local', HOME = 'C:\Users\lenovo', SystemRoot = 'C:\Windows' }
startup_timeout_ms = 20_000
ahSOLO commentedon Sep 12, 2025
I'm not able to run any MCPs on codex in native windows due to a winsocket error; switching to WSL resolves the issue
T1nker-1220 commentedon Sep 12, 2025
This is working in my end this is really cool
domtisdell commentedon Sep 13, 2025
gjdklfjg commentedon Sep 13, 2025
Love you, this is the first way I found that can run serena in my environment.
But I did a little bit adjustments to run it in VScode codex extension, here is my config:
ahSOLO commentedon Sep 13, 2025
I was able to get my MCP servers working yesterday as well by adding these environmental variables
APPDATA = 'C:\Users...\AppData\Roaming'
LOCALAPPDATA = 'C:\Users...\AppData\Local'
DOTNET_ROOT = 'C:\Program Files\dotnet'
HOME='C:\Users...'
SystemRoot='C:\Windows'
Everything else was identical to my setup for claude code (didn't have to convert npx or uvx to the executable). Thanks all!
SamuelMiller commentedon Sep 16, 2025
This is the format I used to get the MCP servers to work on Windows 11. You have to replace REDACTED with your own character sequence. Notice that I used "cmd" command instead of "npx"
`approval_policy = "never"
model = "gpt-5-codex"
[mcp_servers."firecrawl-mcp"]
command = "cmd"
args = ["/c", "npx", "-y", "firecrawl-mcp"]
startup_timeout_ms = 120000
[mcp_servers."firecrawl-mcp".env]
APPDATA = "C:\Users\Computer\AppData\Roaming"
LOCALAPPDATA = "C:\Users\Computer\AppData\Local"
HOME = "C:\Users\Computer"
SystemRoot = "C:\Windows"
NODE_OPTIONS = "--dns-result-order=ipv4first"
FIRECRAWL_API_KEY = "fc-REDACTED"
[mcp_servers."playwright"]
command = "cmd"
args = ["/c", "npx", "-y", "@playwright/mcp@latest"]
startup_timeout_ms = 180000
[mcp_servers."playwright".env]
APPDATA = "C:\Users\Computer\AppData\Roaming"
LOCALAPPDATA = "C:\Users\Computer\AppData\Local"
HOME = "C:\Users\Computer"
SystemRoot = "C:\Windows"
NODE_OPTIONS = "--dns-result-order=ipv4first"
[mcp_servers."context7"]
command = "cmd"
args = ["/c", "npx", "-y", "@upstash/context7-mcp", "--api-key", "ctx7sk-REDACTED"]
startup_timeout_ms = 120000
[mcp_servers."context7".env]
APPDATA = "C:\Users\Computer\AppData\Roaming"
LOCALAPPDATA = "C:\Users\Computer\AppData\Local"
HOME = "C:\Users\Computer"
SystemRoot = "C:\Windows"
NODE_OPTIONS = "--dns-result-order=ipv4first"
[mcp_servers."supabase"]
command = "cmd"
args = ["/c", "npx", "-y", "@supabase/mcp-server-supabase@latest", "--read-only", "--project-ref=REDACTED"]
startup_timeout_ms = 120000
[mcp_servers."supabase".env]
APPDATA = "C:\Users\Computer\AppData\Roaming"
LOCALAPPDATA = "C:\Users\Computer\AppData\Local"
HOME = "C:\Users\Computer"
SystemRoot = "C:\Windows"
NODE_OPTIONS = "--dns-result-order=ipv4first"
SUPABASE_ACCESS_TOKEN = "sbp_REDACTED"
`
ImViper commentedon Sep 16, 2025
mark,hope fix
yayaysya commentedon Sep 17, 2025
wbdb commentedon Sep 17, 2025
For Windows users, this works for me with Codex 0.38.0:
bestpika commentedon Sep 18, 2025
It looks like you can use it as long as there is information in the [.env].
The following settings can run correctly without any issues.
wangxuyang1221 commentedon Oct 10, 2025
This works for me. I guess it should be these environmental variables that have played a role
Nenormalniy commentedon Oct 17, 2025
On windows 11, with this setup:
I have this error on typing "codex" command:
Double-slashing fixed this:
sonomirco commentedon Nov 10, 2025
Hi all,
Can I have help using a stdio mcp running via an .exe file?
I keep having this error
MCP client for autodeskAECModel failed to start: handshaking with MCP server failed: connection closed: initialize responseetraut-openai commentedon Nov 26, 2025
We have fixed many mcp-related bugs for Windows since this bug was first filed. If you're still seeing problems with the latest version of codex, please open a new bug report with details.
sonomirco commentedon Nov 26, 2025
I find the problem.
In the code, I was having some Write.Console for debugging! Interesting, Claude Code don't care; instead, Codex was literally causing the handshaking to fail.