René's URL Explorer Experiment


Title: [v2] MCPServer reports empty experimental capabilities as {} via initialize but None via server/discover · Issue #3254 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: [v2] MCPServer reports empty experimental capabilities as {} via initialize but None via server/discover · Issue #3254 · modelcontextprotocol/python-sdk

X Title: [v2] MCPServer reports empty experimental capabilities as {} via initialize but None via server/discover · Issue #3254 · modelcontextprotocol/python-sdk

Description: Description With mcp==2.0.0, the same unconfigured server exposes empty experimental capabilities differently through its two public discovery paths: initialize: capabilities.experimental == {} and the field is present on the wire server...

Open Graph Description: Description With mcp==2.0.0, the same unconfigured server exposes empty experimental capabilities differently through its two public discovery paths: initialize: capabilities.experimental == {} and...

X Description: Description With mcp==2.0.0, the same unconfigured server exposes empty experimental capabilities differently through its two public discovery paths: initialize: capabilities.experimental == {} and...

Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/3254

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[v2] MCPServer reports empty experimental capabilities as {} via initialize but None via server/discover","articleBody":"### Description\n\nWith `mcp==2.0.0`, the same unconfigured server exposes empty experimental capabilities differently through its two public discovery paths:\n\n- initialize: `capabilities.experimental == {}` and the field is present on the wire\n- `server/discover`: `capabilities.experimental is None`; the field is omitted on the wire, while the parsed SDK model materializes `None`\n\nIn a sanitized capture this is visible at both `$.handshake.capabilities.experimental` and `$.handshake.result.capabilities.experimental` as `{}` to `null`. The `null` is a diagnostic model dump, not a literal modern wire value.\n\nThis distinction is client-visible. Code using `.get(...)` on the legacy value works but raises on the modern value, while checks such as `is not None` also change meaning.\n\n### Minimal reproduction\n\n```python\nfrom mcp.server.lowlevel import Server\n\nserver = Server(\"repro\", version=\"0.0.0\")\nlegacy = server.create_initialization_options().capabilities\nmodern = server.get_capabilities(protocol_version=\"2026-07-28\")\n\nfor name, capabilities in ((\"legacy\", legacy), (\"modern\", modern)):\n    wire = capabilities.model_dump(by_alias=True, mode=\"json\", exclude_none=True)\n    print(name, capabilities.experimental, \"experimental\" in wire)\n```\n\nObserved with Python 3.14.3, `mcp==2.0.0`, `mcp-types==2.0.0`, and Pydantic 2.13.4:\n\n```text\nlegacy {} True\nmodern None False\n```\n\n### Expected behavior\n\nThe two supported discovery paths should expose consistent public SDK semantics for an unconfigured experimental capability map, or the intentional difference should be documented with migration guidance.\n\n### Source diagnosis\n\nThe tagged v2.0.0 source appears to explain the mismatch:\n\n- The initialize path converts a missing experimental map to `{}`: https://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/src/mcp/server/lowlevel/server.py#L527-L548\n- `get_capabilities` preserves `None`: https://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/src/mcp/server/lowlevel/server.py#L555-L625\n- The modern discover handler calls it without an experimental map: https://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/src/mcp/server/lowlevel/server.py#L660-L675\n- The type defaults `experimental` to `None`: https://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/src/mcp-types/mcp_types/_types.py#L485-L489\n- The runner omits `None` from the modern wire response: https://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/src/mcp/server/runner.py#L110-L123\n- The client exposes the parsed discover capabilities: https://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/src/mcp/client/session.py#L719-L755 and https://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/src/mcp/client/session.py#L791-L797\n- The protocol schema makes the field optional and object-valued: https://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/schema/2026-07-28.json#L3117-L3177\n\n### Downstream impact and revisit condition\n\nA migration gate currently needs a provisional expected delta for this client-visible transition. We will retest the first 2.x release that fixes or documents this behavior and remove or revise that delta when the two representations converge or the intended contract is clarified.\n\n### Version\n\n- Python: 3.14.3\n- MCP Python SDK: 2.0.0\n- mcp-types: 2.0.0\n- Pydantic: 2.13.4\n- OS: Windows\r\n","author":{"url":"https://github.com/squibloads","@type":"Person","name":"squibloads"},"datePublished":"2026-08-05T07:00:12Z","url":"https://github.com/modelcontextprotocol/python-sdk/issues/3254"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c60e80ec-0d05-1fbf-151a-151f4e316ab4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id81D8:16EED3:127AA3E:178A4D6:6B012187
html-safe-nonce41345da001d8d0abf57a6bbcf9381d8f111a387a21a17b4ae8afe976365c0569
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MUQ4OjE2RUVEMzoxMjdBQTNFOjE3OEE0RDY6NkIwMTIxODciLCJ2aXNpdG9yX2lkIjoiODg3Njk4NjUwODIzMDMzNjkwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac49e8857f8f3fd3048adf65565a7cee866ca7b3a125c0dddffdeb1d633b6bcde4
hovercard-subject-tagissue:5068257496
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/python-sdk/3254/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4ea6788a45522245c0b57b5e90ee4e0fe6a54d7c71551d28ec836ceb534dd30d/modelcontextprotocol/python-sdk/issues/3254
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4ea6788a45522245c0b57b5e90ee4e0fe6a54d7c71551d28ec836ceb534dd30d/modelcontextprotocol/python-sdk/issues/3254
og:image:altDescription With mcp==2.0.0, the same unconfigured server exposes empty experimental capabilities differently through its two public discovery paths: initialize: capabilities.experimental == {} and...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesquibloads
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
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
disable-turbofalse
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
react-app-nameissues

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/issues/3254#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2F3254
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%2Fissues%2F3254
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=modelcontextprotocol%2Fpython-sdk
Reloadhttps://github.com/modelcontextprotocol/python-sdk/issues/3254
Reloadhttps://github.com/modelcontextprotocol/python-sdk/issues/3254
Reloadhttps://github.com/modelcontextprotocol/python-sdk/issues/3254
modelcontextprotocolhttps://github.com/modelcontextprotocol
python-sdkhttps://github.com/modelcontextprotocol/python-sdk
Codehttps://github.com/modelcontextprotocol/python-sdk
Issues310 (310)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
https://github.com/modelcontextprotocol/python-sdk
New issuehttps://github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3254
New issuehttps://github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3254
#3614https://github.com/modelcontextprotocol/python-sdk/pull/3614
[v2] MCPServer reports empty experimental capabilities as {} via initialize but None via server/discoverhttps://github.com/modelcontextprotocol/python-sdk/issues/3254#top
#3614https://github.com/modelcontextprotocol/python-sdk/pull/3614
P2Moderate issues affecting some users, edge cases, potentially valuable featurehttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22P2%22
spec-2026-07-28Concerns the SDK's implementation of the 2026-07-28 MCP spec revisionhttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22spec-2026-07-28%22
v2Affects the v2 line (2.x on main)https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
https://github.com/squibloads
squibloadshttps://github.com/squibloads
on Aug 5, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3254#issue-5068257496
python-sdk/src/mcp/server/lowlevel/server.pyhttps://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/src/mcp/server/lowlevel/server.py#L527-L548
6f69a37https://github.com/modelcontextprotocol/python-sdk/commit/6f69a3758ebf2ee55ce050f58b470ce11af71133
python-sdk/src/mcp/server/lowlevel/server.pyhttps://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/src/mcp/server/lowlevel/server.py#L555-L625
6f69a37https://github.com/modelcontextprotocol/python-sdk/commit/6f69a3758ebf2ee55ce050f58b470ce11af71133
python-sdk/src/mcp/server/lowlevel/server.pyhttps://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/src/mcp/server/lowlevel/server.py#L660-L675
6f69a37https://github.com/modelcontextprotocol/python-sdk/commit/6f69a3758ebf2ee55ce050f58b470ce11af71133
python-sdk/src/mcp-types/mcp_types/_types.pyhttps://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/src/mcp-types/mcp_types/_types.py#L485-L489
6f69a37https://github.com/modelcontextprotocol/python-sdk/commit/6f69a3758ebf2ee55ce050f58b470ce11af71133
python-sdk/src/mcp/server/runner.pyhttps://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/src/mcp/server/runner.py#L110-L123
6f69a37https://github.com/modelcontextprotocol/python-sdk/commit/6f69a3758ebf2ee55ce050f58b470ce11af71133
python-sdk/src/mcp/client/session.pyhttps://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/src/mcp/client/session.py#L719-L755
6f69a37https://github.com/modelcontextprotocol/python-sdk/commit/6f69a3758ebf2ee55ce050f58b470ce11af71133
python-sdk/src/mcp/client/session.pyhttps://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/src/mcp/client/session.py#L791-L797
6f69a37https://github.com/modelcontextprotocol/python-sdk/commit/6f69a3758ebf2ee55ce050f58b470ce11af71133
python-sdk/schema/2026-07-28.jsonhttps://github.com/modelcontextprotocol/python-sdk/blob/6f69a3758ebf2ee55ce050f58b470ce11af71133/schema/2026-07-28.json#L3117-L3177
6f69a37https://github.com/modelcontextprotocol/python-sdk/commit/6f69a3758ebf2ee55ce050f58b470ce11af71133
maxisbeyhttps://github.com/maxisbey
v2Affects the v2 line (2.x on main)https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
P1Significant bug affecting many users, highly requested featurehttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22P1%22
P2Moderate issues affecting some users, edge cases, potentially valuable featurehttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22P2%22
spec-2026-07-28Concerns the SDK's implementation of the 2026-07-28 MCP spec revisionhttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22spec-2026-07-28%22
P1Significant bug affecting many users, highly requested featurehttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22P1%22
on Aug 11, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3254#event-29288212960
https://github.com/pttydou
pttydouhttps://github.com/pttydou
on Aug 22, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3254#issuecomment-5380917100
#3255https://github.com/modelcontextprotocol/python-sdk/pull/3255
#3255https://github.com/modelcontextprotocol/python-sdk/pull/3255
maxisbeyhttps://github.com/maxisbey
completedhttps://github.com/modelcontextprotocol/python-sdk/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#3614https://github.com/modelcontextprotocol/python-sdk/pull/3614
on Oct 2, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3254#event-32327566162
https://github.com/maxisbey
maxisbeyhttps://github.com/maxisbey
on Oct 2, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3254#issuecomment-5957042352
#3614https://github.com/modelcontextprotocol/python-sdk/pull/3614
AI Disclaimerhttps://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d
Sign up for freehttps://github.com/signup?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3254
Sign in to commenthttps://github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3254
P2Moderate issues affecting some users, edge cases, potentially valuable featurehttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22P2%22
spec-2026-07-28Concerns the SDK's implementation of the 2026-07-28 MCP spec revisionhttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22spec-2026-07-28%22
v2Affects the v2 line (2.x on main)https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
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.