René's URL Explorer Experiment


Title: Omit an unset experimental capability from the initialize result by maxisbey · Pull Request #3614 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: Omit an unset experimental capability from the initialize result by maxisbey · Pull Request #3614 · modelcontextprotocol/python-sdk

X Title: Omit an unset experimental capability from the initialize result by maxisbey · Pull Request #3614 · modelcontextprotocol/python-sdk

Description: Fixes #3254. A server with no experimental capabilities configured sent "experimental": {} in its initialize result but left the field out of its server/discover result, so the same server looked different depending on how the client connected. This makes initialize omit it too. What changes on the wire An unconfigured server's initialize result no longer carries "experimental": {}. This applies to the lowlevel Server and to MCPServer, on every transport. v1 has always sent it, so this is a deliberate change to the legacy-path output. server/discover is unchanged. A map passed to create_initialization_options(experimental_capabilities=...) is still sent as given, including an explicit {}. Why The field is optional in the schema for both results, and an absent field and an empty object both mean "no experimental capabilities". server/discover already omits it, and the docs already show capabilities without it. The other SDKs I checked (TypeScript, C#, Go, Rust, Ruby, PHP) omit it on both paths when nothing is configured. Who could notice Client code that reads capabilities.experimental from a legacy connection without handling None, for example caps.experimental.get(...). The field has always been typed as optional, and a modern connection already returns None here. caps.experimental or {} works on both. What this does not do A configured experimental map is still only advertised on initialize, not on server/discover. That needs the map to live on the server rather than in per-run options, which is part of #2896. The change create_initialization_options() passed experimental_capabilities or {} to get_capabilities(); it now passes the argument through unchanged. No signature, default or new name anywhere. get_capabilities() is untouched. How it was checked New test in tests/server/lowlevel/test_server_discover.py: a bare server connected once through initialize and once through server/discover reports no experimental either way. Updated the three snapshots that pinned experimental={} on the legacy path (tests/client/test_client.py, tests/interaction/lowlevel/test_initialize.py). The new test and the nine updated cases fail on main and pass with the change. ./scripts/test passes with 100% coverage; ruff and pyright are clean. AI Disclaimer

Open Graph Description: Fixes #3254. A server with no experimental capabilities configured sent "experimental": {} in its initialize result but left the field out of its server/discover result, so the same serve...

X Description: Fixes #3254. A server with no experimental capabilities configured sent "experimental": {} in its initialize result but left the field out of its server/discover result, so the sa...

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

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:98b8a3d9-9aa5-1e11-95bc-841f7c6a5322
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB818:7A60E:168E848:1CF6EB1:6B012B5C
html-safe-nonce5982880cb608c550723938be0307830e32757a69a48140e724be11280f14c990
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODE4OjdBNjBFOjE2OEU4NDg6MUNGNkVCMTo2QjAxMkI1QyIsInZpc2l0b3JfaWQiOiI0MTg2Njg4OTUxNzY0OTg2NzE2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac25affad0edca8203c2bc8f2284155455fcaf5e7a0e5616281861b72c75544ab5
hovercard-subject-tagpull_request:4706854857
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/3614/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:altFixes #3254. A server with no experimental capabilities configured sent "experimental": {} in its initialize result but left the field out of its server/discover result, so the same serve...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/pull/3614/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F3614%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%2F3614%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/3614/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3614/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3614/files
modelcontextprotocolhttps://github.com/modelcontextprotocol
python-sdkhttps://github.com/modelcontextprotocol/python-sdk
Codehttps://github.com/modelcontextprotocol/python-sdk
Issues313 (313)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
3254-omit-empty-experimentalhttps://github.com/modelcontextprotocol/python-sdk/tree/3254-omit-empty-experimental
Conversation 4 https://github.com/modelcontextprotocol/python-sdk/pull/3614
Commits 1 https://github.com/modelcontextprotocol/python-sdk/pull/3614/commits
Checks 37 https://github.com/modelcontextprotocol/python-sdk/pull/3614/checks
Files changed https://github.com/modelcontextprotocol/python-sdk/pull/3614/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3614/files
Omit an unset experimental capability from the initialize result https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#top
Show all changes 1 commit https://github.com/modelcontextprotocol/python-sdk/pull/3614/files
4dce837 Omit an unset experimental capability from the initialize result maxisbey Oct 1, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/3614/commits/4dce83796dc9fa5aa0263c8edd6bbf3d3fd2de1b
Clear filters https://github.com/modelcontextprotocol/python-sdk/pull/3614/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3614/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3614/files
server.py https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4
test_client.py https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-f91d7d1bfecb41d80a4cc73133b82560b7284a2af2d6630c49b983ca9366ea13
test_initialize.py https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-019874eb5b0b14b2e3447be2be76b480e12f77f71af8e1be534bec187e0e0852
test_server_discover.py https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-cdb3e450722a7944ee7a5075aea13da268ef672be1571d60c3c8af0829f21f36
src/mcp/server/lowlevel/server.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4
View file https://github.com/modelcontextprotocol/python-sdk/blob/4dce83796dc9fa5aa0263c8edd6bbf3d3fd2de1b/src/mcp/server/lowlevel/server.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3614/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4
claudehttps://github.com/apps/claude
Oct 1, 2026https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#r4158181289
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3614/files
claudehttps://github.com/apps/claude
Oct 1, 2026https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#r4158181298
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
17aaf25https://github.com/modelcontextprotocol/python-sdk/commit/17aaf2557205c3768ed61831398a4e074b21e96d
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3614/files
https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4
tests/client/test_client.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-f91d7d1bfecb41d80a4cc73133b82560b7284a2af2d6630c49b983ca9366ea13
View file https://github.com/modelcontextprotocol/python-sdk/blob/4dce83796dc9fa5aa0263c8edd6bbf3d3fd2de1b/tests/client/test_client.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3614/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-f91d7d1bfecb41d80a4cc73133b82560b7284a2af2d6630c49b983ca9366ea13
https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-f91d7d1bfecb41d80a4cc73133b82560b7284a2af2d6630c49b983ca9366ea13
tests/interaction/lowlevel/test_initialize.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-019874eb5b0b14b2e3447be2be76b480e12f77f71af8e1be534bec187e0e0852
View file https://github.com/modelcontextprotocol/python-sdk/blob/4dce83796dc9fa5aa0263c8edd6bbf3d3fd2de1b/tests/interaction/lowlevel/test_initialize.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3614/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-019874eb5b0b14b2e3447be2be76b480e12f77f71af8e1be534bec187e0e0852
https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-019874eb5b0b14b2e3447be2be76b480e12f77f71af8e1be534bec187e0e0852
https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-019874eb5b0b14b2e3447be2be76b480e12f77f71af8e1be534bec187e0e0852
tests/server/lowlevel/test_server_discover.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-cdb3e450722a7944ee7a5075aea13da268ef672be1571d60c3c8af0829f21f36
View file https://github.com/modelcontextprotocol/python-sdk/blob/4dce83796dc9fa5aa0263c8edd6bbf3d3fd2de1b/tests/server/lowlevel/test_server_discover.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3614/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-cdb3e450722a7944ee7a5075aea13da268ef672be1571d60c3c8af0829f21f36
https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-cdb3e450722a7944ee7a5075aea13da268ef672be1571d60c3c8af0829f21f36
https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-cdb3e450722a7944ee7a5075aea13da268ef672be1571d60c3c8af0829f21f36
https://github.com/modelcontextprotocol/python-sdk/pull/3614/files#diff-cdb3e450722a7944ee7a5075aea13da268ef672be1571d60c3c8af0829f21f36
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3614/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.