CLI+App: `/mcp` does not show project-scoped mcp servers

Resolved 💬 3 comments Opened May 21, 2026 by miraclebakelaser Closed May 26, 2026
💡 Likely answer: A maintainer (miraclebakelaser, contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.513.31313 (2867)

What subscription do you have?

Pro

What platform is your computer?

Darwin 25.4.0 arm64 arm

What issue are you seeing?

The /mcp command in both Codex App and CLI do not show project-scoped (.codex/config.toml) mcp servers. They only show global mcp servers.

What steps can reproduce the bug?

Add an mcp server to a project's .codex/config.toml file. Open codex and run the /mcp command. The project-scoped server will not show in the list of servers. However, the agent can invoke the mcp server if you tell it to.

What is the expected behavior?

Project-scoped mcp servers should show up in the /mcp list of mcp servers.

Additional information

_No response_

View original on GitHub ↗

3 Comments

jshaofa-ui · 3 months ago

Proposed Solution: /mcp Project-Scoped Server Visibility

Root Cause

The /mcp command only reads global config (~/.codex/config.toml) and does not merge project-scoped servers from .codex/config.toml. The runtime loads both configs (so the agent can invoke project servers), but the listing command uses a different code path.

Key Fix

async function listMcpServers(): Promise<McpServerInfo[]> {
  const globalServers = (await loadConfig('~/.codex/config.toml')).mcp?.servers ?? [];
  const projectServers = (await loadProjectConfig('.codex/config.toml'))?.mcp?.servers ?? [];
  
  const merged = new Map();
  for (const s of globalServers) merged.set(s.name, { ...s, scope: 'global' });
  for (const s of projectServers) merged.set(s.name, { ...s, scope: 'project' });
  return Array.from(merged.values());
}

Full solution: solutions/codex-23874-mcp-command-missing-project-scoped-fix.md
Estimated effort: 2-3 hours | Quote: $1,000–$2,000

jshaofa-ui · 3 months ago

Proposed Solution: /mcp missing project-scoped servers

Root Cause

The /mcp command only queries user-level configuration (~/.codex/mcp.json), missing project-scoped servers (.codex/mcp.json).

Fix (Option A - Recommended)

Aggregate all config sources: modify /mcp to display servers from both user-level and project-level configurations, with clear source labeling.

Fix (Option B - Convenience)

Add scope filter: /mcp --scope=user, /mcp --scope=project, /mcp --scope=all

Testing

  • User-level only → shows user servers
  • Project-level only → shows project servers
  • Both levels with overlap → merged, project overrides
  • /mcp --scope=project → only project servers

Full solution: solutions/codex-23874-mcp-command-project-scoped-servers-fix.md

miraclebakelaser contributor · 3 months ago