Lightweight coding agent that runs in your terminal
Rust
Extract MCP environment headers into a local variable (#36047)
Alexi Christakis410c22b30e71
diff --git a/codex-rs/codex-mcp/src/mcp/mod.rs b/codex-rs/codex-mcp/src/mcp/mod.rsindex b8422e1e74..9dadc8fea0 100644--- a/codex-rs/codex-mcp/src/mcp/mod.rs+++ b/codex-rs/codex-mcp/src/mcp/mod.rs@@ -526,13 +526,14 @@ fn mcp_server_config_for_url(if let Some(originator) = originator {http_headers.insert("originator".to_string(), originator.to_string());}+ let env_http_headers = None;McpServerConfig {transport: McpServerTransportConfig::StreamableHttp {url,bearer_token_env_var: codex_apps_mcp_bearer_token_env_var(),http_headers: Some(http_headers),- env_http_headers: None,+ env_http_headers,},auth: auth_mode,environment_id: codex_config::DEFAULT_MCP_SERVER_ENVIRONMENT_ID.to_string(),