codex - 💡(How to fix) Fix Upgrade `rmcp` dependency to 1.4.0 to fix MCP HTTP/Cloudflare connection issues [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#17529Fetched 2026-04-12 13:26:58
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×5commented ×1

The Codex CLI and codex_apps currently depend on rmcp = "0.15.0". As reported in multiple issues (e.g., #16485, #12859, #13852), this older version of the RMCP client lacks support for injecting custom HTTP headers (such as User-Agent or specific Auth headers) into Streamable HTTP and WebSocket handshakes. This causes MCP connections to fail behind Cloudflare, strict corporate proxies, or services like Supabase that require specific headers or constant re-authentication.

Root Cause

The Codex CLI and codex_apps currently depend on rmcp = "0.15.0". As reported in multiple issues (e.g., #16485, #12859, #13852), this older version of the RMCP client lacks support for injecting custom HTTP headers (such as User-Agent or specific Auth headers) into Streamable HTTP and WebSocket handshakes. This causes MCP connections to fail behind Cloudflare, strict corporate proxies, or services like Supabase that require specific headers or constant re-authentication.

RAW_BUFFERClick to expand / collapse

Description

The Codex CLI and codex_apps currently depend on rmcp = "0.15.0". As reported in multiple issues (e.g., #16485, #12859, #13852), this older version of the RMCP client lacks support for injecting custom HTTP headers (such as User-Agent or specific Auth headers) into Streamable HTTP and WebSocket handshakes. This causes MCP connections to fail behind Cloudflare, strict corporate proxies, or services like Supabase that require specific headers or constant re-authentication.

Proposed Solution

The rmcp crate has seen significant development and the 1.4.0 release introduces critical fixes for these exact problems:

  • StreamableHttpClient trait methods (post_message, delete_session, get_stream) now accept a headers parameter.
  • Extensive stability improvements to PaginatedRequestParams and the OAuthState machine.

We strongly recommend upgrading the rmcp dependency across the workspace to ^1.4.0.

Migration Effort

We have already successfully performed this migration in our downstream fork. Upgrading requires adapting to the new #[non_exhaustive] struct builders in rmcp::model::* (such as InitializeRequestParams, CallToolResult, ServerCapabilities, Implementation) and updating the StreamableHttpClient trait signatures in codex-rmcp-client.

If the maintainers are open to this upgrade, we would be happy to submit a Pull Request with the complete rmcp 1.4.0 migration to help close the aforementioned connection and auth issues.

extent analysis

TL;DR

Upgrading the rmcp dependency to ^1.4.0 is likely to fix the issue with MCP connections failing behind certain proxies or services.

Guidance

  • Verify that the current rmcp version is indeed 0.15.0 and that upgrading to 1.4.0 is feasible in the project.
  • Review the changes introduced in rmcp version 1.4.0, particularly the StreamableHttpClient trait methods and the PaginatedRequestParams and OAuthState machine improvements.
  • Assess the migration effort required, including adapting to new struct builders in rmcp::model::* and updating StreamableHttpClient trait signatures in codex-rmcp-client.
  • Consider submitting a Pull Request with the complete rmcp 1.4.0 migration to help close the connection and auth issues.

Example

No code snippet is provided as it is not explicitly mentioned in the issue.

Notes

The migration effort may require significant changes to the codebase, and it is recommended to thoroughly review the changes introduced in rmcp version 1.4.0 before upgrading.

Recommendation

Apply the workaround by upgrading to rmcp version ^1.4.0, as it introduces critical fixes for the exact problems reported and has been successfully tested in a downstream fork.

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