Title: Extract reusable OAuth authorization redirect builder by maxpetrusenkoagent · Pull Request #2856 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Extract reusable OAuth authorization redirect builder by maxpetrusenkoagent · Pull Request #2856 · modelcontextprotocol/python-sdk
X Title: Extract reusable OAuth authorization redirect builder by maxpetrusenkoagent · Pull Request #2856 · modelcontextprotocol/python-sdk
Description: Summary Fixes #1743. Extracts the reusable OAuth authorization redirect step from OAuthClientProvider into a public helper for proxy/server-side use cases: adds OAuthAuthorizationRedirect, a resumable authorization redirect result containing the authorization URL, OAuth state, and PKCE verifier adds build_authorization_redirect(...) so callers can build and persist the browser redirect step without needing redirect_handler / callback_handler keeps OAuthClientProvider behavior routed through the new helper preserves existing authorization endpoint query parameters and hides the PKCE verifier from repr(...) Verification uv run --frozen pytest tests/client/test_auth.py tests/interaction/auth/test_flow.py -q uv run --frozen coverage erase && uv run --frozen coverage run -m pytest tests/client/test_auth.py tests/interaction/auth/test_flow.py && uv run --frozen coverage combine && uv run --frozen coverage report --include='src/mcp/client/auth/oauth2.py,src/mcp/client/auth/__init__.py' --fail-under=0 && UV_FROZEN=1 uv run --frozen strict-no-cover uv run --frozen ruff format --check src/mcp/client/auth/oauth2.py src/mcp/client/auth/__init__.py tests/client/test_auth.py uv run --frozen ruff check src/mcp/client/auth/oauth2.py src/mcp/client/auth/__init__.py tests/client/test_auth.py uv run --frozen pyright src/mcp/client/auth/oauth2.py src/mcp/client/auth/__init__.py tests/client/test_auth.py ./scripts/test → 1786 passed, 5 skipped, 1 xfailed, 100.00% coverage, strict-no-cover clean Review Local autoreview found no blocking issues. It suggested preserving existing authorization endpoint query parameters and hiding the PKCE verifier in repr; both are included and covered by regression tests.
Open Graph Description: Summary Fixes #1743. Extracts the reusable OAuth authorization redirect step from OAuthClientProvider into a public helper for proxy/server-side use cases: adds OAuthAuthorizationRedirect, a resum...
X Description: Summary Fixes #1743. Extracts the reusable OAuth authorization redirect step from OAuthClientProvider into a public helper for proxy/server-side use cases: adds OAuthAuthorizationRedirect, a resum...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2856
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:eeb772a9-e92d-4cc8-4305-de2b8f75d445 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A44A:24CF91:158E2D1:1C5FC28:6A5C63DC |
| html-safe-nonce | ad97930c624f1a5fd5b519fa1e0cca7465f072150797d2252ee6bdb5373ef1d3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDRBOjI0Q0Y5MToxNThFMkQxOjFDNUZDMjg6NkE1QzYzREMiLCJ2aXNpdG9yX2lkIjoiMzI0NzY0MTQ3MTQ1MDA4MDkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d685f18e035b727100c16f3957a2ad44af86d123347040f784f8dbcae7ce46fc |
| hovercard-subject-tag | pull_request:3858774992 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/2856/files |
| twitter:image | https://avatars.githubusercontent.com/u/280464918?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/280464918?s=400&v=4 |
| og:image:alt | Summary Fixes #1743. Extracts the reusable OAuth authorization redirect step from OAuthClientProvider into a public helper for proxy/server-side use cases: adds OAuthAuthorizationRedirect, a resum... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width