-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add OAuth authentication client for HTTPX #751
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nits, i also pushed a commit for scope handling.
I tested this against the typescript example, and it successfully connected after the scope fix
examples/clients/simple-auth-client/mcp_simple_auth_client/main.py
Outdated
Show resolved
Hide resolved
examples/clients/simple-auth-client/mcp_simple_auth_client/main.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think it's upset about some linting errors. but otherwise lgtm!
@ihrpr Thank you very much for working on this request quickly! The OAuth implementation looks great and works well for our use case. With the Token Storage Provider in place, as long as the contract is maintained, we can also bypass the 3-legged OAuth flow and connect to MCP servers using an internally generated OAuth token - which is also perfect for us. |
Adding support for Auth in client using HTTPX Custom authentication schemes
.
NOTE: This PR adds support for Streamable HTTP, but SSE will be added as a follow up, all we need to do is to add one parameter.
This PR Implements Auth in spec version 2025-03-26
Follow ups:
Related Issues:
#652
Related PRs:
#700
#308