-
Notifications
You must be signed in to change notification settings - Fork 739
[FEAT] added support for AuthInfo in extra for StreamableHTTPServerTransport #399
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
base: main
Are you sure you want to change the base?
[FEAT] added support for AuthInfo in extra for StreamableHTTPServerTransport #399
Conversation
We tested this on a POC implementing an stateless server with Streamable HTTP Transport and it worked perfectly. It's the missing piece that allowed us to test our approach for a stateless server supporting OAuth-based authentication end-to-end. Great work! |
I ran into the same issue yesterday, would be great if this change could be added! |
We would also appreciate release with this fix |
waiting for this change as well.. without this, we cannot pass the AuthInfo to the tools. |
also waiting for this feature |
@jerome3o-anthropic @dsp-ant Would it be possible for one of the maintainers to kindly review the PR? Thank you! |
waiting for this also 🙏 |
Waiting for this |
I really need this 🙏 |
Includes the
req.auth
AuthInfo that's set by the MCP Server bearer auth middleware in the server request handler via Streamable HTTP Transport, allowing for distinguishing of users in requests (eg. tool use).Motivation and Context
Authorisation token passed through the client (MCP inspector) needs to be used by tools implemented by the server to make sure that they can get user specific data.
Implementation has been inspired from SSE Transport - #166
How Has This Been Tested?
Added unit tests ensuring:
Breaking Changes
None
Types of changes
Checklist
Additional context
Fixes #398