René's URL Explorer Experiment


Title: stdio dual-era server refuses initialize after a failed server/discover probe (era latched by the first request) · Issue #3851 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: stdio dual-era server refuses initialize after a failed server/discover probe (era latched by the first request) · Issue #3851 · modelcontextprotocol/python-sdk

X Title: stdio dual-era server refuses initialize after a failed server/discover probe (era latched by the first request) · Issue #3851 · modelcontextprotocol/python-sdk

Description: Summary On stdio, serve_dual_era_loop fixes the connection's protocol era from the first request it reads. If that first request is a 2026-07-28 server/discover probe that the server rejects, the connection is still latched to the modern...

Open Graph Description: Summary On stdio, serve_dual_era_loop fixes the connection's protocol era from the first request it reads. If that first request is a 2026-07-28 server/discover probe that the server rejects, the c...

X Description: Summary On stdio, serve_dual_era_loop fixes the connection's protocol era from the first request it reads. If that first request is a 2026-07-28 server/discover probe that the server rejects, t...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"stdio dual-era server refuses initialize after a failed server/discover probe (era latched by the first request)","articleBody":"### Summary\n\nOn stdio, `serve_dual_era_loop` fixes the connection's protocol era from the\nfirst request it reads. If that first request is a 2026-07-28 `server/discover`\nprobe that the server **rejects**, the connection is still latched to the modern\nera, and the client's spec-described fallback to `initialize` on the same process\nis refused with `-32022 \"connection is serving the 2026-07-28 protocol; the\ninitialize handshake is not accepted\"`.\n\nThe same server answers `initialize` normally when it is the first request, so it\ndoes support 2025-11-25. It just can't be reached after a failed probe.\n\n### Spec (2026-07-28)\n\n- stdio, *Backward Compatibility*: a dual-version client SHOULD probe with\n  `server/discover` first. If \"the server returns any other error [than a\n  recognized modern error], or does not respond within a reasonable timeout: the\n  server is legacy. Fall back to the `initialize` handshake.\" The fallback MUST\n  NOT be keyed to one specific error code.\n- Versioning: \"An `initialize` request selects legacy semantics, scoped to the\n  stdio process\", and \"A dual-era server MAY serve both eras concurrently on the\n  same endpoint or process.\"\n- Base protocol, *Statelessness*: \"Servers MUST NOT rely on prior requests over\n  the same connection to establish context (e.g., capabilities, protocol\n  version, client identity).\"\n\nThe spec doesn't say whether the fallback reuses the process or starts a new\none. But a client that follows the stdio text literally sends `initialize` next\non the same process, and a rejected request arguably shouldn't establish the\nconnection's version.\n\n### Reproduction (mcp 2.3.0, Python 3.12)\n\n`server.py`:\n\n```python\nfrom mcp.server import MCPServer\n\napp = MCPServer(\"era-latch-repro\")\n\n@app.tool()\ndef ping() -> str:\n    return \"pong\"\n\nif __name__ == \"__main__\":\n    app.run()  # stdio\n```\n\n`drive.py` (one stdio process: a probe the server rejects with a non-modern\nerror, then the fallback `initialize`):\n\n```python\nimport json, subprocess, sys\n\nMETA = \"io.modelcontextprotocol/protocolVersion\"\nmsgs = [\n    # Envelope missing clientCapabilities -> the SDK answers -32602 (a non-modern error)\n    {\"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"server/discover\",\n     \"params\": {\"_meta\": {META: \"2026-07-28\"}}},\n    {\"jsonrpc\": \"2.0\", \"id\": 2, \"method\": \"initialize\",\n     \"params\": {\"protocolVersion\": \"2025-11-25\", \"capabilities\": {},\n                \"clientInfo\": {\"name\": \"repro\", \"version\": \"0\"}}},\n]\np = subprocess.Popen([sys.executable, \"server.py\"], stdin=subprocess.PIPE,\n                     stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True)\nfor m in msgs:\n    p.stdin.write(json.dumps(m) + \"\\n\"); p.stdin.flush()\n    print(\"\u003c\u003c\", p.stdout.readline().strip())\np.stdin.close(); p.wait(timeout=5)\n```\n\nOutput:\n\n```\n\u003c\u003c {\"jsonrpc\":\"2.0\",\"id\":1,\"error\":{\"code\":-32602,\"message\":\"params._meta is missing the required envelope key(s): io.modelcontextprotocol/clientCapabilities\"}}\n\u003c\u003c {\"jsonrpc\":\"2.0\",\"id\":2,\"error\":{\"code\":-32022,\"message\":\"connection is serving the 2026-07-28 protocol; the initialize handshake is not accepted\",\"data\":{\"supported\":[\"2026-07-28\"],\"requested\":\"2025-11-25\"}}}\n```\n\nControl: sending only the `initialize` (no probe) on a fresh process returns a\nnormal result with `\"protocolVersion\":\"2025-11-25\"`.\n\nA legacy-only server built with the SDK (one whose request handling refuses\nmodern versions before `initialize`) hits the same latch: the refused probe fixes\nthe era, and the fallback `initialize` is rejected.\n\n### Expected\n\nA first request that the server rejects shouldn't decide the era. Two options:\nlatch only on a request that succeeds, or still accept `initialize` while no\nmodern request has been answered successfully. Either would let the stdio\nfallback work on the same process.\n\n### Secondary observation\n\nThe `-32022` data lists `\"supported\": [\"2026-07-28\"]` (both on the refused\n`initialize` and on a well-formed probe with an unknown version), although the\nsame server answers `initialize` at 2025-11-25 when that comes first. The\nspec's example of this error lists both eras (`[\"2026-07-28\", \"2025-11-25\"]`).\n\n### Code\n\n`src/mcp/server/runner.py`: `serve_dual_era_loop` / `_replay_from_opening_request`\ndecide `opens_modern` from the opening request alone, and `_serve_modern_stream`\nraises `UNSUPPORTED_PROTOCOL_VERSION` for any later `initialize`. The docstring\nsays this is intentional (\"A later claim from the other era is refused\"), so this\nmay be a design question rather than a bug. Raising it because of the spec's\nstdio fallback text.\n","author":{"url":"https://github.com/kuberaplutus224","@type":"Person","name":"kuberaplutus224"},"datePublished":"2026-11-13T02:16:49Z","url":"https://github.com/modelcontextprotocol/python-sdk/issues/3851"}

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:c25fa50b-5059-b267-a3c3-50179c354e9d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC502:1F67:7E19FE:AEF1FB:6B05655C
html-safe-noncee3c20b3efcfa9b3e898ecba04aad71409855432f7bc9de692a6389efeb0216b6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTAyOjFGNjc6N0UxOUZFOkFFRjFGQjo2QjA1NjU1QyIsInZpc2l0b3JfaWQiOiI3ODc0ODgwNDM5NDY1NjMzMTE2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac52b2072d020deadf6db62ec87900d29a3f6e177d5a786e97fbbd146bb4096652
hovercard-subject-tagissue:6363259874
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/3851/issue_layout
twitter:imagehttps://opengraph.githubassets.com/fabc8696f0c511e1bf9a561896a1c4caae8263148b9ffedd3bb989644fccb6b7/modelcontextprotocol/python-sdk/issues/3851
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/fabc8696f0c511e1bf9a561896a1c4caae8263148b9ffedd3bb989644fccb6b7/modelcontextprotocol/python-sdk/issues/3851
og:image:altSummary On stdio, serve_dual_era_loop fixes the connection's protocol era from the first request it reads. If that first request is a 2026-07-28 server/discover probe that the server rejects, the c...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekuberaplutus224
hostnamegithub.com
expected-hostnamegithub.com
None1be5cc09efdd4833c24a4ffa71d698e3999fa09071e159fe14c2c08e41c98331
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
releasef6d69234e682c947a48074340e69d45d5901de31
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/issues/3851#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2F3851
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%2F3851
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/3851
Reloadhttps://github.com/modelcontextprotocol/python-sdk/issues/3851
Reloadhttps://github.com/modelcontextprotocol/python-sdk/issues/3851
modelcontextprotocolhttps://github.com/modelcontextprotocol
python-sdkhttps://github.com/modelcontextprotocol/python-sdk
Codehttps://github.com/modelcontextprotocol/python-sdk
Issues320 (320)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/3851
New issuehttps://github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3851
stdio dual-era server refuses initialize after a failed server/discover probe (era latched by the first request)https://github.com/modelcontextprotocol/python-sdk/issues/3851#top
bughttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22bug%22
spec-2026-07-28https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22spec-2026-07-28%22
v2https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
https://github.com/kuberaplutus224
kuberaplutus224https://github.com/kuberaplutus224
on Nov 13, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3851#issue-6363259874
claudehttps://github.com/apps/claude
bughttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22bug%22
spec-2026-07-28https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22spec-2026-07-28%22
v2https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
on Nov 13, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3851#event-35986219856
https://github.com/techaurah
techaurahhttps://github.com/techaurah
on Nov 13, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3851#issuecomment-6846322526
https://github.com/techaurah
techaurahhttps://github.com/techaurah
on Nov 13, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3851#issuecomment-6846328880
https://github.com/media-ctrl
media-ctrlhttps://github.com/media-ctrl
on Nov 14, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3851#issuecomment-6878443778
dcodehttps://github.com/dcode
on Nov 14, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3851#event-36139251318
docs: add upstream reports for the tool-list-change gapshttps://github.com/dcode/productivity-agent-tools/commit/7d2879e8ea566a9b40737c8fdbd3a8a64a791f94
7d2879ehttps://github.com/dcode/productivity-agent-tools/commit/7d2879e8ea566a9b40737c8fdbd3a8a64a791f94
https://github.com/dcode
dcodehttps://github.com/dcode
on Nov 14, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3851#issuecomment-6881343642
aaif-goose/goose#13055https://github.com/aaif-goose/goose/issues/13055
#3862https://github.com/modelcontextprotocol/python-sdk/issues/3862
https://github.com/techaurah
techaurahhttps://github.com/techaurah
on Nov 17, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3851#issuecomment-6940458770
Sign up for freehttps://github.com/signup?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3851
Sign in to commenthttps://github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3851
bughttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22bug%22
spec-2026-07-28https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22spec-2026-07-28%22
v2https://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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.