Codex CLI on Windows 11: MCP server (Context7) fails with “request timed out”

Resolved 💬 42 comments Opened Aug 21, 2025 by wbdb Closed Sep 9, 2025
💡 Likely answer: A maintainer (bolinfest, collaborator) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.23.0-0.31.0

Which model were you using?

GPT-5

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What steps can reproduce the bug?

OS: Windows 11 Pro (PowerShell 7 / Windows Terminal)
Codex CLI: 0.23.0
Node.js: 22.17.0, npm: 11.5.1
Context7 MCP: @upstash/context7-mcp (local)
Location of config: C:\Users\Name\\.codex\config.toml

I tried these variations in my config.toml:

[mcp_servers.context7]
args = ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
command = "npx"

=> 🖐 MCP client for context7 failed to start: program not found

[mcp_servers.context7]
command = "cmd"
args    = ["/c","npx","-y","@upstash/context7-mcp"]

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

[mcp_servers.context7]
command = "C:\\Program Files\\nodejs\\npx.cmd"
args    = ["-y","@upstash/context7-mcp@latest","--transport","stdio"]

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

[mcp_servers.context7]
command = "C:\\Program Files\\nodejs\\node.exe"
args = [
  "C:\\Users\\Name\\AppData\\Roaming\\npm\\node_modules\\@upstash\\context7-mcp\\dist\\index.js",
  "--transport","stdio"
]

[mcp_servers.context7.env]
LOCALAPPDATA = 'C:\\Users\\Name\\AppData\\Local'
APPDATA = 'C:\\Users\\Name\\AppData\\Roaming'
PROGRAMFILES = 'C:\\Program Files'
"PROGRAMFILES(X86)" = 'C:\\Program Files (x86)'
SYSTEMROOT = 'C:\\Windows'
WINDIR = 'C:\\Windows'
HOMEDRIVE = 'C:'
HOMEPATH = '\\Users\\Name'
HOME = 'C:\\Users\\Name'

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

What is the expected behavior?

Using MCP Context7

What do you see instead?

MCP Errors

Additional information

Microsoft has invested so much in OpenAI, I don't understand why Windows is being treated so shabbily given its market share.

View original on GitHub ↗

40 Comments

gurumnyang · 11 months ago

same issues

wbdb · 11 months ago

Temporary workaround:

Install Context7 globally and link to it directly:

npm i -g @upstash/context7-mcp

Config:

[mcp_servers.context7]
command = "C:\\Program Files\\nodejs\\node.exe"
args    = ["C:\\Users\\Name\\AppData\\Roaming\\npm\\node_modules\\@upstash\\context7-mcp\\dist\\index.js","--transport","stdio"]
gurumnyang · 11 months ago

it works! you are my hero

wbdb · 11 months ago

@gurumnyang

But unfortunately, I keep getting errors like this :(

tool running... context7.resolve-library-id({"libraryName":"CodeIgniter Shield"})
tool success, duration: 84ms

context7.resolve-library-id({"libraryName":"CodeIgniter Shield"})
Error searching libraries: TypeError: fetch failed

You too?

gurumnyang · 11 months ago

Added to the /mcp list, but when I tested it, I got the same error...

wbdb · 11 months ago

I now use it via Windows WSL. It works flawlessly there.

---

WSL

Open WSL: wsl
Enable WSL 2: wsl.exe --set-default-version 2
Install Ubuntu 24.04 LTS: wsl --install -d Ubuntu-24.04
Set Ubuntu as default (for wsl start): wsl --set-default Ubuntu-24.04
List installed WSL distros: wsl -l -v
Switch to a specific WSL distro: wsl -d Ubuntu-24.04
Execute a specific command directly: wsl -d Ubuntu-24.04 ls -la
Exit WSL session: exit
Shut down all WSL sessions: wsl --shutdown
Terminate a specific WSL session: wsl --terminate Ubuntu-24.04

---

Codex & Node.js

Check correct Linux version: uname -a
Install updates: sudo apt update && sudo apt upgrade -y
Install essential packages: sudo apt install -y curl git build-essential unzip

Download and install fnm:
curl -o- https://fnm.vercel.app/install | bash

Download and install Node.js:
fnm install 22

Reload shell: source ~/.bashrc

Verify Node.js version:
node -v (should print “v22.18.0”)

Verify npm version:
npm -v (should print “10.9.3”)

Update npm: npm install -g npm@latest
Show npm version: npm --version (e.g. 11.5.2)

Install Codex CLI: npm install -g @openai/codex
Check Codex version: codex --version

---

MCP Context 7 Setup

Create config directory and file, then edit:
mkdir -p ~/.codex && touch ~/.codex/config.toml && nano ~/.codex/config.toml

Add the following:

[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp"]
evgenyop · 10 months ago

After spending (wasting) several hours troubleshooting this issue, I found a workaround:
1) install this http-stdio adapter: npm install -g mcp-remote
2) specify explicit environment variables in your: C:/Users/username/.codex/config.toml :

