python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

fall through if PRM endpoint is not implemented

Open dogacancolak opened this issue 3 months ago • 2 comments

Motivation and Context

As raised in https://github.com/modelcontextprotocol/python-sdk/issues/1495, one of the changes in https://github.com/modelcontextprotocol/python-sdk/pull/1324 included raising an error if PRM endpoint request failed. This caused backwards compatibility issues with MCP servers that haven't yet added support for PRM

How Has This Been Tested?

Breaking Changes

Types of changes

  • [x] 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

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

Additional context

dogacancolak avatar Oct 31 '25 16:10 dogacancolak

Thanks for the PR! Could you please add a unit test for this which would fail before the fix and pass with your changes

@maxisbey Thanks for the feedback! I added a unit test that closely mimics another test named test_oauth_discovery_fallback_conditions (right above the one I added). I have confirmed that the new unit test fails without the change in the PR, and succeeds with the change.

dogacancolak avatar Nov 12 '25 21:11 dogacancolak

Hi @maxisbey, seems like you've made some extensive changes that also cover this bug. I can fix the PR checks if you think this unit test will be useful. Otherwise we can close this PR.

dogacancolak avatar Nov 13 '25 14:11 dogacancolak