Add support for custom headers for streamable HTTP MCP servers

Resolved 💬 4 comments Opened Oct 14, 2025 by gpeal Closed Oct 17, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What feature would you like to see?

Requested as part of https://github.com/openai/codex/issues/4707

Additional information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 10 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #3196
  • #4707
  • #2502
  • #4496
  • #4828

Powered by Codex Action

jdsalasca contributor · 10 months ago

Wait a moment ... what if, for example, in my case, the target MCP is not expecting an authorization header but is expecting a custom header instead? Does this commit solve that scenario? If the target MCP server receives an invalid authorization token, the request could be rejected because it is not an expected incoming header, so can I not send the Authorization token at all? @gpeal

gpeal contributor · 10 months ago
Wait a moment ... what if, for example, in my case, the target MCP is not expecting an authorization header but is expecting a custom header instead? Does this commit solve that scenario? If the target MCP server receives an invalid authorization token, the request could be rejected because it is not an expected incoming header, so can I not send the Authorization token at all? @gpeal

That's correct. In your case, you can include or omit bearer_token_env_var and then separately set http_headers or env_ http_headers depending on whatever your server is expecting

jdsalasca contributor · 10 months ago

amazing! thanks for your support (:!

Best regards!