René's URL Explorer Experiment


Title: sketch: refactor lowlevel server to handler pattern by maxisbey · Pull Request #1968 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: sketch: refactor lowlevel server to handler pattern by maxisbey · Pull Request #1968 · modelcontextprotocol/python-sdk

X Title: sketch: refactor lowlevel server to handler pattern by maxisbey · Pull Request #1968 · modelcontextprotocol/python-sdk

Description: The official Python SDK for Model Context Protocol servers and clients - sketch: refactor lowlevel server to handler pattern by maxisbey · Pull Request #1968 · modelcontextprotocol/python-sdk

Open Graph Description: Replaces decorator-based handler registration with RequestHandler/NotificationHandler classes. Changes New files: request_handler.py and notification_handler.py with typed overloaded constructors ...

X Description: Replaces decorator-based handler registration with RequestHandler/NotificationHandler classes. Changes New files: request_handler.py and notification_handler.py with typed overloaded constructors ...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:bcd92e43-7e95-9d43-0fcf-6a65a9df561b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9506:2F6413:53A581E:6D3ED57:6A5D8701
html-safe-noncedfd51afc5bfb042064ff6dc2f5e9027ff3618ea4a2a02b0fe989238b5dc47848
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTA2OjJGNjQxMzo1M0E1ODFFOjZEM0VENTc6NkE1RDg3MDEiLCJ2aXNpdG9yX2lkIjoiNTE2ODE3NTE5NjA2Mzc2MjE3NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf8d5de15f17786d47f20a2614c77f5c3b4fbcb096f381c45b015e432110bccbe
hovercard-subject-tagpull_request:3218864104
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/1968/commits
twitter:imagehttps://opengraph.githubassets.com/b6cf0d4e23d8ff3ab81767f889ca489897933e30540c9ca8a102413f42071279/modelcontextprotocol/python-sdk/pull/1968
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b6cf0d4e23d8ff3ab81767f889ca489897933e30540c9ca8a102413f42071279/modelcontextprotocol/python-sdk/pull/1968
og:image:altReplaces decorator-based handler registration with RequestHandler/NotificationHandler classes. Changes New files: request_handler.py and notification_handler.py with typed overloaded constructors ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemaxisbey
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
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
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F1968%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
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%2F1968%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/1968/commits
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/1968/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 263 https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests 309 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
sketch/lowlevel-server-v2https://github.com/modelcontextprotocol/python-sdk/tree/sketch/lowlevel-server-v2
Conversationhttps://github.com/modelcontextprotocol/python-sdk/pull/1968
Commits17 (17)https://github.com/modelcontextprotocol/python-sdk/pull/1968/commits
Checkshttps://github.com/modelcontextprotocol/python-sdk/pull/1968/checks
Files changedhttps://github.com/modelcontextprotocol/python-sdk/pull/1968/files
sketch: refactor lowlevel server to handler patternhttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits#top
maxisbeyhttps://github.com/maxisbey
mainhttps://github.com/modelcontextprotocol/python-sdk/tree/main
sketch/lowlevel-server-v2https://github.com/modelcontextprotocol/python-sdk/tree/sketch/lowlevel-server-v2
sketch: lowlevel server v2 with overloaded handler classeshttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/ec9815f636677549c94d6b1f5481bb04ee76c457
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
ec9815fhttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/ec9815f636677549c94d6b1f5481bb04ee76c457
https://github.com/modelcontextprotocol/python-sdk/tree/ec9815f636677549c94d6b1f5481bb04ee76c457
refactor: replace decorator-based handlers with RequestHandler/NotificationHandler patternhttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/eb35b3ca8c1668e1cf9beceff1d5776d529142da
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
eb35b3chttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/eb35b3ca8c1668e1cf9beceff1d5776d529142da
https://github.com/modelcontextprotocol/python-sdk/tree/eb35b3ca8c1668e1cf9beceff1d5776d529142da
refactor: split RequestContext into handler context hierarchyhttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/0b60fad14c0255750e846f4ee7e820ebf646225a
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
0b60fadhttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/0b60fad14c0255750e846f4ee7e820ebf646225a
https://github.com/modelcontextprotocol/python-sdk/tree/0b60fad14c0255750e846f4ee7e820ebf646225a
rename: self.endpoint -> self.handler in handler classeshttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/bed7e3c8d0c907d8f6725f3e253bfcdacb0b9299
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
bed7e3chttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/bed7e3c8d0c907d8f6725f3e253bfcdacb0b9299
https://github.com/modelcontextprotocol/python-sdk/tree/bed7e3c8d0c907d8f6725f3e253bfcdacb0b9299
refactor: decouple ExperimentalHandlers from Server internals, update migration docshttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/860e8d6e9465542c10451770d5ea3f0d021517b8
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
860e8d6https://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/860e8d6e9465542c10451770d5ea3f0d021517b8
https://github.com/modelcontextprotocol/python-sdk/tree/860e8d6e9465542c10451770d5ea3f0d021517b8
refactor: update MCPServer to use RequestHandler pattern instead of decoratorshttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/17c459c4e53e10f00c7b248a857509a328068d0c
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
17c459chttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/17c459c4e53e10f00c7b248a857509a328068d0c
https://github.com/modelcontextprotocol/python-sdk/tree/17c459c4e53e10f00c7b248a857509a328068d0c
refactor: collapse context hierarchy into single RequestContext classhttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/8100870fb60f9395a794e439d59a2f3c3a81a783
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
8100870https://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/8100870fb60f9395a794e439d59a2f3c3a81a783
https://github.com/modelcontextprotocol/python-sdk/tree/8100870fb60f9395a794e439d59a2f3c3a81a783
refactor: move _ping_handler below Server classhttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/d5c3b5fd26549a9835d1d26c72cf9d286f61cc86
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
d5c3b5fhttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/d5c3b5fd26549a9835d1d26c72cf9d286f61cc86
https://github.com/modelcontextprotocol/python-sdk/tree/d5c3b5fd26549a9835d1d26c72cf9d286f61cc86
refactor: merge request_handler.py and notification_handler.py into handler.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/952a29cc389a10ea34b719d26830dd7250d52f49
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
952a29chttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/952a29cc389a10ea34b719d26830dd7250d52f49
https://github.com/modelcontextprotocol/python-sdk/tree/952a29cc389a10ea34b719d26830dd7250d52f49
refactor: move request_ctx contextvar to lowlevel server, remove per-handler boilerplatehttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/6f0b041662ff219ad8bc8c8127b61258c9b951af
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
6f0b041https://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/6f0b041662ff219ad8bc8c8127b61258c9b951af
https://github.com/modelcontextprotocol/python-sdk/tree/6f0b041662ff219ad8bc8c8127b61258c9b951af
docs: fix migration guide — request_ctx contextvar still existshttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/aa6d861257fe196b90f00818f3b0d77b8842c4a0
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
aa6d861https://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/aa6d861257fe196b90f00818f3b0d77b8842c4a0
https://github.com/modelcontextprotocol/python-sdk/tree/aa6d861257fe196b90f00818f3b0d77b8842c4a0
docs: fix stale examples in migration guidehttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/24f1f39bf4cdbbd3fa59ab9da308331128411652
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
24f1f39https://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/24f1f39bf4cdbbd3fa59ab9da308331128411652
https://github.com/modelcontextprotocol/python-sdk/tree/24f1f39bf4cdbbd3fa59ab9da308331128411652
refactor: address review — kw_only dataclass, type Experimental properly, remove redundant guardhttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/8eb72990bdc9401111f0fde3b72ff5c170a7aecc
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
8eb7299https://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/8eb72990bdc9401111f0fde3b72ff5c170a7aecc
https://github.com/modelcontextprotocol/python-sdk/tree/8eb72990bdc9401111f0fde3b72ff5c170a7aecc
fix: allow ping handler override, add task overloads, update stale docstringshttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/cafb3e505ec63e823479fa8da7b744324b95ed9d
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
cafb3e5https://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/cafb3e505ec63e823479fa8da7b744324b95ed9d
https://github.com/modelcontextprotocol/python-sdk/tree/cafb3e505ec63e823479fa8da7b744324b95ed9d
docs: move lowlevel server sections to Breaking Changes in migration guidehttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/4255a996733d7577e2103a8e4c06488439bba494
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
4255a99https://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/4255a996733d7577e2103a8e4c06488439bba494
https://github.com/modelcontextprotocol/python-sdk/tree/4255a996733d7577e2103a8e4c06488439bba494
Update src/mcp/server/lowlevel/__init__.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/044e12813b0da9f5d510d6cff829b7e014dc84de
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
Kludexhttps://github.com/modelcontextprotocol/python-sdk/commits?author=Kludex
044e128https://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/044e12813b0da9f5d510d6cff829b7e014dc84de
https://github.com/modelcontextprotocol/python-sdk/tree/044e12813b0da9f5d510d6cff829b7e014dc84de
refactor: remove request_ctx from lowlevel public API, fix experimental docs examplehttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/f10995ed9810fd62f456ee2b5c3028e763ad05e0
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
f10995ehttps://github.com/modelcontextprotocol/python-sdk/pull/1968/commits/f10995ed9810fd62f456ee2b5c3028e763ad05e0
https://github.com/modelcontextprotocol/python-sdk/tree/f10995ed9810fd62f456ee2b5c3028e763ad05e0
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.