Codex Desktop ignores project .codex/config.toml MCP server (Serena) and only loads ~/.codex/config.toml

Open 💬 19 comments Opened Feb 27, 2026 by PaulRBerg
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

codex-cli 0.104.0

What subscription do you have?

Logged in using ChatGPT (plan tier unknown).

Which model were you using?

gpt-5.3-codex

What platform is your computer?

macOS v26.3

What terminal emulator and version are you using (if applicable)?

Codex Desktop app (internal terminal context). In-command env shows TERM=dumb and empty TERM_PROGRAM.

What issue are you seeing?

Project-scoped MCP config is ignored for this thread/workspace.

In /Users/prb/sablier/new-ui, .codex/config.toml contains a valid Serena MCP server entry:

[mcp_servers.serena]
command = "uvx"
args = ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server", "--context", "codex", "--project-from-cwd"]

But inside the Codex Desktop thread runtime, Serena is missing:

  • available MCP resources/templates are empty for Serena tools
  • Serena tools (find_symbol, rename_symbol, etc.) are not exposed
  • codex mcp list only shows servers from ~/.codex/config.toml
  • codex mcp get serena returns: No MCP server named 'serena' found.

The Serena command itself works when run manually, so startup command/config appears valid.

What steps can reproduce the bug?

  1. In a project, configure Serena only in project-local .codex/config.toml (not in ~/.codex/config.toml).
  2. Open that project in Codex Desktop.
  3. Start a thread and inspect MCP availability.
  4. Run codex mcp list and codex mcp get serena from the same workspace.
  5. Observe that only user-level servers are loaded and Serena is absent.
  6. Run Serena manually:

uvx --from git+https://github.com/oraios/serena serena start-mcp-server --context codex --project-from-cwd

  1. Observe manual startup succeeds.

Thread ID: 019c9ffc-da8e-7500-8768-c516825ce9ce

What is the expected behavior?

Project-scoped .codex/config.toml should be merged into runtime MCP config (for trusted projects), so Serena should be available in the Desktop thread/toolset.

Additional information

