You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lifespan enters and exits for each request when stateless_http=True #1304
Activity
felixweinberger commentedon Oct 3, 2025
This is actually by design as stateless mode is currently spinning up a new transport for each request
python-sdk/src/mcp/server/streamable_http_manager.py
Lines 161 to 162 in c260e29
Likely could be improved though, marking this as something for potential enhancements in v2
Kludex commentedon Dec 4, 2025
This is a bug.
jcasse commentedon Dec 5, 2025
@savvaki try the low level API. It doesn't have this problem.
felixweinberger commentedon Jan 15, 2026
Working on this as part of Python SDK v2 hackathon.
maxisbey commentedon Feb 19, 2026
Subsumed by #2113 which redesigns lifespan with proper server-scoped vs session-scoped lifetimes.
feat(server): integrate server lifespan into Starlette app lifespan
docs(migration): add lifespan redesign migration guide for Option B
perf(mcp): cache TickTick client across requests on Vercel (#1)