René's URL Explorer Experiment


Title: Add docs, tested examples, and a story for SEP-990 identity assertion by maxisbey · Pull Request #3004 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: Add docs, tested examples, and a story for SEP-990 identity assertion by maxisbey · Pull Request #3004 · modelcontextprotocol/python-sdk

X Title: Add docs, tested examples, and a story for SEP-990 identity assertion by maxisbey · Pull Request #3004 · modelcontextprotocol/python-sdk

Description: Documentation for the Identity Assertion Authorization Grant (SEP-990) that #2988 added. That PR shipped the implementation with two snippets under examples/snippets/ and a migration-guide entry; this adds the book page, the tested docs_src/ examples behind it, and a self-verifying story, in the architecture #2978 established. Motivation and Context IdentityAssertionOAuthProvider, exchange_identity_assertion, and AuthSettings(identity_assertion_enabled=...) are public API with no presence in the docs book, and nothing renders or executes the examples/snippets/ files. Concretely: docs/advanced/identity-assertion.md, a new page after OAuth clients in the nav. It covers both halves: the client provider (and its inverted trust model: the authorization server is configuration, never discovered from the MCP server) and the authorization-server hook. It is careful to keep the two parties apart that the rest of the book is allowed to blur: the enterprise IdP that issues the ID-JAG, and the MCP authorization server that accepts it. The two existing auth pages each gain a one-paragraph cross-reference. docs_src/identity_assertion/: the page's two included examples. The client uses the modern Client API with an in-process stand-in IdP. The authorization server really validates the ID-JAG with pyjwt (signature, typ, iss/aud/exp, the client_id match, jti replay, and an ID-JAG for a resource it does not serve is refused with invalid_target) instead of stubbing the validation out. tests/docs_src/test_identity_assertion.py proves the page's claims, including the whole grant end to end across two in-memory ASGI apps. The recorded wire is one 401, the issuer's well-known fetch, one POST /token, and the retried request: no /authorize, no /register, no protected-resource-metadata fetch. examples/stories/identity_assertion/: a self-verifying story (stand-in IdP, authorization server, bearer-gated MCP server, client), registered in the stories manifest and run by the tests/examples/ matrix over both server variants and both protocol eras. Two things worth a reviewer's attention: The shipped client snippet cannot complete the flow it demonstrates. examples/snippets/clients/identity_assertion_client.py sets issuer="http://localhost:8001", but an authorization server built with create_auth_routes serves its metadata issuer from an AnyHttpUrl, which renders a path-less origin as http://localhost:8001/. The provider's RFC 8414 §3.3 comparison is an exact string match, so discovery stops at issuer mismatch. It shipped that way because nothing executes the snippets, which is the gap this PR closes; the new page documents the exact-match rule and the end-to-end test pins it. I left the examples/snippets/ files untouched here and can fix or fold them into the story as a follow-up. tests/docs_src/test_shape.py loses the plain-ASCII typography check. It enforced a style preference (no em dashes, curly quotes, arrows, section signs) as a hard CI failure across every book page and example, which also blocks legitimate typography such as the section sign in an RFC citation (RFC 7523 §3) that the SDK's own docstrings already use. The plain-ASCII style stays as the convention the book follows; the gate goes. How Has This Been Tested? ./scripts/test (the full suite, 100% branch coverage, strict-no-cover), pre-commit run --all-files, and uv run mkdocs build --strict are green. The new docs test wires the page's two example files together and runs the whole grant in memory, asserting the request sequence, the exact token-request form, and that the sub the IdP signed is what get_access_token().subject reports inside a tool. The story passes the tests/examples/ matrix (both server variants, both protocol eras), and its README commands run for real: uv run python -m stories.identity_assertion.client --http self-hosts a uvicorn server and exits OK. Breaking Changes None. Docs, examples, and tests only; nothing under src/ changes. 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 The page presents this as an optional extension (Enterprise-Managed Authorization), not as part of a protocol release, and is deliberate about the two RFCs: obtaining the ID-JAG from the IdP is an RFC 8693 token exchange and out of the SDK's scope; what the SDK implements on both sides is the RFC 7523 jwt-bearer presentation of it. (#2988's title says RFC 8693; the merged implementation is RFC 7523, per the extension spec.) Also moves the stories README's mrtr row out of the "deferred" table, where it was stale: it has been runnable since #2998. AI Disclaimer

