René's URL Explorer Experiment


Title: [v2] ClientSession runs on JSONRPCDispatcher; BaseSession removed by maxisbey · Pull Request #2838 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: [v2] ClientSession runs on JSONRPCDispatcher; BaseSession removed by maxisbey · Pull Request #2838 · modelcontextprotocol/python-sdk

X Title: [v2] ClientSession runs on JSONRPCDispatcher; BaseSession removed by maxisbey · Pull Request #2838 · modelcontextprotocol/python-sdk

Description: V2 client receive path: Transport -> JSONRPCDispatcher -> ClientSession callbacks, replacing the BaseSession receive loop. Companion to #2710, which did the same for the server seat; BaseSession is now deleted. Motivation and Context ClientSession was the last consumer of the v1 BaseSession engine. Moving it onto the dispatcher unifies both seats on one receive path and fixes the v1 client's structural problems: server-initiated requests were handled inline in the receive loop (a slow sampling callback blocked everything, a callback that sent a request deadlocked, and peer cancellation was unactionable), and a raising notification handler could take down the connection. ClientSession's public surface is unchanged: same constructor, same typed methods, manual initialize(), same context-manager lifecycle. A new keyword-only dispatcher= constructor argument accepts a pre-built dispatcher instead of the stream pair (e.g. DirectDispatcher for in-process embedding). What changed CallOptions.cancel_on_abandon + suppression: abandoning a request (timeout or caller cancellation) sends a courtesy notifications/cancelled, unless the caller opted out (initialize, which the spec forbids cancelling) or the request carries resumption hints (the peer's work must survive for the resume) The two shielded cancellation-path writes are bounded (5s), so a wedged transport write can no longer hang shutdown or a cancelled caller Spawned notification handlers and the new on_stream_exception observer are contained at the dispatcher: a raising handler costs itself, never the connection (matching the TypeScript/C#/Go engines) ClientSession internals rewritten over the dispatcher; mcp.shared.session shrinks to a compatibility module (ProgressFnT re-export, typing-only RequestResponder stub for MessageHandlerFnT annotations) The dispatcher constructor overloads collapsed via a defaulted TypeVar (PEP 696) Drive-by fix: the standalone SSE writer no longer logs an ERROR traceback when transport teardown closes its stream mid-listen Parity bar The transport-parametrized interaction suite passes. Three recorded divergences are now resolved and deleted from the requirements manifest (protocol:timeout:sends-cancellation, protocol:cancel:late-response-ignored, protocol:cancel:server-to-client), and the server-to-client cancellation requirement is pinned by a new test passing over all three transports. Breaking Changes Documented in docs/migration.md (one grouped entry): Request ids count from 1 (previously 0); progress tokens follow Timeout error text is now Request 'tools/call' timed out, and a timed-out or abandoned request sends notifications/cancelled, interrupting the server handler Server-initiated requests run concurrently; a server's cancellation now actually interrupts the client callback Notification callbacks are concurrent (no completion-before-response guarantee) Responses with unknown ids are ignored per spec instead of surfacing a RuntimeError to message_handler Unknown inbound methods are answered with METHOD_NOT_FOUND (carrying the method in data), completing #2836's contract on the client seat A raising request callback is answered with code=0 and the exception text (previously flattened to INVALID_PARAMS) send_request before entering the context manager raises RuntimeError immediately Fixes #2489. Fixes #2507. Supersedes #2490. Related, not closed here: #2673 (a raising request callback now answers the server with code=0 and the exception text instead of INVALID_PARAMS; the opt-in propagation of the exception to the local call_tool awaiter that the issue requests stays open as a separate decision) and #2610 (server-seat bug on a code path that no longer exists on main after #2710; still open for v1.x triage — not addressed here). How Has This Been Tested? Full suite (1741 tests) including the interaction suite over in-memory, SSE, and streamable HTTP; 100% branch coverage held on all changed files. New tests: courtesy-cancel wire pins and suppression, wedged-transport shutdown bound (trio virtual clock), notification-handler containment, stream-exception observer, the dispatcher= constructor over direct dispatch, server-seat timeout cancellation, abandoned-server-request cancellation, standalone-stream teardown ordering. Types of changes Bug fix (non-breaking change which fixes an issue) 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 AI Disclaimer

