Skip to content

Context7 Platform -- Up-to-date docs for AI agents

docs: update README with fix for codex installation

kv-chiu469978ae7458
diff --git a/README.md b/README.md
index 636c06f7..c06646cb 100644
--- a/README.md
+++ b/README.md
@@ -477,37 +477,85 @@ command = "npx"
⚠️ Windows Notes
On Windows, some users may encounter request timed out errors with the default configuration.
-In that case, explicitly configure the MCP server with the full path to Node.js and the installed package:
+In that case, use one of the following configurations:
+
+Option A: Run the installed CLI directly (no extra env required)
+
+**Requires the package to be installed beforehand.**
```toml
[mcp_servers.context7]
-command = "C:\\Program Files\\nodejs\\node.exe"
+command = "C:\\Users\\yourname\\AppData\\Roaming\\npm\\context7-mcp.cmd"
args = [
- "C:\\Users\\yourname\\AppData\\Roaming\\npm\\node_modules\\@upstash\\context7-mcp\\dist\\index.js",
- "--transport",
- "stdio",
"--api-key",
"YOUR_API_KEY"
]
+startup_timeout_ms = 20_000
```
-Alternatively, you can use the following configuration:
+Option B: Use the absolute path to npx.cmd + set APPDATA/SystemRoot
+
+**No need to install the package beforehand.**
+
+```toml
+[mcp_servers.context7]
+command = "C:\\Users\\yourname\\AppData\\Roaming\\npm\\npx.cmd"
+args = [
+ "-y",
+ "@upstash/context7-mcp",
+ "--api-key",
+ "YOUR_API_KEY"
+]
+env = { SystemRoot="C:\\Windows", APPDATA="C:\\Users\\yourname\\AppData\\Roaming" }
+startup_timeout_ms = 20_000
+```
+
+Option C: Use cmd /c npx + set APPDATA/SystemRoot
+
+Equivalent to B, but invokes via cmd.
+
+**No need to install the package beforehand.**
```toml
[mcp_servers.context7]
command = "cmd"
args = [
- "/c",
- "npx",
- "-y",
- "@upstash/context7-mcp",
- "--api-key",
- "YOUR_API_KEY"
+ "/c",
+ "npx",
+ "-y",
+ "@upstash/context7-mcp",
+ "--api-key",
+ "YOUR_API_KEY"
]
env = { SystemRoot="C:\\Windows", APPDATA="C:\\Users\\yourname\\AppData\\Roaming" }
startup_timeout_ms = 20_000
```
+Option D: Use node.exe + the package entry point (avoids npx)
+
+Works well when npx/npm resolution is blocked by a minimal environment.
+
+**Requires the package to be installed beforehand.**
+
+```toml
+[mcp_servers.context7]
+command = "C:\\Program Files\\nodejs\\node.exe"
+args = [
+ "C:\\Users\\yourname\\AppData\\Roaming\\npm\\node_modules\\@upstash\\context7-mcp\\dist\\index.js",
+ "--transport",
+ "stdio",
+ "--api-key",
+ "YOUR_API_KEY"
+]
+startup_timeout_ms = 20_000
+```
+
+Troubleshooting
+
+- If you still see “request timed out”, increase startup_timeout_ms (e.g. 20_000–40_000), especially on first run when npx downloads packages.
+- Replace yourname with your Windows username and ensure Node.js/npm are installed.
+- Adding APPDATA and SystemRoot explicitly is safe and backward‑compatible across MCP clients.
+
This ensures Codex CLI works reliably on Windows.
⚠️ MacOS Notes