René's URL Explorer Experiment


Title: tests: eliminate port-allocation races in SSE/StreamableHTTP tests by maxisbey · Pull Request #2264 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: tests: eliminate port-allocation races in SSE/StreamableHTTP tests by maxisbey · Pull Request #2264 · modelcontextprotocol/python-sdk

X Title: tests: eliminate port-allocation races in SSE/StreamableHTTP tests by maxisbey · Pull Request #2264 · modelcontextprotocol/python-sdk

Description: Motivation and Context Fixes #1573. Several test files use the pattern socket.bind(("", 0)) → get port → start uvicorn in multiprocessing.Process → wait_for_server() → connect. This has a TOCTOU window between port selection and bind: with pytest-xdist parallel workers, two tests can grab the same port, leading to connections landing on the wrong server (the 404 != 200 failure in test_response) or "address already in use" errors. Prior attempt #1528 used worker-specific port ranges but was closed unmerged. How Has This Been Tested? Full suite: 1136 passed, 100% coverage Stress: 5× runs with 14 parallel workers, all pass test_response flakefinder: 20/20 pass Runtime: ~4.7s for 104 affected tests (was ~25s+ with multiprocessing) Breaking Changes None. Test infrastructure only. Types of changes Bug fix (non-breaking change which fixes an issue) New feature (non-breaking change which adds functionality) Breaking change (fix or feature that would cause existing functionality to change) Documentation update Checklist I have read the MCP Documentation My code follows the repository's style guidelines New and existing tests pass locally I have added appropriate error handling I have added or updated documentation as needed Additional context Approach New helper run_server_in_thread (tests/test_helpers.py): runs uvicorn in a daemon thread with port=0. The kernel atomically assigns a free port at bind time, then we read it back from the bound socket via server.servers[0].sockets[0].getsockname(). No window between check and use. Why not httpx.ASGITransport everywhere? I tested this — httpx.ASGITransport buffers the full response body before returning (await self.app(scope, receive, send) blocks until the app returns). This works for StreamableHTTP POST→SSE cycles where each request completes, but deadlocks for: Legacy SSE (sse_client + SseServerTransport) — the GET /sse stream stays open indefinitely StreamableHTTP standalone GET stream — same problem for server-initiated notifications Any SSE security test expecting a 200 response (the stream never completes) So I used a hybrid: File Approach test_streamable_http_security.py httpx.ASGITransport (all POST-based, responses complete) test_http_unicode.py httpx.ASGITransport (POST→SSE cycles only) test_sse_security.py run_server_in_thread (several tests need 200 on long-lived stream) test_sse.py run_server_in_thread (legacy SSE requires real HTTP) test_streamable_http.py run_server_in_thread (fixtures only — test bodies unchanged) Net: −412 lines (495 added, 907 deleted). Side effects Server-side handler code now runs in-process (same PID, different thread), so coverage.py tracks it. Removed some # pragma: no cover annotations and cleaned up unused handlers that were never actually exercised. The event_store in event_server fixture is now the same object the server uses (not a pickled copy), so tests can inspect server-side state if needed. tests/shared/test_ws.py and tests/server/mcpserver/test_integration.py still use the old pattern — out of scope for this PR. AI Disclaimer

Open Graph Description: Motivation and Context Fixes #1573. Several test files use the pattern socket.bind(("", 0)) → get port → start uvicorn in multiprocessing.Process → wait_for_server() → connect. This has a...

