MCPs are defined in config.toml. Codex CLI sees them but VS Code IDE extension does not see them
What version of Codex is running?
codex --version : codex-cli 0.66.0
What subscription do you have?
Business
Which model were you using?
_No response_
What platform is your computer?
Darwin 25.1.0 arm64 arm
What issue are you seeing?
MCPs are defined in config.toml. Codex CLI sees them but VS Code IDE extension does not see them. CLI sees these, VS Code IDE does not.
[mcp_servers.context7]
command = "npx"
args = ["-y", "@upstash/context7-mcp"]
[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]
[mcp_servers.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
[mcp_servers.github.env]
GITHUB_PERSONAL_ACCESS_TOKEN = "TOKEN"
[mcp_servers.chrome_devtools]
command = "npx"
args = [
"-y",
"chrome-devtools-mcp@latest",
"--isolated", "true", # Creates a clean temp profile (avoids messing with your main Chrome)
"--headless", "false", # Set to 'true' if you don't want to see the window
"--channel", "stable" # Uses your standard installed Chrome
]
[mcp_servers.aws_knowledge]
command = "uvx"
args = ["awslabs.aws-documentation-mcp-server@latest"]
What steps can reproduce the bug?
updated config.toml using VS Code. restarted VS Code. CLI worked as soon as I opened a new terminal.
What is the expected behavior?
_No response_
Additional information
_No response_
10 Comments
+1 on this issue.
Frustratingly, the MCP server tools can be called fine in the Github Copilot Chat window (which i dont pay for unlike codex...), but the Codex VSCode extensions rarely picks them up.
I say rarely because, once in a blue moon, they do manage to start working, for brief windows of time. The Output window of the MCP servers offers no insight and the AI's own attempt at logging the situation provided no insight.
I tried a few things:
Would love to help try debug the issue if someone can guide me on how to try solve this one, given ive seen many reports with no solution for to this for a while now.
How are you checking whether the extension has them or not?
Thanks for the response.
I am checking whether the extension is able to use the MCP or not, simply by asking it. That is normal behavior for how we are expected to interact with MCPs, no?
When im using github copilot and it works there, i am simply talking to the model, and it makes the tool call on my behalf. It should, in an ideal world, be the exact same with the codex extension. However, the extension fails to establish communication with the server, even though the Extension with agent full access can easily query your PIDs and see the servers running, and tries to restart it, hit it constantly.
While troubleshooting again, after initiating the server via the VScode gui (with the MCP.json within the project workspace) i asked Codex to initiate the server itself. usually it fails, but somehow the process has managed to bind to the extension. Given i dont have any logging setup, i asked codex to explain. here is what it provided. i hope this helps. while this is the case for all MCPs including those from the VScode store, i also have my own server for a project, and thats what the below output pertains too.
I'd like to note that Codex will regulary try to initiate its own server and it does not always bind either. It got lucky this time i suppose.
***
Summary
Codex CLI can’t bind to an MCP stdio server started via VS Code’s MCP panel. The CLI only works after launching its own copy, so two independent instances can run with no warning.
Steps to Reproduce
.vscode/mcp.json:``
json
``"local-projectzero": {
"type": "stdio",
"command": "npm",
"args": ["--prefix", "F:/Code/ProjectZero/mcp", "start"]
}
local-projectzerowithout starting a new server from the CLI.Expected
Codex CLI attaches to the already-running VS Code–managed stdio MCP server, or at least warns that it can’t and is starting its own.
Actual
Codex CLI can’t talk to the VS Code–started server. It only works after spawning a new
npm --prefix F:/Code/ProjectZero/mcp start, resulting in two separate server processes.Impact
.vscode/mcp.jsonvs~/.codex/config.toml); no shared runtime state.Environment
npm --prefix F:/Code/ProjectZero/mcp startWorkarounds
There are a coupl eo fthings going on here:
What mcp prefixed tools do you have access to?in that case:
Transport Closedwhen it was in WSL, windows fails during initialize (“connection closed: initialize response”), it will start trying to spawn its own or restart any it can find by PID. Codex is capable of establishing if the server even exists purely by the handshake before it even worries about tool calls. You can see this if you watch the models 'working/thinking' process in real time.I look forward to the proper MCP UI. Hopefully these issues will be a bit easier to navigate if not resolve. Right now, it is actually hard to even reproduce.
I will continue my own debugging as the issue appears and if i find anything useful, i will post it here.
I just restarted VSCode (developer reload window, full system restart) and now have the same errors even launching the server via the shell so. It might not be a ubiquituous issues, but what i know is for those of us who have been reporting it, we dont know what were are going to get everytime we reload the server or vscode :(
I see that the issue is sorted. I can see the IDE extension for VS code is now reading config.toml to discover the toolsets, tool. Not sure if a fix was applied? @gpeal
<img width="1054" height="790" alt="Image" src="https://github.com/user-attachments/assets/daa0df10-0355-48c5-ad50-5061546e7648" />
P.S - appreciate the awseome work that the team is putting in.
I am not sure how to debug this locally. The IDE does not see the MCP servers again Codex CLI is at : OpenAI Codex (v0.73.0) and IDE Extension is at 0.4.51.
<img width="1058" height="800" alt="Image" src="https://github.com/user-attachments/assets/494dc180-0ef0-4f1b-b009-8f8db3880bc2" />
same issue
Coming back on this one, with some good news.
I have had some consistency when removing all sandboxing from the extension, running vscode natively on windows (not spawned via wsl), and specifically, launching the MCP server via the terminal within vscode, rather than a background/independant spawn.
still problems with either codex sanboxing options, ensuring to update
config.tomlwhen required.id also like to note i tried wsl from within the terminal app shell, and the ubuntu wsl app from the windows store and both had the same issues
Hope this helps everyone!
This bug report hasn't received any upvotes or additional posts in three months. Closing.