Skip to content

Commit 47496a8

Browse files
author
root
committed
docs: fix Codex MCP add instructions
1 parent 3df2d67 commit 47496a8

2 files changed

Lines changed: 26 additions & 2 deletions

File tree

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,23 @@ claude mcp add chrome-devtools --scope user npx chrome-devtools-mcp@latest
143143
using the standard config from above. You can also install the Chrome DevTools MCP server using the Codex CLI:
144144

145145
```bash
146-
codex mcp add chrome-devtools -- npx chrome-devtools-mcp@latest
146+
codex mcp add chrome-devtools -- npx -y chrome-devtools-mcp@latest
147+
```
148+
149+
Verification: run `codex mcp list` and confirm `chrome-devtools` is listed.
150+
151+
If you see `error: unexpected argument 'add' found`, your Codex CLI is too old to support `codex mcp add`.
152+
Upgrade Codex, or add the server manually by editing `~/.codex/config.toml`:
153+
154+
```toml
155+
[mcp_servers.chrome-devtools]
156+
command = "npx"
157+
args = ["-y", "chrome-devtools-mcp@latest"]
147158
```
148159

149160
**On Windows 11**
150161

151-
Configure the Chrome install location and increase the startup timeout by updating `.codex/config.toml` and adding the following `env` and `startup_timeout_ms` parameters:
162+
Configure the Chrome install location and increase the startup timeout by updating `%USERPROFILE%\.codex\config.toml` (usually `C:\Users\<you>\.codex\config.toml`) and adding the following `env` and `startup_timeout_ms` parameters:
152163

153164
```
154165
[mcp_servers.chrome-devtools]

docs/troubleshooting.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@ Using `.mcp.json` to debug while using a client:
3838

3939
## Specific problems
4040

41+
### Codex: `error: unexpected argument 'add' found`
42+
43+
Some older Codex CLI versions don't include the `codex mcp add`/`list` subcommands.
44+
45+
- Run `codex mcp --help` and check whether it shows `add`.
46+
- If it does not, upgrade Codex, or add the server manually by editing `~/.codex/config.toml`:
47+
48+
```toml
49+
[mcp_servers.chrome-devtools]
50+
command = "npx"
51+
args = ["-y", "chrome-devtools-mcp@latest"]
52+
```
53+
4154
### `Error [ERR_MODULE_NOT_FOUND]: Cannot find module ...`
4255

4356
This usually indicates either a non-supported Node version is in use or that the

0 commit comments

Comments
 (0)