codex - 💡(How to fix) Fix Codex Desktop authenticates OAuth MCP server but never imports tools into threads; auth_status stays unsupported [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20009Fetched 2026-04-29 06:23:47
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×1unlabeled ×1

Code Example

[
  {
    "name": "<server-name>",
    "enabled": true,
    "disabled_reason": null,
    "transport": {
      "type": "streamable_http",
      "url": "<streamable-http-mcp-url>",
      "bearer_token_env_var": null,
      "http_headers": null,
      "env_http_headers": null
    },
    "startup_timeout_sec": null,
    "tool_timeout_sec": null,
    "auth_status": "unsupported"
  }
]

---

[mcp_servers.<server-name>]
url = "<streamable-http-mcp-url>"
RAW_BUFFERClick to expand / collapse

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

Codex Desktop 0.125.0-alpha.3 is shown in local session metadata as the active CLI/app runtime.

What subscription do you have?

Unknown from the app logs on this machine.

What platform is your computer?

macOS (Darwin, Apple Silicon). The workspace is local.

What issue are you seeing?

Codex Desktop successfully adds and authenticates a streamable HTTP MCP server, but never surfaces that server's tools in any thread.

What works:

  • codex mcp add <server-name> --url <streamable-http-mcp-url>
  • codex mcp login <server-name>
  • OAuth completes successfully multiple times
  • codex mcp list --json shows the server is present and enabled
  • Manually calling tools/list with the same bearer token Codex obtained returns the expected tool list from the MCP server

What fails:

  • codex mcp list --json reports "auth_status": "unsupported"
  • Codex Desktop threads never receive any dynamic tool entries for the configured MCP server
  • Restarting Codex Desktop does not help
  • Removing the server, re-adding it, and re-authing from scratch does not help

This makes the server look configured and authenticated, but it is never actually imported into the thread tool registry.

Steps to reproduce

  1. Add a streamable HTTP MCP server that advertises OAuth:
    • codex mcp add <server-name> --url <streamable-http-mcp-url>
  2. Authenticate it:
    • codex mcp login <server-name>
  3. Complete the browser OAuth flow
  4. Start a new Codex Desktop thread or restart Codex Desktop
  5. Ask the thread whether the MCP server's tools are available

Expected behavior

After successful OAuth, Codex Desktop should import the MCP server's tools into new threads.

Actual behavior

The server remains visible in MCP config, but no tools from that MCP server are exposed in threads.

Evidence

codex mcp list --json returns:

[
  {
    "name": "<server-name>",
    "enabled": true,
    "disabled_reason": null,
    "transport": {
      "type": "streamable_http",
      "url": "<streamable-http-mcp-url>",
      "bearer_token_env_var": null,
      "http_headers": null,
      "env_http_headers": null
    },
    "startup_timeout_sec": null,
    "tool_timeout_sec": null,
    "auth_status": "unsupported"
  }
]

~/.codex/config.toml contains:

[mcp_servers.<server-name>]
url = "<streamable-http-mcp-url>"

Local thread state shows no dynamic tool entries for the configured MCP server at all. Recent threads only have built-in tools like:

  • automation_update
  • read_thread_terminal
  • load_workspace_dependencies
  • install_workspace_dependencies

In the local SQLite state DB (~/.codex/state_5.sqlite), the thread_dynamic_tools table never gets an entry for the configured MCP server in recent threads.

Also, the server itself appears healthy:

  • Unauthenticated tools/list returns 401 Unauthorized
  • The server advertises OAuth metadata correctly
  • Manual tools/list with the same Codex-issued bearer token succeeds and returns the expected MCP tool list

That suggests the server is not the problem; the issue appears to be in Codex Desktop/CLI auth classification or MCP tool import after login.

Additional notes

  • codex mcp login <server-name> succeeds repeatedly, but codex mcp list --json still reports "auth_status": "unsupported"
  • There is no legacy ~/.codex/.credentials.json on this machine
  • The visible ~/.codex/auth.json does not expose a named top-level credential entry for the configured MCP server

extent analysis

TL;DR

The issue might be related to the authentication status of the MCP server being reported as "unsupported" despite successful OAuth, suggesting a potential problem with Codex Desktop's auth classification or MCP tool import.

Guidance

  • Verify that the auth_status field in the codex mcp list --json output is indeed "unsupported" after successful OAuth, as this could indicate an issue with how Codex Desktop handles authentication for the MCP server.
  • Check the Codex Desktop version and ensure it is up-to-date, as the issue might be related to a known bug that has been fixed in a later version.
  • Investigate the SQLite state DB (~/.codex/state_5.sqlite) to see if there are any issues with how dynamic tool entries are being stored or retrieved for the configured MCP server.
  • Review the ~/.codex/config.toml and ~/.codex/auth.json files to ensure that the MCP server configuration and authentication credentials are correctly set up.

Example

No specific code snippet can be provided without more information about the internal workings of Codex Desktop and the MCP server. However, checking the authentication flow and tool import logic in the Codex Desktop codebase might provide insights into why the MCP server's tools are not being surfaced.

Notes

The issue seems to be specific to the interaction between Codex Desktop and the MCP server, and more detailed debugging or logging might be necessary to pinpoint the exact cause. The fact that manual calls to the MCP server's tools/list endpoint succeed with the same bearer token suggests that the issue lies within Codex Desktop's handling of the MCP server's tools.

Recommendation

Apply workaround: Investigate and potentially modify the authentication classification or MCP tool import logic in Codex Desktop to correctly handle the MCP server's authentication status and tool registration. This might involve updating the Codex Desktop version or manually configuring the authentication settings.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

After successful OAuth, Codex Desktop should import the MCP server's tools into new threads.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex Desktop authenticates OAuth MCP server but never imports tools into threads; auth_status stays unsupported [1 comments, 2 participants]