Open Graph Description: V2 client receive path: Transport -> JSONRPCDispatcher -> ClientSession callbacks, replacing the BaseSession receive loop. Companion to #2710, which did the same for the server seat; BaseSess...

X Description: V2 client receive path: Transport -> JSONRPCDispatcher -> ClientSession callbacks, replacing the BaseSession receive loop. Companion to #2710, which did the same for the server seat; ...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:53a61dbb-8262-032b-d84f-d9e88f38d899
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9326:EEEA7:23AA2D1:303A234:6A59B381
html-safe-noncea4f2bbcfebb998aa11fd7e66a4963c24f7f00e107064c487b250e95d53322f32
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzI2OkVFRUE3OjIzQUEyRDE6MzAzQTIzNDo2QTU5QjM4MSIsInZpc2l0b3JfaWQiOiIzNjA2MjEwNjAxMTQyNTYzNzEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc7b693277bbc5229d8b2c114a97c33601d4ed12d7aa46aea8246bf1f0a882094
hovercard-subject-tagpull_request:3848808107
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/2838/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:altV2 client receive path: Transport -> JSONRPCDispatcher -> ClientSession callbacks, replacing the BaseSession receive loop. Companion to #2710, which did the same for the server seat; BaseSess...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneba3976babb66479b1c943a8edc0777d96157da48fadc0161f9ddb219deee8353
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
releaseab680789ae4a316cdaf0d5a292a1760140931cc4
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/pull/2838/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F2838%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%2F2838%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/2838/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/2838/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/2838/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2838/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 255 https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests 303 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/v2-client-dispatcher-swaphttps://github.com/modelcontextprotocol/python-sdk/tree/maxisbey/v2-client-dispatcher-swap
Conversation 3 https://github.com/modelcontextprotocol/python-sdk/pull/2838
Commits 28 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits
Checks 32 https://github.com/modelcontextprotocol/python-sdk/pull/2838/checks
Files changed https://github.com/modelcontextprotocol/python-sdk/pull/2838/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2838/files
[v2] ClientSession runs on JSONRPCDispatcher; BaseSession removed https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#top
Show all changes 28 commits https://github.com/modelcontextprotocol/python-sdk/pull/2838/files
35a3722 Add courtesy-cancel controls and bound shielded dispatcher writes maxisbey Jun 11, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/35a3722fd7ebfecf1b7c5dec1fee55f35168bddc
0ac7937 Contain notification-handler exceptions in the dispatcher maxisbey Jun 11, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/0ac793731c0275243e5fa987c99008c67aef90ab
aaacafc Add an on_stream_exception observer to the dispatcher maxisbey Jun 11, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/aaacafc5b4874a51860ea688a7274d4f9f5e54fb
83c4ba7 Collapse the dispatcher constructor overloads with a defaulted TypeVar maxisbey Jun 11, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/83c4ba734658ee9d17f344f83a03567343a59d61
12c8ef3 Move ClientSession onto JSONRPCDispatcher and delete BaseSession maxisbey Jun 11, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/12c8ef310aa99667428e57be2952c90c8d67a94c
ad471be Cover the remaining client-session branches and document the migration maxisbey Jun 11, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/ad471bed43a8ccfdbb7ca94ee6983b103d260f52
2d4c5cd Stop logging an error when the standalone SSE stream closes mid-listen maxisbey Jun 11, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/2d4c5cd06fef2defe475841b7b2e2d0a3e015fc6
36a091d Accept a pre-built dispatcher via a constructor keyword maxisbey Jun 11, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/36a091d863ace10f7785e52c790a71756c1c8295
dbd1693 Restore full coverage after the BaseSession deletion maxisbey Jun 11, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/dbd1693994f1aa5218ab69fd7fb40ab977cca24b
c4720d3 Tighten dispatcher abandon-path writes and response invariants maxisbey Jun 11, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/c4720d315b7acb3e4b4fd5616dcc808445d96d68
c67b8d1 Harden ClientSession enter/exit and fault delivery maxisbey Jun 11, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/c67b8d17b54ac82b82e3028626a7337d82a2d66c
33a5482 Pin initialize-abandon suppression and tidy the interaction suite maxisbey Jun 11, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/33a5482526ef87d41e2b9ef326adbaa0093838ed
8786a52 Exercise the standalone SSE teardown window deterministically maxisbey Jun 11, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/8786a52efe2b75104520a595ca434710d54e5d0e
0d4762f Document the dispatcher behavior changes in the migration guide maxisbey Jun 11, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/0d4762f442b374d55839583a3c99cc7e14625ce8
9d4e02e Tighten comments and docstrings across the dispatcher swap maxisbey Jun 12, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/9d4e02e98dc2b0a71d25a8c29710e1442ce8a6a6
07f1b6d Remove the client-side related_request_id surface maxisbey Jun 12, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/07f1b6d195da62a24492a0bdc43c12c5a4c06025
48f2b01 Make ClientRequestContext a concrete class maxisbey Jun 12, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/48f2b012ea6a7a1dfcc287dd927e8800aee6d388
421e65b Synthesize request ids in DirectDispatcher maxisbey Jun 12, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/421e65ba13c12c109315de00b3631953f0addce0
2d33ade Raise CONNECTION_CLOSED for requests sent after the connection closed maxisbey Jun 12, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/2d33ade749b781e220eb6d1f4ba7c2784a36d803
1703d42 Make the late-response-ignored pin falsifiable maxisbey Jun 12, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/1703d426649ac754be4ab1cc90b5a6ad697e440f
1672788 Trim the dispatcher-swap migration notes maxisbey Jun 12, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/16727881116be399f1e10ea1e25bba7dff61375c
47616ac Close the write stream only after the task-group join maxisbey Jun 12, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/47616ac9b578e4a721069de46cd98f7b24a71428
04778b6 Pin client request concurrency in both directions maxisbey Jun 12, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/04778b65bc48f0b6c5d1546709cce57d92a9bff8
0a54692 Tidy naming and doc nits from review maxisbey Jun 12, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/0a54692eae3e1e142ea53fa5abebefa327f15e20
32b76cf Trim the ClientSession migration section to behavior-relevant changes maxisbey Jun 15, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/32b76cf95c6e1dbcb8fe2a046045a7501d4441ee
a27bca7 Harden ClientSession/dispatcher lifecycle and error handling maxisbey Jun 15, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/a27bca780e721825a9521b676fc10dd12933b7ba
9dedb40 Heal 3.11 coverage tracing in the new dispatcher tests maxisbey Jun 15, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/9dedb40ef4f76e28fcbf106439ddda8c8817bc29
ea52a87 Heal 3.11 coverage tracing at JSONRPCDispatcher.run() exit maxisbey Jun 15, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/2838/commits/ea52a87ae4eaef61b30345d699d8635aee6fd046
Clear filters https://github.com/modelcontextprotocol/python-sdk/pull/2838/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2838/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2838/files
migration.md https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
client.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-34e945ebc2fea8a427b8d0c45ccd28eb4e4cceb33c82048bd7998e6bb2f754f3
context.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-25d1a961ade849cb15b73777cb8b3e097890d74242ccfdcea2847e70cc1c2a83
session.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-634d1abcb8bda1a784f31e3431a10124e387f487dd243a54244515b4972aa0ee
session.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-9a603a2587011a188aa76ca19a32fcd343a253516325fbcfb4f7bfb6a814634c
streamable_http.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-0119e4c1bbf2fde7ba89b9c9f5bc472ccc2332f84e96e47cf9e45cebef801da3
_context.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-51d43110ef8cfa0d238a0e8ce301c02851259f50d00316c5146c91fa4e768ece
direct_dispatcher.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-6566b073a8d9286a5b17e0bb02d6e12e822eaedf2236c0d637dcd57992268076
dispatcher.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-13274512d72e2a34a599019a9226619b150fca24130936cee3dc7d5122934673
jsonrpc_dispatcher.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-3d8fb73fa8b126691302c15bb63bbc44a3a0e9338a17f14b3b4ea1d97bb10c2c
session.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-aaa1596dd4db91f5cd7f743c8afbe58596daf01a2ecec4a0024768f7409fb1dc
__init__.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-9f1fb2e597d3bbb6f7b01cff7178a42325dec6460c16dfa74838da9a766efcf2
jsonrpc.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-bf630a0253b7e8c4d256296014e66e2f71e362ad890892d1bfbf94b3aebe132c
test_list_roots_callback.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-90b39d804728390ef9eab471f7f9877b35f83c44d63b99a1ea9653f6d5e11ee9
test_resource_cleanup.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-361a08624b2e1f7cbf66fe4860d25593cb064af399f3f5c8e5167396a97119f0
test_sampling_callback.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-2644de1d5107de80cb62cb010cb87b5858288fdd961806d4abdbc822f1d30540
test_session.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-623490a9c2dd576cc59e89f8d51f64acfffdeaad940e0bd4a0a51a50bc30d92d
test_session_concurrency.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-dcd16b274ced024cd0d253cd86a1a4c8042327b1b0f150227e73811bdc22c844
README.md https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-112d0208d481546644215b9de655e51c63d09dcb845cca6ca95d030ad007d443
_helpers.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-c8a8ff425b6a85c43aec1841627f4dfe5fbd10e11ae63c63443e999a000a0ca2
_requirements.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-c12ce54cbf13a11daa3f93343e5df8c89ca2b25d0f20f00b5408a2402a223228
test_cancellation.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-bbb272049658e36f86bd66e16deef2e8ac8f7f90bb4bd89aa0f025bf1db48fee
test_logging.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-3192d40691eceb9afd35995b61b0eecab1ac2deab780167455817137665073dd
test_progress.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-adbb27a971d4f833b1e7bcadb8054ba7fda245e02e6e49b0aacbeaec620e205a
test_timeouts.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-72f06b25a7e212f804121ef810f403578c4acd67b76b86ccda04618012a9930d
test_wire.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-163576971f36a4e8babc1808a586ab93dc81945e27aad2f238bd5b77fa441ac5
test_88_random_error.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-4e8132257776907428bdfd1d3671faed7b41a6347402e65f630f3a27a290edf5
test_elicitation.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-6cf9570e46bbc0eb2485392dfaa05780418f6295efc86d9f79bf047584880d54
test_integration.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-06853ee92cf7e60bc876d235eb6b3a0ec88c2719e5af44e0a46fb6b71c9ab3e2
test_server.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-c191383f010475fc22bf69d35f14f16d7e45098b05a1a0f03ad66d6c151d1f34
test_url_elicitation.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-c35abe7dd7e0015dc6b664d3c8c70f67445f06594578915db32ab0d594df50cb
test_session.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-ed22c8fef52dc8c1d840dc0825bc375c48b67dcc2b468bab084aded3af06fdcf
test_context_streams.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-9718f547c3329b58a03b8fb3082d8ed3a34830534a1866a7cb4f19cd2bcd85d2
test_dispatcher.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-490cfcfdfdaf03f631a5cc632ec5a47dee6aa063d13518834a7a1f1bb8493f3f
test_exceptions.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-421ba858fcd641365a9ddde0a2395e9db1e987a6552f5daf317fe6457e9925a7
test_jsonrpc_dispatcher.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-ce6a750fbce4c4bfa60b1845cdd92c08be0c2ed1fdcecdcb2a2efa24170efabd
test_session.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-c1cae39f59e7077c9b3f3310d51bd7fc70f57b80f25911dafdcf7720b71184c2
test_streamable_http.py https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-57d1f3c64af36960aa61b1d77387fb6201b90fbc2f3d606bf2761315ce618cc5
docs/migration.mdhttps://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
View file https://github.com/modelcontextprotocol/python-sdk/blob/ea52a87ae4eaef61b30345d699d8635aee6fd046/docs/migration.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/2838/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-758ba107a728fccfdf0d098b2c06ded59127dd53ea287d630f72fb51040bc72d
src/mcp/client/client.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-34e945ebc2fea8a427b8d0c45ccd28eb4e4cceb33c82048bd7998e6bb2f754f3
View file https://github.com/modelcontextprotocol/python-sdk/blob/ea52a87ae4eaef61b30345d699d8635aee6fd046/src/mcp/client/client.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/2838/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-34e945ebc2fea8a427b8d0c45ccd28eb4e4cceb33c82048bd7998e6bb2f754f3
https://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-34e945ebc2fea8a427b8d0c45ccd28eb4e4cceb33c82048bd7998e6bb2f754f3
src/mcp/client/context.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/2838/files#diff-25d1a961ade849cb15b73777cb8b3e097890d74242ccfdcea2847e70cc1c2a83
View file https://github.com/modelcontextprotocol/python-sdk/blob/ea52a87ae4eaef61b30345d699d8635aee6fd046/src/mcp/client/context.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/2838/{{ revealButtonHref }}
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2838/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/2838/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.