Title: fix: preserve stdio streams in server transport by pranjalbhatia710 · Pull Request #2734 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: fix: preserve stdio streams in server transport by pranjalbhatia710 · Pull Request #2734 · modelcontextprotocol/python-sdk
X Title: fix: preserve stdio streams in server transport by pranjalbhatia710 · Pull Request #2734 · modelcontextprotocol/python-sdk
Description: Summary duplicate the process stdin/stdout file descriptors before wrapping them for the stdio server transport close only the duplicated wrapper streams on shutdown, preserving the original process-level streams extend the stdio regression test to assert the original sys.stdin/sys.stdout wrappers remain usable after the server exits Fixes #1933 Test plan uv run --frozen pytest tests/server/test_stdio.py -q uv run --frozen ruff check src/mcp/server/stdio.py tests/server/test_stdio.py uv run --frozen pyright src/mcp/server/stdio.py tests/server/test_stdio.py
Open Graph Description: Summary duplicate the process stdin/stdout file descriptors before wrapping them for the stdio server transport close only the duplicated wrapper streams on shutdown, preserving the original proce...
X Description: Summary duplicate the process stdin/stdout file descriptors before wrapping them for the stdio server transport close only the duplicated wrapper streams on shutdown, preserving the original proce...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2734
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c218a119-01d9-97eb-8016-21cc2fbfa0d6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 842E:26A65F:22F8B29:2F48C80:6A59A8B1 |
| html-safe-nonce | 2954aa3149c56c5f5dddadd519329dbd37273be441124c23f7f5cf9b877c674a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDJFOjI2QTY1RjoyMkY4QjI5OjJGNDhDODA6NkE1OUE4QjEiLCJ2aXNpdG9yX2lkIjoiMjI3NjAxMjczNjU1MDM4MTc0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 507e8d4da13a87e5a67d558fec4dd1cd600b12ea857c9bf6a1ee8d5b62415037 |
| hovercard-subject-tag | pull_request:3775866607 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/2734/files |
| twitter:image | https://avatars.githubusercontent.com/u/233476158?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/233476158?s=400&v=4 |
| og:image:alt | Summary duplicate the process stdin/stdout file descriptors before wrapping them for the stdio server transport close only the duplicated wrapper streams on shutdown, preserving the original proce... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a540949572872b935b393b36db38922db390ae71c859537d741b8f3eb7e545b5 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0b971869dd75eec26500a9de7e85b8137c6bf0f6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width