René's URL Explorer Experiment


Title: Support low-level interface for modifying the underlying Uvicorn server · Issue #253 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: Support low-level interface for modifying the underlying Uvicorn server · Issue #253 · modelcontextprotocol/python-sdk

X Title: Support low-level interface for modifying the underlying Uvicorn server · Issue #253 · modelcontextprotocol/python-sdk

Description: It would be great to have an API to interact with the MCP's underlying Uvicorn server. More specifically, It would be great to have a leaky interface, that can act as a bridge with the abstraction of the underlying Uvicorn server, a way ...

Open Graph Description: It would be great to have an API to interact with the MCP's underlying Uvicorn server. More specifically, It would be great to have a leaky interface, that can act as a bridge with the abstraction ...

X Description: It would be great to have an API to interact with the MCP's underlying Uvicorn server. More specifically, It would be great to have a leaky interface, that can act as a bridge with the abstract...

Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/253

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support low-level interface for modifying the underlying Uvicorn server","articleBody":"\n\n\nIt would be great to have an API to interact with the MCP's underlying Uvicorn server.\n\n\nMore specifically, It would be great to have a leaky interface, that can act as a bridge with the abstraction of the underlying Uvicorn server, a way to configure it, or maybe just allowing us to pass arguments/kwargs to the Uvicorn server.\n\n## Problem\n\nAs a start, there is no clean way to close a Uvicorn server programmatically/gracefully, there are some hacks to go around it, here are some related issues: \n\n**Uvicorn cannot be shutdown programmatically** - https://github.com/encode/uvicorn/discussions/1103 \n**Uvicorn cannot be shutdown programmatically** - https://github.com/encode/uvicorn/issues/742\n**Running multiple Uvicorn servers simultaneously hangs on shutdown** - https://github.com/encode/uvicorn/issues/1773\n**Uvicorn eats SIGINTs, does not propagate exceptions** - https://github.com/encode/uvicorn/issues/1579\n\nAnd so on.... \n\n\n## Idea\n\nYou might say that, we already have access to the server and low-level API with\n\n```python\nfrom mcp.server.lowlevel.server import Server\n```\n\nHowever just to handle a graceful shutdown, not being able to handle all the out-of-box features that  `FastMCP` class provides, feels like re-inventing the wheel.\n\n\nSo one of the easiest way(s) to do it is, passing the `timeout_graceful_shutdown=0` to the `uvicorn.Config` which solves the (partially) hanging server problem. \n\n\nUvicorn is configurable via environment variables, when they are prefixed with [`UVICORN_`](https://www.uvicorn.org/settings/#settings), so in a similar way, when we pass values to:\n\n```python\nFastMCP(\n    \"some_server\",\n    lifespan=app_lifespan,\n    debug=True, # no prefix, for the Settings class\n    uvicorn_timeout_graceful_shutdown=0, # uvicorn prefix, for UvicornConfig?\n)\n```\n\nWe can buffer this, similar to `**settings` then we can pass to the initialization of the server, would it be feasible? \n\nI'm sure there will be other use cases for this, also I'm not sure if the example above is the best way to handle that,  just to give you a brief idea.\n\n\n\n\n","author":{"url":"https://github.com/ycd","@type":"Person","name":"ycd"},"datePublished":"2025-03-10T13:36:49Z","url":"https://github.com/modelcontextprotocol/python-sdk/issues/253"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:740710dc-65e2-dc25-2d6f-9b04073694a6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB424:A1D0F:CAB61:11592E:6AFCFFB2
html-safe-nonce75569c5f27a3405197b29762677cdc15905a9fef8ae14c49922d3da775e523f0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDI0OkExRDBGOkNBQjYxOjExNTkyRTo2QUZDRkZCMiIsInZpc2l0b3JfaWQiOiIxNTkxNjgxMjAwNTU5MDMwMTk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac6f894f894d33438aba098f9cd449da528b9f95f09579f16c570fd23762c4421a
hovercard-subject-tagissue:2907300836
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/python-sdk/253/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3b83f3acab770383b6b8dbf4a879de18d4c9a7007531743953f05a5edcd07751/modelcontextprotocol/python-sdk/issues/253
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3b83f3acab770383b6b8dbf4a879de18d4c9a7007531743953f05a5edcd07751/modelcontextprotocol/python-sdk/issues/253
og:image:altIt would be great to have an API to interact with the MCP's underlying Uvicorn server. More specifically, It would be great to have a leaky interface, that can act as a bridge with the abstraction ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameycd
hostnamegithub.com
expected-hostnamegithub.com
Nonecfabad6ee26d2b84c7afef4ae0cc71b8b692fb9d66f9f15997652ef991bfd3f4
turbo-cache-controlno-preview
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
release35f85b78676038389558a41adf8d76e474592ede
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/issues/253#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2F253
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2F253
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=modelcontextprotocol%2Fpython-sdk
Reloadhttps://github.com/modelcontextprotocol/python-sdk/issues/253
Reloadhttps://github.com/modelcontextprotocol/python-sdk/issues/253
Reloadhttps://github.com/modelcontextprotocol/python-sdk/issues/253
modelcontextprotocolhttps://github.com/modelcontextprotocol
python-sdkhttps://github.com/modelcontextprotocol/python-sdk
Codehttps://github.com/modelcontextprotocol/python-sdk
Issues305 (305)https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests112 (112)https://github.com/modelcontextprotocol/python-sdk/pulls
Actionshttps://github.com/modelcontextprotocol/python-sdk/actions
Projectshttps://github.com/modelcontextprotocol/python-sdk/projects
Security and quality12 (12)https://github.com/modelcontextprotocol/python-sdk/security
Insightshttps://github.com/modelcontextprotocol/python-sdk/insights
https://github.com/modelcontextprotocol/python-sdk
New issuehttps://github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/253
New issuehttps://github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/253
Support low-level interface for modifying the underlying Uvicorn serverhttps://github.com/modelcontextprotocol/python-sdk/issues/253#top
P3Nice to haves, rare edge caseshttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22P3%22
enhancementRequest for a new feature that's not currently supportedhttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22enhancement%22
ready for workEnough information for someone to start working onhttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22ready%20for%20work%22
v2Affects the v2 line (2.x on main)https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
https://github.com/ycd
ycdhttps://github.com/ycd
on Mar 10, 2025https://github.com/modelcontextprotocol/python-sdk/issues/253#issue-2907300836
Kludex/uvicorn#1103https://github.com/Kludex/uvicorn/discussions/1103
Kludex/uvicorn#742https://github.com/Kludex/uvicorn/issues/742
Kludex/uvicorn#1773https://github.com/Kludex/uvicorn/issues/1773
Kludex/uvicorn#1579https://github.com/Kludex/uvicorn/issues/1579
UVICORN_https://www.uvicorn.org/settings/#settings
https://github.com/Kludex
Kludexhttps://github.com/Kludex
on Mar 10, 2025https://github.com/modelcontextprotocol/python-sdk/issues/253#issuecomment-2710701032
https://github.com/ycd
ycdhttps://github.com/ycd
on Mar 10, 2025https://github.com/modelcontextprotocol/python-sdk/issues/253#issuecomment-2710761341
maxisbeyhttps://github.com/maxisbey
enhancementRequest for a new feature that's not currently supportedhttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22enhancement%22
P3Nice to haves, rare edge caseshttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22P3%22
PR welcomehttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22PR%20welcome%22
on Sep 26, 2025https://github.com/modelcontextprotocol/python-sdk/issues/253#event-19946060224
felixweinbergerhttps://github.com/felixweinberger
v2Affects the v2 line (2.x on main)https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
ready for workEnough information for someone to start working onhttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22ready%20for%20work%22
on Oct 7, 2025https://github.com/modelcontextprotocol/python-sdk/issues/253#event-20140983790
felixweinbergerhttps://github.com/felixweinberger
good first issueGood for newcomershttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
PR welcomehttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22PR%20welcome%22
on Nov 12, 2025https://github.com/modelcontextprotocol/python-sdk/issues/253#event-20894760764
maxisbeyhttps://github.com/maxisbey
good first issueGood for newcomershttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
on Dec 9, 2025https://github.com/modelcontextprotocol/python-sdk/issues/253#event-21462205793
https://github.com/maxisbey
maxisbeyhttps://github.com/maxisbey
on Feb 19, 2026https://github.com/modelcontextprotocol/python-sdk/issues/253#issuecomment-3929506514
examples/snippets/servers/streamable_http_basic_mounting.pyhttps://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/streamable_http_basic_mounting.py
#1739https://github.com/modelcontextprotocol/python-sdk/issues/1739
AI Disclaimerhttps://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d
maxisbeyhttps://github.com/maxisbey
completedhttps://github.com/modelcontextprotocol/python-sdk/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Feb 19, 2026https://github.com/modelcontextprotocol/python-sdk/issues/253#event-22926894081
Sign up for freehttps://github.com/signup?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/253
Sign in to commenthttps://github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/253
P3Nice to haves, rare edge caseshttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22P3%22
enhancementRequest for a new feature that's not currently supportedhttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22enhancement%22
ready for workEnough information for someone to start working onhttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22ready%20for%20work%22
v2Affects the v2 line (2.x on main)https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
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.