René's URL Explorer Experiment


Title: Isolate the stdio server's stdin and stdout from handler subprocesses by maxisbey · Pull Request #3117 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: Isolate the stdio server's stdin and stdout from handler subprocesses by maxisbey · Pull Request #3117 · modelcontextprotocol/python-sdk

X Title: Isolate the stdio server's stdin and stdout from handler subprocesses by maxisbey · Pull Request #3117 · modelcontextprotocol/python-sdk

Description: The official Python SDK for Model Context Protocol servers and clients - Isolate the stdio server's stdin and stdout from handler subprocesses by maxisbey · Pull Request #3117 · modelcontextprotocol/python-sdk

Open Graph Description: stdio_server() now serves the protocol from private duplicates of stdin and stdout and repoints the standard descriptors away from the wire while it runs, restoring both on exit: fd 0 (and the Wind...

X Description: stdio_server() now serves the protocol from private duplicates of stdin and stdout and repoints the standard descriptors away from the wire while it runs, restoring both on exit: fd 0 (and the Wind...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:876bc459-f277-f763-5087-5ad02be777e0
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE130:3F7D9B:E62669:139C1AC:6A62CE18
html-safe-nonce857613083069e9a8b0028a907cd311d1e263fb022421bfba222a2d8af95e346d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTMwOjNGN0Q5QjpFNjI2Njk6MTM5QzFBQzo2QTYyQ0UxOCIsInZpc2l0b3JfaWQiOiI4MjA2MzM4NjE3NzYzODc2Mzc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacbc5367e25434675d37cd0262ef2d983f15dc3d076785430fa2f9e630a6782340
hovercard-subject-tagpull_request:4071400397
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/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/3117/commits
twitter:imagehttps://opengraph.githubassets.com/e0a7ce690adbc7e7beb5ff34ce333c301d044c9c3b40b5f6cf8607b2832c2565/modelcontextprotocol/python-sdk/pull/3117
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e0a7ce690adbc7e7beb5ff34ce333c301d044c9c3b40b5f6cf8607b2832c2565/modelcontextprotocol/python-sdk/pull/3117
og:image:altstdio_server() now serves the protocol from private duplicates of stdin and stdout and repoints the standard descriptors away from the wire while it runs, restoring both on exit: fd 0 (and the Wind...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemaxisbey
hostnamegithub.com
expected-hostnamegithub.com
Nonedf33b1b61ee7b9a0af988199bfc3503c9c1acafb1f1d40e1f140ea7c84f890dd
turbo-cache-controlno-cache
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
released41cd1bdb290013455c0ac430fa755621733f5eb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F3117%2Fcommits
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
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
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%2F3117%2Fcommits
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%2Fcommits&source=header-repo&source_repo=modelcontextprotocol%2Fpython-sdk
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits
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.7k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk
Code https://github.com/modelcontextprotocol/python-sdk
Issues 270 https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests 316 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
maxisbeyhttps://github.com/maxisbey
mainhttps://github.com/modelcontextprotocol/python-sdk/tree/main
stdio-stdin-isolationhttps://github.com/modelcontextprotocol/python-sdk/tree/stdio-stdin-isolation
Conversationhttps://github.com/modelcontextprotocol/python-sdk/pull/3117
Commits17 (17)https://github.com/modelcontextprotocol/python-sdk/pull/3117/commits
Checkshttps://github.com/modelcontextprotocol/python-sdk/pull/3117/checks
Files changedhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/files
Isolate the stdio server's stdin and stdout from handler subprocesseshttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits#top
maxisbeyhttps://github.com/maxisbey
mainhttps://github.com/modelcontextprotocol/python-sdk/tree/main
stdio-stdin-isolationhttps://github.com/modelcontextprotocol/python-sdk/tree/stdio-stdin-isolation
Isolate the stdio server's stdin from handler subprocesseshttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/42ef19a5936c6ef97c8b6bccc5882a9d85219331
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
42ef19ahttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/42ef19a5936c6ef97c8b6bccc5882a9d85219331
https://github.com/modelcontextprotocol/python-sdk/tree/42ef19a5936c6ef97c8b6bccc5882a9d85219331
Isolate the stdio server's stdout from handler code and subprocesseshttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/f74f6084df1f11d3d8b723beb96e53718820bf2b
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
f74f608https://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/f74f6084df1f11d3d8b723beb96e53718820bf2b
https://github.com/modelcontextprotocol/python-sdk/tree/f74f6084df1f11d3d8b723beb96e53718820bf2b
Refuse abnormal processes instead of repairing them in stdio isolationhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/52d940913ce2235a2933375952ad3171b9b443f1
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
52d9409https://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/52d940913ce2235a2933375952ad3171b9b443f1
https://github.com/modelcontextprotocol/python-sdk/tree/52d940913ce2235a2933375952ad3171b9b443f1
Replace dashes with plain punctuation in prose added by this branchhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/ac17129fec1b7a709e76fb413a37c1e600b84584
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
ac17129https://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/ac17129fec1b7a709e76fb413a37c1e600b84584
https://github.com/modelcontextprotocol/python-sdk/tree/ac17129fec1b7a709e76fb413a37c1e600b84584
Hold the stream claim for in-place fallbacks toohttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/664b540125c1060cd7c3aad8c0de6c4baf02ca15
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
664b540https://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/664b540125c1060cd7c3aad8c0de6c4baf02ca15
https://github.com/modelcontextprotocol/python-sdk/tree/664b540125c1060cd7c3aad8c0de6c4baf02ca15
Add migration note for code that watches fd 0 directlyhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/7374202616d4781b23d511f864f2826293e30caa
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
7374202https://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/7374202616d4781b23d511f864f2826293e30caa
https://github.com/modelcontextprotocol/python-sdk/tree/7374202616d4781b23d511f864f2826293e30caa
Scope the fd 0 watchdog migration example to POSIXhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/722ff77e976fa78503c5c85deaa1df7cd8935781
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
722ff77https://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/722ff77e976fa78503c5c85deaa1df7cd8935781
https://github.com/modelcontextprotocol/python-sdk/tree/722ff77e976fa78503c5c85deaa1df7cd8935781
Keep a still-diverted fd claimed when its restore failshttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/8c468581d241aaa9718e35d2951e8964ca567771
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
8c46858https://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/8c468581d241aaa9718e35d2951e8964ca567771
https://github.com/modelcontextprotocol/python-sdk/tree/8c468581d241aaa9718e35d2951e8964ca567771
Roll forward when a failed claim cannot be rolled backhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/8ed5083d67eccecdf6a7e64cbb66d9a2bcf3ab24
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
8ed5083https://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/8ed5083d67eccecdf6a7e64cbb66d9a2bcf3ab24
https://github.com/modelcontextprotocol/python-sdk/tree/8ed5083d67eccecdf6a7e64cbb66d9a2bcf3ab24
Reshape the stream claim into an explicit state machinehttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/41b9faaf9b96800e1441c1b29d8392189f995a64
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
41b9faahttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/41b9faaf9b96800e1441c1b29d8392189f995a64
https://github.com/modelcontextprotocol/python-sdk/tree/41b9faaf9b96800e1441c1b29d8392189f995a64
Exclude POSIX-only fcntl lines from the Windows coverage gatehttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/45eed51c36bcf14c789a3c2ebf07ca503b3a042e
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
45eed51https://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/45eed51c36bcf14c789a3c2ebf07ca503b3a042e
https://github.com/modelcontextprotocol/python-sdk/tree/45eed51c36bcf14c789a3c2ebf07ca503b3a042e
Open the errlog capture as UTF-8 in the noisy-child testhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/3e5fa689f9c65858a0e491512673bda950ec7ca0
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
3e5fa68https://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/3e5fa689f9c65858a0e491512673bda950ec7ca0
https://github.com/modelcontextprotocol/python-sdk/tree/3e5fa689f9c65858a0e491512673bda950ec7ca0
Never close a buffer the transport does not ownhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/cbac04deab9d400a8f77094286878ff6e7d49f71
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
cbac04dhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/cbac04deab9d400a8f77094286878ff6e7d49f71
https://github.com/modelcontextprotocol/python-sdk/tree/cbac04deab9d400a8f77094286878ff6e7d49f71
Correct the watchdog poll mask note and use the public get_osfhandlehttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/a33d31cfcf2fd76e83b8c93ba40641f2647ccb33
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
a33d31chttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/a33d31cfcf2fd76e83b8c93ba40641f2647ccb33
https://github.com/modelcontextprotocol/python-sdk/tree/a33d31cfcf2fd76e83b8c93ba40641f2647ccb33
Scope the stderr-closed isolation test to POSIXhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/84f033d98e3f3ea1d6e529a5421fddb34279f0d2
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
84f033dhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/84f033d98e3f3ea1d6e529a5421fddb34279f0d2
https://github.com/modelcontextprotocol/python-sdk/tree/84f033d98e3f3ea1d6e529a5421fddb34279f0d2
Scope the stray-output docs to flushed writeshttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/cc9016c774c14d07982e68da1530521e9028c53c
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
cc9016chttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/cc9016c774c14d07982e68da1530521e9028c53c
https://github.com/modelcontextprotocol/python-sdk/tree/cc9016c774c14d07982e68da1530521e9028c53c
Re-point fd at the wire when a divert dup2 failshttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/2adb27f342793ce7646ab458346e84cd5502ab7f
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
2adb27fhttps://github.com/modelcontextprotocol/python-sdk/pull/3117/commits/2adb27f342793ce7646ab458346e84cd5502ab7f
https://github.com/modelcontextprotocol/python-sdk/tree/2adb27f342793ce7646ab458346e84cd5502ab7f
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.