René's URL Explorer Experiment


Title: Follow redirects only within the MCP endpoint's origin by maxisbey · Pull Request #3397 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: Follow redirects only within the MCP endpoint's origin by maxisbey · Pull Request #3397 · modelcontextprotocol/python-sdk

X Title: Follow redirects only within the MCP endpoint's origin by maxisbey · Pull Request #3397 · modelcontextprotocol/python-sdk

Description: Redirect handling in the HTTP client transports depended on who built the httpx2.AsyncClient: the SDK's default client followed every redirect, while a client you pass in (the way to set headers or auth on 2.x) followed none unless you added follow_redirects=True, which the docs told you to do. This moves redirect handling into the transports themselves and scopes it to the endpoint's origin, so it behaves the same for every client and a redirect can't quietly move a connection to a different host. Motivation and Context follow_redirects=True was turned on in the client factory for trailing-slash 307s from Starlette-mounted servers (#105, #732) and hosted servers that redirect (#283) — same-origin redirects. Following any redirect also meant the transport would carry on against whatever host a Location header named, re-sending what was configured for the original endpoint (headers, auth, request body) there and treating the answer as the MCP server's. httpx2 leaves following off by default and keeps that kind of policy out of the library (encode/httpx#2533), so it belongs in the transport. streamable_http_client and sse_client now send each request with following disabled at the request level and handle a redirect themselves: a redirect that stays on the endpoint's origin (same scheme, host and port, or http→https on the same host with default ports) and keeps the request method (307/308; any status for a GET) is followed, using httpx2's own next-request construction, up to the client's max_redirects — a 301/302/303 answering a POST is not, because httpx2 would replay it as a body-less GET, and neither is a Location carrying userinfo; any other redirect (including one past the max_redirects budget, so a loop too) is not followed, and no request is made to its location. The transport gets the redirect response back unfollowed, exactly as httpx2 hands one back with following off, and treats it as the non-success it is: a message POST or a resumption GET resolves that call with an MCPError naming the location while the session stays usable (the per-request shape every other non-2xx already has on 2.x), the standalone GET stream logs it and stops rather than retrying, and the SSE connect fails with httpx2.HTTPStatusError for the redirect response. When an https endpoint redirects to plain http on the same host — usually a TLS-terminating proxy the server doesn't trust plus a trailing slash — the error says so and suggests the https form of the location, never the http one. This holds whichever client is in use, so a caller-supplied client no longer needs follow_redirects=True for the trailing-slash case, and setting it doesn't widen what the transport follows. httpx2 applies the per-request setting to the requests an auth= flow makes as well, so OAuthClientProvider and IdentityAssertionOAuthProvider apply the same rule to their own requests (discovery, registration, token, refresh) through a small shared base: a within-origin, method-preserving redirect is followed, anything else is treated as that URL not answering (discovery moves on to the next well-known candidate; registration/token errors name the redirect). create_mcp_http_client drops follow_redirects=True and keeps only the timeouts. How Has This Been Tested? Helper tests over httpx2.MockTransport (tests/shared/test_httpx_utils.py): same-origin, relative and https-upgrade redirects followed with method and body intact and the intermediate response closed; other host, other port, subdomain, other scheme, https→http, 301/302/303-on-POST and userinfo locations handed back unfollowed with no request recorded for the location; the hop budget hands back the next redirect; a client built with follow_redirects=True is still scoped; the SSE form sends the headers AsyncClient.sse() sends. OAuth flow tests: a flow request follows a same-origin redirect, hands back a cross-origin one, and stops after a few hops. Transport tests through Client / sse_client with in-process transports: Starlette's /mcp → /mcp/ redirect is followed with a caller-supplied client left at httpx2's default; a redirect to another origin fails that one call with MCPError while the next call on the same session succeeds, and that origin is never contacted; the SSE connect equivalents. These fail on main and pass here. By hand against uvicorn on loopback: a Mount-induced 307 is followed and tool calls work with default, no-follow and follow-enabled clients; an endpoint that 307s to a different port fails the call with the error above and the second server logs no request; an OAuth flow whose first metadata candidate 307s to another port skips it (that port sees nothing) and whose registration endpoint 308s to /register/ registers normally; a same-origin redirect loop fails the one call and the session carries on. The existing streamable HTTP and SSE suites exercise the new path on every connection (their in-process apps are Mounted, so each one rides a real 307). Full suite with coverage, pyright and ruff pass locally. Breaking Changes A redirect from the MCP endpoint to a different origin (or a 301/302/303 answering a POST) is no longer followed: the call fails with MCPError ("Redirect to … not followed; use that URL as the endpoint if it is the intended server") instead of being followed (SDK default client) or ending in Unexpected content type (caller-supplied client). The http→https allowance applies only when neither side names a non-default port. Requests the SDK's OAuth providers make follow the same rule; previously they followed whatever the client was configured to follow. A redirect loop now fails the one call instead of raising httpx2.TooManyRedirects out of the transport. follow_redirects on a caller-supplied client is no longer consulted for MCP requests; same-origin redirects are followed regardless of it. The private mcp.shared._httpx_utils.create_mcp_http_client no longer enables follow_redirects. 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 am assigned to the linked issue (or it is labeled help wanted, or I'm a maintainer) I have disclosed any AI assistance and can explain the change in my own words 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 Docs and examples no longer pass follow_redirects=True when building a client; docs/client/transports.md and docs/client/oauth-clients.md describe the redirect behaviour, the docs/migration.md passages that told v1 users to set the flag are corrected, and docs/run/asgi.md points clients at the mounted path that doesn't redirect. Translated pages aren't regenerated in this PR. examples/servers/simple-tool fetched arbitrary web pages through the private MCP client factory; it now uses a plain httpx2.AsyncClient(follow_redirects=True) of its own. Supersedes #3075, which scoped redirects at the client factory only and had grown well past that; this is the smaller change at the transport. AI Disclaimer

Open Graph Description: Redirect handling in the HTTP client transports depended on who built the httpx2.AsyncClient: the SDK's default client followed every redirect, while a client you pass in (the way to set header...

X Description: Redirect handling in the HTTP client transports depended on who built the httpx2.AsyncClient: the SDK's default client followed every redirect, while a client you pass in (the way to set he...

Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/3397

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:bf23fbd8-631e-294c-e3f3-98eebfe225d0
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBC3A:76F02:115AB36:164C67C:6B010DBE
html-safe-noncef0b12d84f929a059f706f0378af333d66d0b5a390d9a7103606bd6bc0ff97505
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzNBOjc2RjAyOjExNUFCMzY6MTY0QzY3Qzo2QjAxMERCRSIsInZpc2l0b3JfaWQiOiI2NjM1OTMxODY5NDk2MDIwNDE0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac91a8b7037b4e9cd3cd363cb10bab75e1f49590cb70c2f1d7c0abb1b674f3de08
hovercard-subject-tagpull_request:4368167750
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/3397/files
twitter:imagehttps://avatars.githubusercontent.com/u/224885523?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/224885523?s=400&v=4
og:image:altRedirect handling in the HTTP client transports depended on who built the httpx2.AsyncClient: the SDK's default client followed every redirect, while a client you pass in (the way to set header...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git
octolytics-dimension-user_id182288589
octolytics-dimension-user_loginmodelcontextprotocol
octolytics-dimension-repository_id862584018
octolytics-dimension-repository_nwomodelcontextprotocol/python-sdk
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id862584018
octolytics-dimension-repository_network_root_nwomodelcontextprotocol/python-sdk
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F3397%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F3397%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=modelcontextprotocol%2Fpython-sdk
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files
modelcontextprotocolhttps://github.com/modelcontextprotocol
python-sdkhttps://github.com/modelcontextprotocol/python-sdk
Codehttps://github.com/modelcontextprotocol/python-sdk
Issues308 (308)https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests112 (112)https://github.com/modelcontextprotocol/python-sdk/pulls
Actionshttps://github.com/modelcontextprotocol/python-sdk/actions
Projectshttps://github.com/modelcontextprotocol/python-sdk/projects
Security and quality12 (12)https://github.com/modelcontextprotocol/python-sdk/security
Insightshttps://github.com/modelcontextprotocol/python-sdk/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2Fnew%2Fchoose
maxisbeyhttps://github.com/maxisbey
mainhttps://github.com/modelcontextprotocol/python-sdk/tree/main
same-origin-redirectshttps://github.com/modelcontextprotocol/python-sdk/tree/same-origin-redirects
Conversation 38 https://github.com/modelcontextprotocol/python-sdk/pull/3397
Commits 7 https://github.com/modelcontextprotocol/python-sdk/pull/3397/commits
Checks 43 https://github.com/modelcontextprotocol/python-sdk/pull/3397/checks
Files changed 25 https://github.com/modelcontextprotocol/python-sdk/pull/3397/files
Follow redirects only within the MCP endpoint's origin https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#top
Show all changes 7 commits https://github.com/modelcontextprotocol/python-sdk/pull/3397/files
8080719 Follow redirects only within the MCP endpoint's origin maxisbey Aug 26, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/3397/commits/8080719239144575024ecaaeb1e7924ec50ad69b
4a4b8fb Only follow method-preserving redirects; resolve unfollowed ones on e… maxisbey Aug 26, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/3397/commits/4a4b8fb8a5d6dd355a41ecd94d55a1e345a76947
22d3735 Apply the redirect rule to OAuth's own requests; clearer message for … maxisbey Sep 4, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/3397/commits/22d3735033df2e5b74f5d21106c1d9a6b17b90c9
2983290 Merge remote-tracking branch 'origin/main' into same-origin-redirects maxisbey Sep 4, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/3397/commits/2983290126b6d123c4aaeefa17e003c6604d24d3
1051429 Name redirect locations without query or userinfo everywhere; refuse-… maxisbey Sep 4, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/3397/commits/10514291bd9ab2e0ae308528149b0ffefd0ebb0d
9dc7b84 docs: give redirect handling its own short section; add the proxy-hea… maxisbey Sep 4, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/3397/commits/9dc7b84e0a9a6d8de2742d6bf054818111910e0f
f98f5f3 docs: say which same-origin redirects are followed (307/308) in the R… maxisbey Sep 4, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/3397/commits/f98f5f3f6714e8c81af1d9bedf17c96762734747
Clear filters https://github.com/modelcontextprotocol/python-sdk/pull/3397/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files
oauth-clients.md https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-fddbc8202fcc19df6fe65cb61729b4ac59bc61a267deb348d4abe479061bad70
transports.md https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-1e8dad68fc5833fd229242cdafbfe85ab6382fbfb42e0c7e3080118ddc9b68c2
migration.md https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
asgi.md https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-87798bcf24a8cb8d02744b88e8d10738db40d75a24f5b3bf6f1ff27483b1bcc8
deploy.md https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-e3cd1ff8794fbfba68cb5ae71feec26e8499204134231a92257733653ec13e53
tutorial003.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-fdbc5c2ee10fdb42216c507550877693504f95e49084c542727a409e94ff46c5
tutorial001.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-c1a85c88138b90b132f75ac4f800192f3b68cd3229eb095b60e39741db46893b
tutorial001.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-cf4029dcf939a0e84c4a2d45ee3bbe58d6ab62c80ed7d1d98a2df452c79c8eac
tutorial002.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-e977f9ef9cd790f35b4d4ab1aeea39007c95a5478704997b8a6ae2c6f64f62d1
main.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-967e8584a0021a6f5b81aa9ef3f1e549efd761fe3fb4733e5212ce027e0bcfce
server.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-ba52c682d4e3fbfa81efb481c7df117341f6502fcf7b99f0722448f0ffbfb9bd
identity_assertion_client.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-d9f410e6ec455a5b5eb325f6a53c2a67daf7ffc7376a00ebb1296df6210f74c5
oauth_client.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-027c2794f55d97303e0b285c161c1f068be0f1ae44624885ddb1664bee9edd32
identity_assertion.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-46a914434a87fa6647279942143c579485166d92ba2690db1c704ac88d804a06
oauth2.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-b7aaf2062da175cea9a532176d6eb78b659eaadb757cc48929f0bafccfdb8d98
utils.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-1aed3def34492fb7eafa6e7aee6e9cc9973171b28c9574dc5c5b288a09878996
sse.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-41ed2e8548ae223801c0a37a6b50ce913e24f0e660bbbc2ddd91686820c86336
streamable_http.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-e8c18a3067a9b157c5c39a947f53d395afeb00e7026dad2d5a279011da943b5e
_httpx_utils.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-c4baff3567caa38efcdfd8b6a554abe19fcf6429c80e6e693ed1a847a7aec431
test_auth.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-f083d075f463e8b1ecfa6b931c33288c3d09b00ee3af3e5f74df16b7e75c3ab1
test_http_unicode.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-1abfe619fb6ecef0087c7e77c14530625aee85ec1dc1db958de2f341769c21c9
test_streamable_http.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-09ecebf3cb1cb198a43bd3159ecf388a4dfdc38f93c9812b671f40fc2c83ec29
test_httpx_utils.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-b0498e819959a6703b5a7ae1a5d5738d0779b500589c6fd4eca497bfa0fe32bb
test_sse.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-a2934f5f6ec610dff6774352c41b8c697b539614667643d69fd67f6fc6d7765e
test_streamable_http.py https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-57d1f3c64af36960aa61b1d77387fb6201b90fbc2f3d606bf2761315ce618cc5
docs/client/oauth-clients.mdhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-fddbc8202fcc19df6fe65cb61729b4ac59bc61a267deb348d4abe479061bad70
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/docs/client/oauth-clients.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-fddbc8202fcc19df6fe65cb61729b4ac59bc61a267deb348d4abe479061bad70
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-fddbc8202fcc19df6fe65cb61729b4ac59bc61a267deb348d4abe479061bad70
docs/client/transports.mdhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-1e8dad68fc5833fd229242cdafbfe85ab6382fbfb42e0c7e3080118ddc9b68c2
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/docs/client/transports.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-1e8dad68fc5833fd229242cdafbfe85ab6382fbfb42e0c7e3080118ddc9b68c2
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-1e8dad68fc5833fd229242cdafbfe85ab6382fbfb42e0c7e3080118ddc9b68c2
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-1e8dad68fc5833fd229242cdafbfe85ab6382fbfb42e0c7e3080118ddc9b68c2
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-1e8dad68fc5833fd229242cdafbfe85ab6382fbfb42e0c7e3080118ddc9b68c2
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-1e8dad68fc5833fd229242cdafbfe85ab6382fbfb42e0c7e3080118ddc9b68c2
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-1e8dad68fc5833fd229242cdafbfe85ab6382fbfb42e0c7e3080118ddc9b68c2
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-1e8dad68fc5833fd229242cdafbfe85ab6382fbfb42e0c7e3080118ddc9b68c2
docs/migration.mdhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/docs/migration.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
docs/run/asgi.mdhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-87798bcf24a8cb8d02744b88e8d10738db40d75a24f5b3bf6f1ff27483b1bcc8
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/docs/run/asgi.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-87798bcf24a8cb8d02744b88e8d10738db40d75a24f5b3bf6f1ff27483b1bcc8
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-87798bcf24a8cb8d02744b88e8d10738db40d75a24f5b3bf6f1ff27483b1bcc8
docs/run/deploy.mdhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-e3cd1ff8794fbfba68cb5ae71feec26e8499204134231a92257733653ec13e53
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/docs/run/deploy.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-e3cd1ff8794fbfba68cb5ae71feec26e8499204134231a92257733653ec13e53
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-e3cd1ff8794fbfba68cb5ae71feec26e8499204134231a92257733653ec13e53
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-e3cd1ff8794fbfba68cb5ae71feec26e8499204134231a92257733653ec13e53
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-e3cd1ff8794fbfba68cb5ae71feec26e8499204134231a92257733653ec13e53
docs_src/client_transports/tutorial003.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-fdbc5c2ee10fdb42216c507550877693504f95e49084c542727a409e94ff46c5
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/docs_src/client_transports/tutorial003.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-fdbc5c2ee10fdb42216c507550877693504f95e49084c542727a409e94ff46c5
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-fdbc5c2ee10fdb42216c507550877693504f95e49084c542727a409e94ff46c5
docs_src/identity_assertion/tutorial001.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-c1a85c88138b90b132f75ac4f800192f3b68cd3229eb095b60e39741db46893b
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/docs_src/identity_assertion/tutorial001.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-c1a85c88138b90b132f75ac4f800192f3b68cd3229eb095b60e39741db46893b
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-c1a85c88138b90b132f75ac4f800192f3b68cd3229eb095b60e39741db46893b
docs_src/oauth_clients/tutorial001.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-cf4029dcf939a0e84c4a2d45ee3bbe58d6ab62c80ed7d1d98a2df452c79c8eac
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/docs_src/oauth_clients/tutorial001.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-cf4029dcf939a0e84c4a2d45ee3bbe58d6ab62c80ed7d1d98a2df452c79c8eac
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-cf4029dcf939a0e84c4a2d45ee3bbe58d6ab62c80ed7d1d98a2df452c79c8eac
docs_src/oauth_clients/tutorial002.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-e977f9ef9cd790f35b4d4ab1aeea39007c95a5478704997b8a6ae2c6f64f62d1
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/docs_src/oauth_clients/tutorial002.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-e977f9ef9cd790f35b4d4ab1aeea39007c95a5478704997b8a6ae2c6f64f62d1
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-e977f9ef9cd790f35b4d4ab1aeea39007c95a5478704997b8a6ae2c6f64f62d1
examples/clients/simple-auth-client/mcp_simple_auth_client/main.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-967e8584a0021a6f5b81aa9ef3f1e549efd761fe3fb4733e5212ce027e0bcfce
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/examples/clients/simple-auth-client/mcp_simple_auth_client/main.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-967e8584a0021a6f5b81aa9ef3f1e549efd761fe3fb4733e5212ce027e0bcfce
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-967e8584a0021a6f5b81aa9ef3f1e549efd761fe3fb4733e5212ce027e0bcfce
examples/servers/simple-tool/mcp_simple_tool/server.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-ba52c682d4e3fbfa81efb481c7df117341f6502fcf7b99f0722448f0ffbfb9bd
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/examples/servers/simple-tool/mcp_simple_tool/server.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-ba52c682d4e3fbfa81efb481c7df117341f6502fcf7b99f0722448f0ffbfb9bd
examples/snippets/clients/identity_assertion_client.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-d9f410e6ec455a5b5eb325f6a53c2a67daf7ffc7376a00ebb1296df6210f74c5
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/examples/snippets/clients/identity_assertion_client.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-d9f410e6ec455a5b5eb325f6a53c2a67daf7ffc7376a00ebb1296df6210f74c5
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-d9f410e6ec455a5b5eb325f6a53c2a67daf7ffc7376a00ebb1296df6210f74c5
examples/snippets/clients/oauth_client.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-027c2794f55d97303e0b285c161c1f068be0f1ae44624885ddb1664bee9edd32
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/examples/snippets/clients/oauth_client.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-027c2794f55d97303e0b285c161c1f068be0f1ae44624885ddb1664bee9edd32
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-027c2794f55d97303e0b285c161c1f068be0f1ae44624885ddb1664bee9edd32
src/mcp/client/auth/extensions/identity_assertion.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-46a914434a87fa6647279942143c579485166d92ba2690db1c704ac88d804a06
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/src/mcp/client/auth/extensions/identity_assertion.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-46a914434a87fa6647279942143c579485166d92ba2690db1c704ac88d804a06
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-46a914434a87fa6647279942143c579485166d92ba2690db1c704ac88d804a06
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-46a914434a87fa6647279942143c579485166d92ba2690db1c704ac88d804a06
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-46a914434a87fa6647279942143c579485166d92ba2690db1c704ac88d804a06
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-46a914434a87fa6647279942143c579485166d92ba2690db1c704ac88d804a06
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-46a914434a87fa6647279942143c579485166d92ba2690db1c704ac88d804a06
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-46a914434a87fa6647279942143c579485166d92ba2690db1c704ac88d804a06
src/mcp/client/auth/oauth2.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-b7aaf2062da175cea9a532176d6eb78b659eaadb757cc48929f0bafccfdb8d98
View file https://github.com/modelcontextprotocol/python-sdk/blob/f98f5f3f6714e8c81af1d9bedf17c96762734747/src/mcp/client/auth/oauth2.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3397/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-b7aaf2062da175cea9a532176d6eb78b659eaadb757cc48929f0bafccfdb8d98
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-b7aaf2062da175cea9a532176d6eb78b659eaadb757cc48929f0bafccfdb8d98
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-b7aaf2062da175cea9a532176d6eb78b659eaadb757cc48929f0bafccfdb8d98
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-b7aaf2062da175cea9a532176d6eb78b659eaadb757cc48929f0bafccfdb8d98
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-b7aaf2062da175cea9a532176d6eb78b659eaadb757cc48929f0bafccfdb8d98
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-b7aaf2062da175cea9a532176d6eb78b659eaadb757cc48929f0bafccfdb8d98
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-b7aaf2062da175cea9a532176d6eb78b659eaadb757cc48929f0bafccfdb8d98
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-b7aaf2062da175cea9a532176d6eb78b659eaadb757cc48929f0bafccfdb8d98
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-b7aaf2062da175cea9a532176d6eb78b659eaadb757cc48929f0bafccfdb8d98
https://github.com/modelcontextprotocol/python-sdk/pull/3397/files#diff-b7aaf2062da175cea9a532176d6eb78b659eaadb757cc48929f0bafccfdb8d98
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3397/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.