codex - 💡(How to fix) Fix MCP/connectors discovery fails with 403 Forbidden Cloudflare challenge, despite successful ChatGPT login [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#19070Fetched 2026-04-23 07:31:02
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Root Cause

This machine currently has no user-configured custom MCP servers (codex mcp list returns none), so the failure does not appear to be caused by a broken local MCP server config.

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.122.0

What subscription do you have?

ChatGPT Pro

Which model were you using?

gpt-5.4

What platform is your computer?

macOS 26.1 Darwin Kernel Version 25.1.0 arm64

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

zsh shell TERM_PROGRAM / TERM_PROGRAM_VERSION were unset in this session, so the terminal emulator could not be determined programmatically

What issue are you seeing?

Codex CLI/TUI fails to load MCP/connectors discovery data from chatgpt.com backend endpoints. Requests to discovery-related endpoints return 403 Forbidden with a Cloudflare challenge HTML page instead of JSON.

Observed failing endpoints:

User-visible impact:

  • "failed to load full apps list; falling back to installed apps snapshot"
  • "failed to load discoverable tool suggestions"
  • MCP/connectors UI appears empty or broken, even though ChatGPT login succeeds

What steps can reproduce the bug?

  1. Run codex login
  2. Confirm auth succeeds with codex login status -> Logged in using ChatGPT
  3. Open Codex and enter a session where apps/connectors/tool suggestions are loaded
  4. Observe that apps list / discoverable tool suggestions fail to load
  5. Check logs: requests to the endpoints above return 403 Forbidden and the body is a Cloudflare challenge page (Enable JavaScript and cookies to continue)

This machine currently has no user-configured custom MCP servers (codex mcp list returns none), so the failure does not appear to be caused by a broken local MCP server config.

What is the expected behavior? After successful ChatGPT login, Codex should be able to fetch discovery data from the backend and load apps/connectors/ discoverable tool suggestions normally, returning JSON rather than a Cloudflare challenge page.

What is the expected behavior?

mcp works normal

Additional information

  • Affected account email: miles@... (can provide privately if needed)
    • codex login status returns Logged in using ChatGPT
    • codex mcp list returns No MCP servers configured yet
    • Local config does not contain any [mcp_servers.*] entries; only the Figma plugin is enabled
    • The response body is clearly a Cloudflare challenge page, including Enable JavaScript and cookies to continue
    • Example cf-ray values seen in logs:
      • 9f0606eaaa5c17fe
      • 9f060859edadd301
      • 9f06085a19f84855
    • Internal RMCP initialization still succeeds for codex-connectors-mcp, which suggests local MCP transport is alive and the failure is specifically on the remote discovery path
    • This may be related to other Cloudflare / bot-detection / TLS-fingerprint style 403 reports, but local evidence only proves the discovery requests are being challenged

extent analysis

TL;DR

The issue can be resolved by configuring the Codex CLI to properly handle Cloudflare challenges or by using a workaround to bypass the Cloudflare protection.

Guidance

  • Verify that the issue is indeed caused by Cloudflare challenges by checking the response body of the failed requests, which should contain the string "Enable JavaScript and cookies to continue".
  • Check the codex configuration to see if there are any options to handle Cloudflare challenges or to disable TLS fingerprinting.
  • Consider using a proxy or a user agent rotation to bypass the Cloudflare protection, but be aware that this may be against the terms of service of the ChatGPT API.
  • If the issue is caused by a misconfiguration of the local MCP server, try resetting the MCP configuration to its default state using codex mcp reset.

Example

No code example is provided as the issue seems to be related to the configuration of the Codex CLI and the Cloudflare protection.

Notes

The issue may be related to other reports of Cloudflare challenges and bot-detection, but the local evidence only proves that the discovery requests are being challenged. The solution may require coordination with the ChatGPT API team or the Cloudflare support team.

Recommendation

Apply a workaround to bypass the Cloudflare protection, such as using a proxy or a user agent rotation, but be aware that this may be against the terms of service of the ChatGPT API. This is recommended because the issue seems to be caused by a Cloudflare challenge, and configuring the Codex CLI to properly handle these challenges may not be possible.

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…

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 MCP/connectors discovery fails with 403 Forbidden Cloudflare challenge, despite successful ChatGPT login [1 comments, 2 participants]