-
Notifications
You must be signed in to change notification settings - Fork 400
fix(oauth): pass bearer token to all streamable http requests #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(oauth): pass bearer token to all streamable http requests #476
Conversation
There was an errant typo in the CHANGELOG that is breaking CI
6ddf259 to
79548e2
Compare
|
Aligns with my understanding
per https://modelcontextprotocol.io/specification/draft/basic/authorization#token-requirements |
|
@gpeal thank you very much for this fix, our MCP wasn't working properly and was planning to dig into |
[Release notes](https://github.com/modelcontextprotocol/rust-sdk/releases) Notably, this picks up two of my PRs that have four separate fixes for oauth dynamic client registration and auth modelcontextprotocol/rust-sdk#489 modelcontextprotocol/rust-sdk#476
[Release notes](https://github.com/modelcontextprotocol/rust-sdk/releases) Notably, this picks up two of my PRs that have four separate fixes for oauth dynamic client registration and auth modelcontextprotocol/rust-sdk#489 modelcontextprotocol/rust-sdk#476
[Release notes](https://github.com/modelcontextprotocol/rust-sdk/releases) Notably, this picks up two of my PRs that have four separate fixes for oauth dynamic client registration and auth modelcontextprotocol/rust-sdk#489 modelcontextprotocol/rust-sdk#476
[Release notes](https://github.com/modelcontextprotocol/rust-sdk/releases) Notably, this picks up two of my PRs that have four separate fixes for oauth dynamic client registration and auth modelcontextprotocol/rust-sdk#489 modelcontextprotocol/rust-sdk#476
[Release notes](https://github.com/modelcontextprotocol/rust-sdk/releases) Notably, this picks up two of my PRs that have four separate fixes for oauth dynamic client registration and auth modelcontextprotocol/rust-sdk#489 modelcontextprotocol/rust-sdk#476
Motivation and Context
The auth token wasn't passed to all endpoints which causes 401s in some MCP servers such as GitHub's.
I also clarified that the auth header should be just the bearer token rather than the full header value.
It is possible that some clients were passing in the wrong value here (like Codex)
Please confirm that this is the expected behavior.
How Has This Been Tested?
I was able to repro the GitHub MCP 401 and confirm that it works after this change
Codex:

Breaking Changes
None.
Types of changes
Checklist
Additional context
I wrote the core code by hand (it also matches #464) but codex wrote the tests.
Fixes #464