`
[mcp_servers.learn_mcp]

command = 'node'

args = [
'C:/Users/username/AppData/Roaming/npm/node_modules/mcp-remote/dist/proxy.js',
'https://learn.microsoft.com/api/mcp'
]

env = { APPDATA = 'C:\Users\username\AppData\Roaming', LOCALAPPDATA = 'C:\Users\username\AppData\Local', SystemRoot = 'C:\WINDOWS', COMSPEC = 'C:\WINDOWS\system32\cmd.exe' }
`

edulml98 · 10 months ago

Hello, are there another install options?

sting8k · 10 months ago

Same issue here. The following is a quick way to fix it:

[mcp_servers.context7]
command = "C:\\.....\\nodejs\\node.exe"
args = ["C:\\Users\\.....\\AppData\\Local\\npm-cache\\_npx\\.....\\node_modules\\@upstash\\context7-mcp\\dist\\index.js"]

I was able to get this working with the server-memory MCP as well.

Update 1/9: I’m now using MCP-Router as the central gateway for all other MCP servers.
Then I only need to push this into config.toml:

[mcp_servers.mcp-router]
command = "C:\\...\\bin\\bun.exe" # Or node.exe
args = [".....\\mcpr-cli\\dist\\mcpr.js", "connect"]
env = { SystemRoot = 'C:\WINDOWS', COMSPEC = 'C:\WINDOWS\system32\cmd.exe' , MCPR_TOKEN = "<key>" } # Thanks @evgenyop 
Xopoko · 10 months ago

I started to use Docker MCP Toolkit (you can find there Context7 MCP, Firecrawl, Playwrith and more). And it works for Codex CLI (and Codex VSCode extension).

<details><summary>Details</summary>
<p>
<img width="1151" height="1123" alt="Image" src="https://github.com/user-attachments/assets/17a3dc86-f445-4591-bcf9-e458783518b2" />
</p>
</details>

My config:

