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_
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
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_varand then separately sethttp_headersorenv_ http_headersdepending on whatever your server is expectingamazing! thanks for your support (:!
Best regards!