codex icon indicating copy to clipboard operation
codex copied to clipboard

Add support for custom headers for streamable HTTP MCP servers

Open gpeal opened this issue 1 year ago • 4 comments

What feature would you like to see?

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

Additional information

No response

gpeal avatar Oct 14 '25 18:10 gpeal

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

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

Powered by Codex Action

github-actions[bot] avatar Oct 14 '25 18:10 github-actions[bot]

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

jdsalasca avatar Oct 17 '25 03:10 jdsalasca

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

gpeal avatar Oct 17 '25 03:10 gpeal

amazing! thanks for your support (:!

Best regards!

jdsalasca avatar Oct 17 '25 03:10 jdsalasca