```toml**
[mcp_servers.toolkit]
command = "docker"
args = [
"mcp",
"gateway",
"run"
]
env = { "LOCALAPPDATA" = "C:\\Users\\<USER>\\AppData\\Local", "ProgramFiles" = "C:\\Program Files" }

eburakars · 10 months ago

Is there anyone who can resolve the error “Error searching libraries: TypeError: fetch failed” using Windows 11 cmd?

hbiaou · 10 months ago
I started to use Docker MCP Toolkit (you can find there Context7 MCP, Firecrawl, Playwrith and more). And it works for Codex CLI (and Codex VSCode extension). Details My config: `` [mcp_servers.toolkit] command = "docker" args = [ "mcp", "gateway", "run" ] env = { "LOCALAPPDATA" = "C:\\Users\\<USER>\\AppData\\Local", "ProgramFiles" = "C:\\Program Files" } ``

---------
It didn't work for me. Only the per-server entries below worked. Posting in case it helps others.
After a lot of failures trying to spawn MCP servers with npx on Windows, I used ChatGPT to iterate on options and landed on a simple, reliable fix:

---

Environment

  • Windows 11
  • PowerShell 7.x
  • Docker Desktop
  • Codex CLI (latest at time of writing)

---

Symptoms

  • npx @playwright/mcp@latest would repeatedly “request timed out” when launched by Codex, even though it worked in MCP Inspector.

---

What worked (Docker over STDIO)

Pre-pull (optional but speeds up first run):
docker pull mcp/playwright
docker pull mcp/fetch

Codex config: %USERPROFILE%\.codex\config.toml
[mcp_servers.fetch]
command = "docker"
args = ["run","--rm","-i","--init","--security-opt","no-new-privileges","mcp/fetch"]
[mcp_servers.fetch.env]
PYTHONIOENCODING = "utf-8"
PYTHONUNBUFFERED = "1" # avoids rare Python stdio stalls on Windows

[mcp_servers.playwright]
command = "docker"
args = ["run","--rm","-i","--init","--security-opt","no-new-privileges","mcp/playwright"]

Notes
Keep -i (STDIO attached). Don’t use -d.

Sanity checks
These should return help immediately:
docker run --rm -i mcp/playwright --help
docker run --rm -i mcp/fetch --help

wbdb · 10 months ago

To be fair, it should be noted that they do state that it is preferable to use it with WSL. However, now that the VS Code extension has been released, it is time for this to be implemented for Windows as well.

As mentioned, it runs very effectively with WSL, especially since it is already inclined to try Linux commands.

almirb · 10 months ago

I think this PR could fix the timeout.

eturk1 · 10 months ago

This may be helpful for anyone searching for help adding Dart and Firebase MCPs.

I was getting a related error: On Windows 11, Codex fails to start MCP servers with errors like:

🖐 MCP client for dart failed to start: program not found
🖐 MCP client for firebase failed to start: program not found

This happens because Codex spawns processes directly (no cmd.exe), so dart and npx on PATH aren’t found.
For Firebase, running through npx also adds extra startup delay and prompts, causing Codex to time out.

Fix

Wrap with cmd.exe /c. No need for long paths.
Also, pass a --dir to Firebase so it doesn’t prompt at startup. (prompts cause timeout)

# ~/.codex/config.toml

# Dart MCP (wrap with cmd.exe)
[mcp_servers.dart]
command = "cmd.exe"
args    = ["/c", "dart", "mcp-server"]

# Firebase MCP (call firebase.cmd directly with project dir)
[mcp_servers.firebase]
command = "firebase.cmd"
args    = ["experimental:mcp", "--dir", "C:\\Users\\USERNAME\\dev\\yourproject"]
medeiroshudson · 10 months ago

As a workaround you can run mcp through docker;
Downside is to containerize every mcp you use

For example in ``settings.toml``

[mcp_servers.mssql]
command = "docker"
args = [
  "run","-i","--rm",
  "-e","Server=host.docker.internal,1433;User Id=sa;Password=Your_password123;TrustServerCertificate=True;Encrypt=False",
  "medeiroshudson/mssql-mcp:latest"
]
wbdb · 10 months ago

@medeiroshudson

# Context7 MCP via Docker (stdio)
[mcp_servers.context7]
command = "docker"
args = [
  "run","-i","--rm","--pull","always",
  "-e","CONTEXT7_API_KEY",
  "-e","NO_COLOR","-e","FORCE_COLOR","-e","NODE_NO_WARNINGS","-e","NPM_CONFIG_UPDATE_NOTIFIER",
  "node:22-slim",
  "npx","-y","@upstash/context7-mcp","--transport","stdio"
]

=> MCP client for context7 failed to start: request timed out :(

wbdb · 10 months ago

I just tested it again after the latest update (https://github.com/openai/codex/commit/cad37009e155b57697dced9795a2b04d7ec8fe3e). Unfortunately, the same error still occurs (timeout). Codex VS Code: Version
0.4.5 (from 2025-09-09). I no longer have Codex CLI on Windows, as I only use it under WSL now.

[mcp_servers.context7]
command = "cmd"
args    = ["/c","npx","-y","@upstash/context7-mcp"]
startup_timeout_ms = 20000
nikitakot · 10 months ago

@wbdb i can confirm the latest codex cli (0.31) doesn't fix the issue on native Windows. But it doesn't seem like the latest version patch suppose to fix what's being discussed here, it's a separate bug.

bolinfest collaborator · 10 months ago

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

nikitakot · 10 months ago

@bolinfest doesn't work on my end, all MCPs I configure still fail with timeout, but with a longer timeout now

$ 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
wbdb · 10 months ago

@bolinfest Several people have already tried it and it doesn't work? Why is it being made so difficult here?! That was exactly my fear, that the issue would simply be closed here. That's why I tested it right away. And before you close, you should read.

cybershape · 10 months ago
@bolinfest doesn't work on my end, all MCPs I configure still fail with timeout, but with a longer timeout now $ 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

same here, latest codex and startup_timeout_ms set to 60000 and still timeout for all mcp clients.

ch35777 · 10 months ago

The cil and plug-in made by OpenAI are semi-finished. I can't believe that such a big company has produced a semi-finished product, and the experience is really poor. Besides the model does not drop, I also have this problem. If it is used in the plug-in, it will also be super.

tekn0x · 10 months ago

I'm on a Mac with the newest codex version and this keeps happening to me as well. Codex 0.36.0

MCP client for context7 failed to start: request timed out.

I have tried to add the tolm multi ways like and none of them work:

[mcp_servers.context7]
args = ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
command = "npx"
-
[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
-
[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp"]
VladimirLevadnij · 10 months ago

Hi @tekn0x . It works for me via the installed global mcp-remote. Here is the configuration (I use APi Key, but it should probably work without it):

[mcp_servers.context7]
command = "mcp-remote"
args = [
  "https://mcp.context7.com/mcp",
  "--header",
  "CONTEXT7_API_KEY: XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
]
disabled = false
tekn0x · 10 months ago
Hi @tekn0x . It works for me via the installed global mcp-remote. Here is the configuration (I use APi Key, but it should probably work without it): `` [mcp_servers.context7] command = "mcp-remote" args = [ "https://mcp.context7.com/mcp", "--header", "CONTEXT7_API_KEY: XXXXXXXXXXXXXXXXXXXXXXXXXXXX" ] disabled = false ``

Unfortunately, that is not working and produces a new error:
MCP client for context7 failed to start: No such file or directory (os error 2)

I wonder if it's a bug. Everything is working fine in other products.

VladimirLevadnij · 10 months ago
Unfortunately, that is not working and produces a new error: MCP client for context7 failed to start: No such file or directory (os error 2) I wonder if it's a bug. Everything is working fine in other products.

@tekn0x Please tell me, did you install mcp-remote globally in advance?

npm install -g mcp-remote
tekn0x · 10 months ago
> Unfortunately, that is not working and produces a new error: MCP client for context7 failed to start: No such file or directory (os error 2) > I wonder if it's a bug. Everything is working fine in other products. @tekn0x Please tell me, did you install mcp-remote globally in advance? `` npm install -g mcp-remote ``

Not the first time, but I just did now and it is working. Thank you so much. I really appreciate your help. I will have to test with some other MCP's tomorrow.

I hope the codex team figures out the issues with the other syntax using npx.

tekn0x · 10 months ago

I also wanted to follow up if anyone else finds this thread. Thanks to the guidance of @VladimirLevadnij I was also able to get the "local" and "remote" mcp's running. Just use one or the other. For some reason, the node module got uninstalled. So if anyone else is having this issue, try this solution. First install the module in your project, then add the code to your config file, lastly start codex, wait a few seconds, and verify with /mcp

  • Local Version -

Install in project
npm install -g @upstash/context7-mcp

Add to ~/.codex/config.toml
[mcp_servers.context7]
args = ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
command = "npx"

  • Remote Version -

Install in project
npm install -g mcp-remote

Add to ~/.codex/config.toml
[mcp_servers.context7]
command = "mcp-remote"
args = [
"https://mcp.context7.com/mcp",
"--header",
"CONTEXT7_API_KEY: XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
]
disabled = false

I hope this helps someone.

VladimirLevadnij · 10 months ago

@tekn0x I'm glad to hear that everything worked out for you. I hope that everything else in your life is fine, except for this problem. Everything works out, everything is moving towards a bright future, you are not being abducted by aliens👽, there is no evil dog living next to you 🐕 and so on 😁

wbdb · 10 months ago

For Windows users, this works for me with Codex 0.38.0:

[mcp_servers.context7]
command = "cmd"
args = [
    "/c",
    "npx",
    "-y",
    "@upstash/context7-mcp",
    "--api-key",
    "your-key",
]
env = { SystemRoot="C:\\Windows" }
startup_timeout_ms = 20_000
Opawn · 10 months ago

I configured it successfully, as shown below:

[mcp_servers.Playwright]
command = "cmd"
args = ["/c", "npx", "@playwright/mcp@latest"]
startup_timeout_ms = 20000

[mcp_servers.Playwright.env]
SystemRoot = 'C:\\Windows'

[mcp_servers.context7]
command = "cmd"
args = ["/c", "npx", "-y", "@upstash/context7-mcp"]
startup_timeout_ms = 30000

[mcp_servers.context7.env]
SystemRoot = 'C:\\Windows'

[mcp_servers.serena]
command = "uv"
args = ["run", "--directory", 'D:\\mcp\\Serena\\serena', "serena-mcp-server"]
startup_timeout_ms = 30000

[mcp_servers.serena.env]
SystemRoot = 'C:\\Windows'


[mcp_servers.shadcn-ui]
command = "cmd"
args = ["/c", "npx", "shadcn@latest", "mcp"]
startup_timeout_ms = 30000

[mcp_servers.shadcn-ui.env]
SystemRoot = 'C:\\Windows'
/mcp

🔌  MCP Tools

  • Server: context7
    • Command: cmd /c npx -y @upstash/context7-mcp
    • Tools: get-library-docs, resolve-library-id

  • Server: serena
    • Command: uv run --directory D:\\mcp\\Serena\\serena serena-mcp-server
    • Tools: activate_project, check_onboarding_performed, create_text_file, delete_lines, delete_memory,
execute_shell_command, find_file, find_referencing_symbols, find_symbol, get_current_config, get_symbols_overview,
initial_instructions, insert_after_symbol, insert_at_line, insert_before_symbol, list_dir, list_memories, onboarding,       
prepare_for_new_conversation, read_file, read_memory, remove_project, replace_lines, replace_regex, replace_symbol_body,    
restart_language_server, search_for_pattern, summarize_changes, switch_modes, think_about_collected_information,
think_about_task_adherence, think_about_whether_you_are_done, write_memory

  • Server: Playwright
    • Command: cmd /c npx @playwright/mcp@latest
    • Tools: browser_click, browser_close, browser_console_messages, browser_drag, browser_evaluate, browser_file_upload,   
browser_fill_form, browser_handle_dialog, browser_hover, browser_install, browser_navigate, browser_navigate_back,
browser_network_requests, browser_press_key, browser_resize, browser_select_option, browser_snapshot, browser_tabs,
browser_take_screenshot, browser_type, browser_wait_for

  • Server: shadcn-ui
    • Command: cmd /c npx shadcn@latest mcp
    • Tools: get_add_command_for_items, get_audit_checklist, get_item_examples_from_registries, get_project_registries,     
list_items_in_registries, search_items_in_registries, view_items_in_registries
DanielTrindade · 10 months ago

@Opawn thanks man

just-pthai-it · 10 months ago
I configured it successfully, as shown below: `` [mcp_servers.Playwright] command = "cmd" args = ["/c", "npx", "@playwright/mcp@latest"] startup_timeout_ms = 20000 [mcp_servers.Playwright.env] SystemRoot = 'C:\\Windows' [mcp_servers.context7] command = "cmd" args = ["/c", "npx", "-y", "@upstash/context7-mcp"] startup_timeout_ms = 30000 [mcp_servers.context7.env] SystemRoot = 'C:\\Windows' [mcp_servers.serena] command = "uv" args = ["run", "--directory", 'D:\\mcp\\Serena\\serena', "serena-mcp-server"] startup_timeout_ms = 30000 [mcp_servers.serena.env] SystemRoot = 'C:\\Windows' [mcp_servers.shadcn-ui] command = "cmd" args = ["/c", "npx", "shadcn@latest", "mcp"] startup_timeout_ms = 30000 [mcp_servers.shadcn-ui.env] SystemRoot = 'C:\\Windows' ` ` /mcp 🔌 MCP Tools • Server: context7 • Command: cmd /c npx -y @upstash/context7-mcp • Tools: get-library-docs, resolve-library-id • Server: serena • Command: uv run --directory D:\\mcp\\Serena\\serena serena-mcp-server • Tools: activate_project, check_onboarding_performed, create_text_file, delete_lines, delete_memory, execute_shell_command, find_file, find_referencing_symbols, find_symbol, get_current_config, get_symbols_overview, initial_instructions, insert_after_symbol, insert_at_line, insert_before_symbol, list_dir, list_memories, onboarding, prepare_for_new_conversation, read_file, read_memory, remove_project, replace_lines, replace_regex, replace_symbol_body, restart_language_server, search_for_pattern, summarize_changes, switch_modes, think_about_collected_information, think_about_task_adherence, think_about_whether_you_are_done, write_memory • Server: Playwright • Command: cmd /c npx @playwright/mcp@latest • Tools: browser_click, browser_close, browser_console_messages, browser_drag, browser_evaluate, browser_file_upload, browser_fill_form, browser_handle_dialog, browser_hover, browser_install, browser_navigate, browser_navigate_back, browser_network_requests, browser_press_key, browser_resize, browser_select_option, browser_snapshot, browser_tabs, browser_take_screenshot, browser_type, browser_wait_for • Server: shadcn-ui • Command: cmd /c npx shadcn@latest mcp • Tools: get_add_command_for_items, get_audit_checklist, get_item_examples_from_registries, get_project_registries, list_items_in_registries, search_items_in_registries, view_items_in_registries ``

YOU SAVED MY LIFE

malore350 · 10 months ago
For Windows users, this works for me with Codex 0.38.0: `` [mcp_servers.context7] command = "cmd" args = [ "/c", "npx", "-y", "@upstash/context7-mcp", "--api-key", "your-key", ] env = { SystemRoot="C:\\Windows" } startup_timeout_ms = 20_000 ``

This one worked for me, if anyone is interested, supabase communication would work similarly:

[mcp_servers.supabase]
command = "cmd"
args = [
"/c",
"npx",
"-y",
"@supabase/mcp-server-supabase@latest",
"--read-only",
"--project-ref=project_ref"
]
env = { SystemRoot="C:\\Windows", "SUPABASE_ACCESS_TOKEN" = "your_key" }
startup_timeout_ms = 20_000

dszdsxc19 · 9 months ago

If u r using uv, what works for me is declaring the python of the project used, for example:

[mcp_servers.serena]
command = "uv"
args = ["run", "--python", "path to serena venv", "--directory", "path to serena project", "serena", "start-mcp-server", "--context", "codex"]
# https://github.com/openai/codex/blob/main/docs/config.md#mcp_servers
startup_timeout_sec = 30
Voilett · 9 months ago
Hi @tekn0x . It works for me via the installed global . Here is the configuration (I use APi Key, but it should probably work without it):mcp-remote `` [mcp_servers.context7] command = "mcp-remote" args = [ "https://mcp.context7.com/mcp", "--header", "CONTEXT7_API_KEY: XXXXXXXXXXXXXXXXXXXXXXXXXXXX" ] disabled = false ``

nice work!

AndreyElyan · 9 months ago

Fetching comments for context

kingbluetooth · 9 months ago

Despite trying the solutions in this thead for Windows (no WSL), I landed on the working config below:

Working Solution for Codex v0.45.0

  1. Run npm install -g mcp-remote
  2. Copy the below into C:/Users/yourname/.codex/config.toml
[mcp_servers.context7]
command = "C:\\Program Files\\nodejs\\npx.cmd"
args = [
  "-y",
  "mcp-remote",
  "https://mcp.context7.com/mcp",
  "--header",
  "--quiet",
  "CONTEXT7_API_KEY: yourkey"
]
startup_timeout_ms = 30000
disabled = false

[mcp_servers.context7.env]
APPDATA = "C:\\Users\\yourname\\AppData\\Roaming"
LOCALAPPDATA = "C:\\Users\\yourname\\AppData\\Local"
COMSPEC = "C:\\Windows\\System32\\cmd.exe"
SYSTEMROOT = "C:\\Windows"
PROGRAMFILES = "C:\\Program Files"

Showing cached comments. Read the full discussion on GitHub ↗