René's URL Explorer Experiment


Title: Pass json-schema-ref-no-deref conformance scenario (SEP-2106) by Kludex · Pull Request #2924 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: Pass json-schema-ref-no-deref conformance scenario (SEP-2106) by Kludex · Pull Request #2924 · modelcontextprotocol/python-sdk

X Title: Pass json-schema-ref-no-deref conformance scenario (SEP-2106) by Kludex · Pull Request #2924 · modelcontextprotocol/python-sdk

Description: Closes #2903. SEP-2106 permits the full JSON Schema 2020-12 vocabulary in tool schemas, including $ref. A $ref resolving to a network URI is an SSRF / fetch-DoS vector. The SEP requires: Implementations MUST NOT automatically dereference a $ref that is not a same-document reference. A schema that fails to validate due to an unresolved external $ref SHOULD be rejected rather than treated as permissive. The SDK already satisfies the MUST NOT: there is no $ref-fetching code anywhere, and jsonschema's referencing backend raises Unresolvable rather than performing an HTTP GET. So no $ref-resolution change is needed. What changed Added a json-schema-ref-no-deref driver handler to the conformance client. Its absence (not actual dereferencing) was why the scenario failed; the SDK was already compliant. Removed the scenario from both expected-failures baselines. Added a client test confirming a network $ref in an output schema, under a property the structured content does not set, is validated without being dereferenced. Scope notes I deliberately did not add eager registration-time rejection of external $refs. The SEP only forbids dereferencing them; an external $ref that is never fetched is legitimate 2020-12 (the SEP lists $ref among the keywords it enables). Eager rejection would forbid valid schemas and go beyond the spec. The issue text says "server rejects unresolvable external $ref at registration"; this PR follows the SEP's narrower, conditional SHOULD instead. Happy to revisit if maintainers prefer the stricter reading. The structuredContent widening to any JSON value already landed in #2849; I audited the consumers and found no object/truthiness assumptions. Composition-keyword resource bounds (SEP SHOULD: schema depth / validation-time limits) are not implemented here. Verification json-schema-ref-no-deref passes on both the 2025 and 2026-07-28 client legs locally, with "Baseline check passed: all failures are expected" (no stale-entry error). Full suite green, 100% coverage, strict-no-cover/pyright/ruff clean. AI Disclaimer This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.

Open Graph Description: Closes #2903. SEP-2106 permits the full JSON Schema 2020-12 vocabulary in tool schemas, including $ref. A $ref resolving to a network URI is an SSRF / fetch-DoS vector. The SEP requires: Implement...