Possibly related to MCP visibility inconsistency issues in Desktop (for example #10499), but this repro is specifically about project-local config not being loaded while user-global config is.

View original on GitHub ↗

19 Comments

Primo83 · 4 months ago

the same

PaulRBerg · 4 months ago

@Primo83 please upvote the issue, this helps with visibility (this is how OpenAI prioritizes issues).

Primo83 · 4 months ago
@Primo83 please upvote the issue, this helps with visibility (this is how OpenAI prioritizes issues).

“Hi! When you say ‘upvote the issue’, do you mean clicking the 👍 reaction on the issue?”

PaulRBerg · 4 months ago

@Primo83 yes

etraut-openai contributor · 4 months ago

@PaulRBerg, are other config settings in your project-scoped config file being honored, or is this specific to the MCP configuration? Are you sure this is a trusted project? As you know (from your bug report), Codex does not load project-scoped configs for untrusted projects.

PaulRBerg · 4 months ago

@etraut-openai I am running Codex with:

sandbox_mode = "danger-full-access"

So I don't think I am ever prompted about trusted/untrusted projects. I don't remember being asked that recently when I use Codex in a new directory.

are other config settings in your project-scoped config file being honored

the MCP was the only thing in my local config. I will test later and let you know

ylqgithubylq · 4 months ago

I can reproduce something very similar on Windows 11.

Using clangd-mcp (tool-only MCP):

  • User-level MCP config works in Codex CLI, Codex Desktop, and the Codex Cursor extension.
  • Project-level MCP config works in Codex CLI only.
  • The same project-level MCP does not appear in Codex Desktop or the Codex Cursor extension for the same workspace.

So this may be broader than Desktop alone: project-scoped MCP appears to be recognized by CLI, but not by Desktop / Cursor extension.

danila718 · 4 months ago

I discovered that using an absolute path to the project in the cwd parameter of the project’s .codex/config.toml makes Codex Desktop work with the MCP server. When collaborating, however, everyone has different absolute paths on their machines. Is there a way to work around this?

wujohns · 4 months ago

the same

masa6161 · 3 months ago

Same here. I confirmed that it's probably similar on Codex Desktop on Windows 11 as well.

Environment:

  • Codex Desktop version: 26.325.3894.0

The project is already marked as trusted in ~/.codex/config.toml, and the MCP server is defined only in the project's .codex/config.toml.

Expected behavior:
Codex Desktop should load the project-local MCP server definition for a trusted project.

Actual behavior:
Codex Desktop does not register the server from the project-local config. The server remains unavailable (unknown MCP server / not registered).

Workaround:
If I move the exact same MCP server definition into ~/.codex/config.toml and restart Codex Desktop, it is detected and works normally.

This suggests the problem is with project-scoped MCP config not being applied in Codex Desktop, rather than with a specific server definition.

marec-gh · 3 months ago

I fight an hour and then gave up. Finally know whats the issue. I use Windows 11 Pro. really nasty bug! ⚡🤬☠️

gjerek · 3 months ago

please sort this out, it's super annoying

j-Guru · 3 months ago

It’s pretty annoying and open bug like this is undermining your ypur credibility. You should focus on own product not producing plugin to Claude Code !!!

danielgoodwin97 · 2 months ago

I'm also having this issue. When moving the config out to ~/.codex/config.toml it works fine.

canonic-epicure · 2 months ago

Same here, please prioritize.

tbonelee · 2 months ago

I'm wondering why there's been no response here. The documented behavior doesn't seem to be working as expected.

predic8 · 2 months ago

Same, here

grnbtqdbyx-create · 1 month ago

I added a small packaged demo for the project/user config-scope evidence pattern in trace-to-skill@0.1.64:

npx trace-to-skill@0.1.64 demo mcp-discovery-mismatch
npx trace-to-skill@0.1.64 codex-report ./runs --output openai-codex-mcp-discovery.md

It is not a fix. It is meant to help people attach consistent evidence for this exact kind of report: app/CLI/Desktop/extension version, OS/IDE/remote or WSL state, workspace root, effective CODEX_HOME, user-global versus project .codex/config.toml, redacted MCP section, trust/profile/default-permissions state, codex mcp list, codex mcp get <server>, CLI-versus-Desktop comparison, loaded config path/log lines, whether moving the same server to ~/.codex/config.toml fixes it, and restart/reload/new-conversation behavior.

Release: https://github.com/grnbtqdbyx-create/trace-to-skill/releases/tag/v0.1.64

MKDRD · 5 days ago

Reproduced on Codex Desktop 26.707.72221, macOS 26.5.2 arm64.

This is a project-scoped MCP configuration case and appears to overlap both this issue and #24168.

Bounded reproduction

  1. Started from an exact-clean Codex-managed worktree at the accepted current main commit (empty tracked/index/untracked diff).
  2. Confirmed the committed project-local .codex/config.toml was present in that worktree.
  3. The project config declares one repo-local stdio MCP server, enables a named tool, and sets that tool's approval_mode = "auto".
  4. Restarted Codex Desktop and created a fresh task/worktree.
  5. Inspected the fresh task's runtime tool inventory before any repository mutation.

Observed

  • The expected project-local MCP namespace was absent.
  • Runtime inventory result: BROKER_TOOL_MATCHES=0.
  • The enabled tool could not be called because it was not injected/exposed to the task.
  • Server calls: 0; repo writes: 0; runtime Allow prompts: 0.
  • A stale-local-branch condition affected earlier attempts, but it was eliminated in this reproduction and is not causal.
  • Task ID for maintainers: 019f6692-fe87-76c0-b59d-9a6ec4d6ce26.

Expected

For a trusted project, Codex Desktop should load the committed project-scoped MCP entry and inject its enabled tools into the fresh task, consistent with the documented project .codex/config.toml behavior.

Moving this server into global ~/.codex/config.toml is not an acceptable workaround for this case: it launches repository-local code from cwd = ".", so project-scoped trust is the intended security boundary.

This looks especially close to the missing session_meta.dynamic_tools behavior reported in #24168.