X Description: Motivation and Context Fixes #1573. Several test files use the pattern socket.bind(("", 0)) → get port → start uvicorn in multiprocessing.Process → wait_for_server() → connect. Th...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:24be9636-ac2b-b82a-cad9-f45f5db8f193
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC588:1B77A1:72A87E:9612D6:6A5AEA4C
html-safe-nonceddd576559d42f0ddf01a074da8ddf73c25d0645efa0e04d47562ea65c9882a85
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTg4OjFCNzdBMTo3MkE4N0U6OTYxMkQ2OjZBNUFFQTRDIiwidmlzaXRvcl9pZCI6IjY3MzQzOTA5NzUzODM5MjMyNzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc435a6a4ffb431a406c765eebfe31d77c36c61eb35b4f69507edfcb86e713818
hovercard-subject-tagpull_request:3379018504
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/2264/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:altMotivation and Context Fixes #1573. Several test files use the pattern socket.bind(("", 0)) → get port → start uvicorn in multiprocessing.Process → wait_for_server() → connect. This has a...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
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
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/pull/2264/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F2264%2Ffiles
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
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%2F2264%2Ffiles
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%2Ffiles&source=header-repo&source_repo=modelcontextprotocol%2Fpython-sdk
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/2264/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/2264/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/2264/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2264/files
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.6k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk
Code https://github.com/modelcontextprotocol/python-sdk
Issues 258 https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests 301 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
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
maxisbey/max-156-flaky-convert-ssestreamablehttp-tests-to-httpxasgitransporthttps://github.com/modelcontextprotocol/python-sdk/tree/maxisbey/max-156-flaky-convert-ssestreamablehttp-tests-to-httpxasgitransport
Conversation 0 https://github.com/modelcontextprotocol/python-sdk/pull/2264
Commits 9 https://github.com/modelcontextprotocol/python-sdk/pull/2264/commits
Checks 29 https://github.com/modelcontextprotocol/python-sdk/pull/2264/checks
Files changed https://github.com/modelcontextprotocol/python-sdk/pull/2264/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2264/files
tests: eliminate port-allocation races in SSE/StreamableHTTP tests https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#top
Show all changes 9 commits https://github.com/modelcontextprotocol/python-sdk/pull/2264/files
e1237e7 tests: eliminate port-allocation races in SSE/StreamableHTTP tests maxisbey Mar 9, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2264/commits/e1237e7ad0ee122b1cc28225e84d6eb230079528
3f81d3b chore: downgrade stale no-cover pragmas to lax no cover maxisbey Mar 10, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2264/commits/3f81d3b9d547f9ee1d1f6c51cd40777c612291d4
ad07d3e perf(tests): module-scope server fixtures, ASGI for context-aware tests maxisbey Mar 13, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2264/commits/ad07d3e11a6da71679a007a0da8a7dcd0ebe4b00
29bdbd7 fix(tests): add no-branch pragma for nested async with ClientSession maxisbey Mar 17, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2264/commits/29bdbd708d8c6d59a88af90d87b2239a80d72e6c
4e6e9e7 fix(tests): 3.14 phantom branch arcs, Windows Proactor transport leak maxisbey Mar 18, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2264/commits/4e6e9e79b5e0a1d998bfaee102f7f71fda66701d
6cea4c5 refactor: minimal targeted pragmas instead of blanket lax no cover maxisbey Mar 18, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2264/commits/6cea4c58dac9f38559d20b1c272ac95c6f26ea3d
a307bd7 test: deterministically cover message_router closed-stream handler maxisbey Mar 18, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2264/commits/a307bd7d6194bf553b6a87a5fbebeea44d3d3ff7
50a2183 chore: adopt run_uvicorn_in_thread from MAX-157, drop wait_for_server maxisbey Mar 18, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2264/commits/50a2183e468dadd65f4760f7c1652951e4cc021c
a41ef89 fix(coverage): lax no cover on two matrix-entry-dependent except hand… maxisbey Mar 25, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2264/commits/a41ef893119f10bd4a4873463482359f803602b8
Clear filters https://github.com/modelcontextprotocol/python-sdk/pull/2264/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2264/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2264/files
session.py https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-9a603a2587011a188aa76ca19a32fcd343a253516325fbcfb4f7bfb6a814634c
sse.py https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-db3d89720f05f9c8a375c9ce008a6b477be25dccabca86a7d422814c5ab3f12c
streamable_http.py https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
transport_security.py https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-c17c97ac87513551ff71eab97a2b040af12707f3abd1970b3d01a999cce9dce2
test_http_unicode.py https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-1abfe619fb6ecef0087c7e77c14530625aee85ec1dc1db958de2f341769c21c9
test_sse_security.py https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-c4352f0bf263a51087a1f9dbd97e778a2fa4bf3fc0eced12e4bb84af262b7d8e
test_streamable_http_security.py https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-99641f6cbe257be62af18938eeaacc6b089a42a859dac58486fe17506a9de558
test_sse.py https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-a2934f5f6ec610dff6774352c41b8c697b539614667643d69fd67f6fc6d7765e
test_streamable_http.py https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-57d1f3c64af36960aa61b1d77387fb6201b90fbc2f3d606bf2761315ce618cc5
test_helpers.py https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-08a6944653efc734f4c8cb856fc854b9f21d655ca69796af2b170c53bff7919e
src/mcp/server/session.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-9a603a2587011a188aa76ca19a32fcd343a253516325fbcfb4f7bfb6a814634c
View file https://github.com/modelcontextprotocol/python-sdk/blob/a41ef893119f10bd4a4873463482359f803602b8/src/mcp/server/session.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/2264/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-9a603a2587011a188aa76ca19a32fcd343a253516325fbcfb4f7bfb6a814634c
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-9a603a2587011a188aa76ca19a32fcd343a253516325fbcfb4f7bfb6a814634c
src/mcp/server/sse.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-db3d89720f05f9c8a375c9ce008a6b477be25dccabca86a7d422814c5ab3f12c
View file https://github.com/modelcontextprotocol/python-sdk/blob/a41ef893119f10bd4a4873463482359f803602b8/src/mcp/server/sse.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/2264/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-db3d89720f05f9c8a375c9ce008a6b477be25dccabca86a7d422814c5ab3f12c
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-db3d89720f05f9c8a375c9ce008a6b477be25dccabca86a7d422814c5ab3f12c
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-db3d89720f05f9c8a375c9ce008a6b477be25dccabca86a7d422814c5ab3f12c
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-db3d89720f05f9c8a375c9ce008a6b477be25dccabca86a7d422814c5ab3f12c
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-db3d89720f05f9c8a375c9ce008a6b477be25dccabca86a7d422814c5ab3f12c
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-db3d89720f05f9c8a375c9ce008a6b477be25dccabca86a7d422814c5ab3f12c
src/mcp/server/streamable_http.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
View file https://github.com/modelcontextprotocol/python-sdk/blob/a41ef893119f10bd4a4873463482359f803602b8/src/mcp/server/streamable_http.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/2264/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
src/mcp/server/transport_security.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-c17c97ac87513551ff71eab97a2b040af12707f3abd1970b3d01a999cce9dce2
View file https://github.com/modelcontextprotocol/python-sdk/blob/a41ef893119f10bd4a4873463482359f803602b8/src/mcp/server/transport_security.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/2264/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-c17c97ac87513551ff71eab97a2b040af12707f3abd1970b3d01a999cce9dce2
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-c17c97ac87513551ff71eab97a2b040af12707f3abd1970b3d01a999cce9dce2
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-c17c97ac87513551ff71eab97a2b040af12707f3abd1970b3d01a999cce9dce2
https://github.com/modelcontextprotocol/python-sdk/pull/2264/files#diff-c17c97ac87513551ff71eab97a2b040af12707f3abd1970b3d01a999cce9dce2
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2264/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2264/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.