Skip to content

Conversation

vipyne
Copy link

@vipyne vipyne commented Jun 25, 2025

Motivation and Context

auth was missing from the {SseServer,StreamableHttp}Parameters types. I could see arguments against this (especially since it adds arbitrary_types_allowed=True), but I think the pydantic types should include all server params. httpx_client_factory could also be added, but honestly, I don't fully understand it so I didn't want to change that part.

How Has This Been Tested?

Breaking Changes

In theory it won't break anything. The property added in {SseServer,StreamableHttp}Parameters is optional, so if it is not included, nothing breaks. Auth is also a relatively new parameter for sse_client and streamablehttp_client, so potentially not many people have utilized it yet.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Copy link
Contributor

@ihrpr ihrpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing to the MCP Python SDK. While auth was added, it hasn't been passed through for use in SessionGroup. Since parameters are intended for server configuration, this isn't the appropriate abstraction for adding auth. A better approach for propagating auth config would be to use httpx_client_factory, or preferably, pass an already initialized client directly, as httpx_client_factory will be deprecated in favor of direct client passing

@vipyne vipyne closed this Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants