Upgrade `rmcp` dependency to 1.4.0 to fix MCP HTTP/Cloudflare connection issues
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:
StreamableHttpClienttrait methods (post_message,delete_session,get_stream) now accept aheadersparameter.- Extensive stability improvements to
PaginatedRequestParamsand theOAuthStatemachine.
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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