Open Graph Description: Documentation for the Identity Assertion Authorization Grant (SEP-990) that #2988 added. That PR shipped the implementation with two snippets under examples/snippets/ and a migration-guide entry; t...

X Description: Documentation for the Identity Assertion Authorization Grant (SEP-990) that #2988 added. That PR shipped the implementation with two snippets under examples/snippets/ and a migration-guide entry; t...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:148dc883-a76f-8fbf-6b17-985e28a39ff8
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBC40:248EA8:FFBA1:165668:6A5A40FA
html-safe-noncee5bcd47398635033b5eb6876703ea63c5ec4a09bd2d693dac894803031ee5261
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzQwOjI0OEVBODpGRkJBMToxNjU2Njg6NkE1QTQwRkEiLCJ2aXNpdG9yX2lkIjoiNzY4NzU4MjQwODkzOTAyODczMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac5fc4a42bb1c0cb0c26e366ebd1b46936e482b9598bf97a495752d8f617ddeccd
hovercard-subject-tagpull_request:3944191078
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/3004/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:altDocumentation for the Identity Assertion Authorization Grant (SEP-990) that #2988 added. That PR shipped the implementation with two snippets under examples/snippets/ and a migration-guide entry; t...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None19c67ad7579d2401ff06e88a32ef45460fbb40fab3191c7f7582d5e166f326fc
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
releasee618485bff22dab2ef1ffb4e34e4e6626688df69
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/pull/3004/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F3004%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F3004%2Ffiles
Sign up https://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/3004/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3004/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3004/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3004/files
modelcontextprotocol https://github.com/modelcontextprotocol
python-sdkhttps://github.com/modelcontextprotocol/python-sdk
Notifications https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk
Fork 3.7k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk
Star 23.6k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk
Code https://github.com/modelcontextprotocol/python-sdk
Issues 256 https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests 303 https://github.com/modelcontextprotocol/python-sdk/pulls
Actions https://github.com/modelcontextprotocol/python-sdk/actions
Projects https://github.com/modelcontextprotocol/python-sdk/projects
Models https://github.com/modelcontextprotocol/python-sdk/models
Security and quality 6 https://github.com/modelcontextprotocol/python-sdk/security
Insights https://github.com/modelcontextprotocol/python-sdk/pulse
Code https://github.com/modelcontextprotocol/python-sdk
Issues https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests https://github.com/modelcontextprotocol/python-sdk/pulls
Actions https://github.com/modelcontextprotocol/python-sdk/actions
Projects https://github.com/modelcontextprotocol/python-sdk/projects
Models https://github.com/modelcontextprotocol/python-sdk/models
Security and quality https://github.com/modelcontextprotocol/python-sdk/security
Insights https://github.com/modelcontextprotocol/python-sdk/pulse
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
docs-identity-assertionhttps://github.com/modelcontextprotocol/python-sdk/tree/docs-identity-assertion
Conversation 3 https://github.com/modelcontextprotocol/python-sdk/pull/3004
Commits 1 https://github.com/modelcontextprotocol/python-sdk/pull/3004/commits
Checks 36 https://github.com/modelcontextprotocol/python-sdk/pull/3004/checks
Files changed https://github.com/modelcontextprotocol/python-sdk/pull/3004/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3004/files
Add docs, tested examples, and a story for SEP-990 identity assertion https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#top
Show all changes 1 commit https://github.com/modelcontextprotocol/python-sdk/pull/3004/files
e637536 Add docs, tested examples, and a story for SEP-990 identity assertion maxisbey Jun 26, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/3004/commits/e63753664a60c17428b4097a596649571e246475
Clear filters https://github.com/modelcontextprotocol/python-sdk/pull/3004/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3004/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3004/files
authorization.md https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-39f393e17fe7273f7c3f273ef236a44402c20cedd48982c799ecdd053b221c24
identity-assertion.md https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-2ee7f2870cd5e511f58b57ed0b0ac1fa080f465e44ce639d32f0389d90d07747
oauth-clients.md https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-c1ca6b2d50dd17d7fda9ac37a24156bef9f441622a649c174cfb0f856ea614ee
__init__.py https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-8331f1a9c78b38157366fcf38537592d3ea4265a547f2d7cbff535fe40dcfcfe
tutorial001.py https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-c1a85c88138b90b132f75ac4f800192f3b68cd3229eb095b60e39741db46893b
tutorial002.py https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-05e2c717d8d762af1edbfe5337f47ddafa7450ff225d24ee1b535af9d255452a
README.md https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-eb36043b2439f0ee2fad3fb0df9ad6d6530e25acf10bba9b1df83c1278d16e02
auth.py https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-f2f595300f009963acd386e038c070bdc7ab4ff532e5f92a11fdd17dba1f0ec1
README.md https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-5fc184f97abddcba8c61980bf17c12e75ea2dfbe3425eb6248c94c5f88d2b1c0
__init__.py https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-7ed86890b16c39f0ab8d4deed6df10f4ac9a00f33ca1e9fb4bd5e381f44349ac
client.py https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-6354ae90bf2c1b244616b635c8034ae2e263377caa57be9f1879113c6f7d71da
idp.py https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-203f0e1752094472b9a486459aa3ccdb28c56866a041adb08d1bc446430cf4a6
server.py https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-b6201212db1875130388c04cd9621f8030f6d2dbb1d9f245322d1ad648b88631
server_lowlevel.py https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-0be374eb23beb016f8cef0515d6868c13bef9b4e85e489e7a7b14a143411cfd8
manifest.toml https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-3465e861f1dadb6428365d1d397e322cf53ad60e35501e6aef36abb00106b189
mkdocs.yml https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-98d0f806abc9af24e6a7c545d3d77e8f9ad57643e27211d7a7b896113e420ed2
test_identity_assertion.py https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-6eca092800027bcda861006898cf33b9312c05a89d114c26e4f6cfa67571f3bc
test_shape.py https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-561a36c5f7961ad4dbd87f07d66182342c39d671981d538ebc04ecc186771214
docs/advanced/authorization.mdhttps://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-39f393e17fe7273f7c3f273ef236a44402c20cedd48982c799ecdd053b221c24
View file https://github.com/modelcontextprotocol/python-sdk/blob/e63753664a60c17428b4097a596649571e246475/docs/advanced/authorization.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3004/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-39f393e17fe7273f7c3f273ef236a44402c20cedd48982c799ecdd053b221c24
https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-39f393e17fe7273f7c3f273ef236a44402c20cedd48982c799ecdd053b221c24
docs/advanced/identity-assertion.mdhttps://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-2ee7f2870cd5e511f58b57ed0b0ac1fa080f465e44ce639d32f0389d90d07747
View file https://github.com/modelcontextprotocol/python-sdk/blob/e63753664a60c17428b4097a596649571e246475/docs/advanced/identity-assertion.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3004/{{ revealButtonHref }}
docs/advanced/oauth-clients.mdhttps://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-c1ca6b2d50dd17d7fda9ac37a24156bef9f441622a649c174cfb0f856ea614ee
View file https://github.com/modelcontextprotocol/python-sdk/blob/e63753664a60c17428b4097a596649571e246475/docs/advanced/oauth-clients.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3004/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-c1ca6b2d50dd17d7fda9ac37a24156bef9f441622a649c174cfb0f856ea614ee
https://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-c1ca6b2d50dd17d7fda9ac37a24156bef9f441622a649c174cfb0f856ea614ee
docs_src/identity_assertion/__init__.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-8331f1a9c78b38157366fcf38537592d3ea4265a547f2d7cbff535fe40dcfcfe
View file https://github.com/modelcontextprotocol/python-sdk/blob/e63753664a60c17428b4097a596649571e246475/docs_src/identity_assertion/__init__.py
Open in desktop https://desktop.github.com
docs_src/identity_assertion/tutorial001.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3004/files#diff-c1a85c88138b90b132f75ac4f800192f3b68cd3229eb095b60e39741db46893b
View file https://github.com/modelcontextprotocol/python-sdk/blob/e63753664a60c17428b4097a596649571e246475/docs_src/identity_assertion/tutorial001.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3004/{{ revealButtonHref }}
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3004/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3004/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.