fix(opencode): forward configured headers in startAuth and mcp debug#20291
Open
obaranov wants to merge 1 commit intoanomalyco:devfrom
Open
fix(opencode): forward configured headers in startAuth and mcp debug#20291obaranov wants to merge 1 commit intoanomalyco:devfrom
obaranov wants to merge 1 commit intoanomalyco:devfrom
Conversation
74d67c1 to
d2f2d42
Compare
3 tasks
614a9ae to
04d4ede
Compare
04d4ede to
76e9c64
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #20286
Type of change
What does this PR do?
When a remote MCP server requires custom headers on all requests,
mcp authandmcp debugfail because the headers from config are not forwarded during the OAuth flow. TheconnectRemotepath already passes them correctly but we still miss headers when we run initial authentication (oauth).How did you verify your code works?
Tested against a real MCP server that requires a custom header on every request. Before the fix
mcp authreturned 404 and failed. After the fix auth completes successfully. Added two unit tests totest/mcp/headers-start-auth.test.tsthat verifystartAuthpassesrequestInitwith the configured headers to the transport constructor.If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!
How did you verify your code works?
Screenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist
If you do not follow this template your PR will be automatically rejected.