X Description: Closes #2903. SEP-2106 permits the full JSON Schema 2020-12 vocabulary in tool schemas, including $ref. A $ref resolving to a network URI is an SSRF / fetch-DoS vector. The SEP requires: Implement...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:71bb09d0-b99d-4353-1dc6-7c3dbe419b78
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8FF0:E79E4:1B63A3B:24EE534:6A598592
html-safe-noncefc0bf6644380129829f7a4684d9f956cee4ddb432de6afc6bb545f5c9c0db224
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkYwOkU3OUU0OjFCNjNBM0I6MjRFRTUzNDo2QTU5ODU5MiIsInZpc2l0b3JfaWQiOiI2MjM0OTA2ODUxNzUyMzc5Nzk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac892a56873fd45b39ea41b7d3f83c927394b3f236c8dca191df9d7d95efaf5e6c
hovercard-subject-tagpull_request:3904145856
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/2924/files
twitter:imagehttps://avatars.githubusercontent.com/u/7353520?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/7353520?s=400&v=4
og:image:altCloses #2903. SEP-2106 permits the full JSON Schema 2020-12 vocabulary in tool schemas, including $ref. A $ref resolving to a network URI is an SSRF / fetch-DoS vector. The SEP requires: Implement...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonea540949572872b935b393b36db38922db390ae71c859537d741b8f3eb7e545b5
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
release624bb50a7497aa346bef8cc3743af408a9ea10ca
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/pull/2924/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F2924%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%2F2924%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/2924/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/2924/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/2924/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2924/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 255 https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests 301 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
Kludexhttps://github.com/Kludex
mainhttps://github.com/modelcontextprotocol/python-sdk/tree/main
sep-2106-json-schema-refhttps://github.com/modelcontextprotocol/python-sdk/tree/sep-2106-json-schema-ref
Conversation 8 https://github.com/modelcontextprotocol/python-sdk/pull/2924
Commits 12 https://github.com/modelcontextprotocol/python-sdk/pull/2924/commits
Checks 33 https://github.com/modelcontextprotocol/python-sdk/pull/2924/checks
Files changed 3 https://github.com/modelcontextprotocol/python-sdk/pull/2924/files
Pass json-schema-ref-no-deref conformance scenario (SEP-2106) https://github.com/modelcontextprotocol/python-sdk/pull/2924/files#top
Show all changes 12 commits https://github.com/modelcontextprotocol/python-sdk/pull/2924/files
33774ff Reject external JSON Schema $ref in tool schemas (SEP-2106) Kludex Jun 20, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2924/commits/33774ff1553ba75a71813428e30304a835378e78
69ea4fb Drop conformance burn-down and migration docs from this PR Kludex Jun 20, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2924/commits/69ea4fb7656aa0730bf1689d64acaed2a48e4c2f
b0786d1 Reject external $ref via the tool schema generator Kludex Jun 20, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2924/commits/b0786d1628a794accc13fe9f7ce566aece70de52
9b8d0aa Inline the tool schema generator into func_metadata Kludex Jun 20, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2924/commits/9b8d0aa73dc0882fa900f1ba0209aec2d4356975
f7366a6 Make ExternalSchemaRefError a hard error, not a ValueError Kludex Jun 20, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2924/commits/f7366a6a4244a4b6486594bb7592ec5da690546d
4d8f900 Burn down json-schema-ref-no-deref conformance scenario Kludex Jun 20, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2924/commits/4d8f900f9c264611808575e7d03e81e96246e5b0
a53b892 Align SEP-2106 $ref handling to the spec Kludex Jun 20, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2924/commits/a53b89242492f59276cf1e8cf81cc3b9b6864489
7a2e7ab Reuse the initialize handler for json-schema-ref-no-deref Kludex Jun 20, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2924/commits/7a2e7abe1ee3a4e3064c43b7393226032032710a
a06d8e1 Give json-schema-ref-no-deref its own handler Kludex Jun 20, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2924/commits/a06d8e1d7cf2fc30b9a99d1f4fddba47b7921e3e
8e255ad Merge remote-tracking branch 'origin/main' into sep-2106-json-schema-ref Kludex Jun 20, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2924/commits/8e255ada033706d483d5c0a8e94a2367c64b68f2
2c47fc4 Guard the no-deref test with a socket tripwire Kludex Jun 20, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2924/commits/2c47fc4e7deb3bee5037c5ffab260bb6d8960d35
c7522f2 Drop the Python no-deref unit test Kludex Jun 20, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2924/commits/c7522f232492378a9dff0e2b74e60fac55f0189f
Clear filters https://github.com/modelcontextprotocol/python-sdk/pull/2924/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2924/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2924/files
client.py https://github.com/modelcontextprotocol/python-sdk/pull/2924/files#diff-823c6bf6584b99e84ad74327720949300eb016f0efd6497c143dbd56307b058f
expected-failures.2026-07-28.yml https://github.com/modelcontextprotocol/python-sdk/pull/2924/files#diff-a8ea36ef04436cd253292c3fbbe06e88795d93362fba66a5919cc6793c5f2aef
expected-failures.yml https://github.com/modelcontextprotocol/python-sdk/pull/2924/files#diff-9554cfe66b53ce3771454545473fbd08be68a3c6ecdd0f837273a3e41e6b67d7
.github/actions/conformance/client.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/2924/files#diff-823c6bf6584b99e84ad74327720949300eb016f0efd6497c143dbd56307b058f
View file https://github.com/modelcontextprotocol/python-sdk/blob/c7522f232492378a9dff0e2b74e60fac55f0189f/.github/actions/conformance/client.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/2924/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/2924/files#diff-823c6bf6584b99e84ad74327720949300eb016f0efd6497c143dbd56307b058f
https://github.com/modelcontextprotocol/python-sdk/pull/2924/checks?check_run_id=82497981661
claudehttps://github.com/apps/claude
Jun 20, 2026https://github.com/modelcontextprotocol/python-sdk/pull/2924/files#r3446980971
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
c7522f2https://github.com/modelcontextprotocol/python-sdk/commit/c7522f232492378a9dff0e2b74e60fac55f0189f
2c47fc4https://github.com/modelcontextprotocol/python-sdk/commit/2c47fc4e7deb3bee5037c5ffab260bb6d8960d35
c7522f2https://github.com/modelcontextprotocol/python-sdk/commit/c7522f232492378a9dff0e2b74e60fac55f0189f
2c47fc4https://github.com/modelcontextprotocol/python-sdk/commit/2c47fc4e7deb3bee5037c5ffab260bb6d8960d35
c7522f2https://github.com/modelcontextprotocol/python-sdk/commit/c7522f232492378a9dff0e2b74e60fac55f0189f
2c47fc4https://github.com/modelcontextprotocol/python-sdk/commit/2c47fc4e7deb3bee5037c5ffab260bb6d8960d35
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2924/files
https://github.com/modelcontextprotocol/python-sdk/pull/2924/files#diff-823c6bf6584b99e84ad74327720949300eb016f0efd6497c143dbd56307b058f
.github/actions/conformance/expected-failures.2026-07-28.ymlhttps://github.com/modelcontextprotocol/python-sdk/pull/2924/files#diff-a8ea36ef04436cd253292c3fbbe06e88795d93362fba66a5919cc6793c5f2aef
View file https://github.com/modelcontextprotocol/python-sdk/blob/c7522f232492378a9dff0e2b74e60fac55f0189f/.github/actions/conformance/expected-failures.2026-07-28.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/2924/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/2924/files#diff-a8ea36ef04436cd253292c3fbbe06e88795d93362fba66a5919cc6793c5f2aef
https://github.com/modelcontextprotocol/python-sdk/pull/2924/files#diff-a8ea36ef04436cd253292c3fbbe06e88795d93362fba66a5919cc6793c5f2aef
.github/actions/conformance/expected-failures.ymlhttps://github.com/modelcontextprotocol/python-sdk/pull/2924/files#diff-9554cfe66b53ce3771454545473fbd08be68a3c6ecdd0f837273a3e41e6b67d7
View file https://github.com/modelcontextprotocol/python-sdk/blob/c7522f232492378a9dff0e2b74e60fac55f0189f/.github/actions/conformance/expected-failures.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/2924/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/2924/files#diff-9554cfe66b53ce3771454545473fbd08be68a3c6ecdd0f837273a3e41e6b67d7
https://github.com/modelcontextprotocol/python-sdk/pull/2924/files#diff-9554cfe66b53ce3771454545473fbd08be68a3c6ecdd0f837273a3e41e6b67d7
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2924/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.