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
Support MCP client session resumption (sessionId reuse) in Python SDK #2116
The Python MCP SDK currently appears to create a new session whenever a client is instantiated. It would be valuable to support resuming an existing MCP session using a previously issued sessionId, similar to functionality discussed and addressed in the C# SDK (see modelcontextprotocol/csharp-sdk#946).
This would enable persistent and stateful workflows in agent-based systems.
Problem
At present, there does not appear to be a documented way in the Python SDK to:
Reuse an existing sessionId
Resume a previously established MCP session
Control session lifecycle independently of the client object's lifetime
Why This Is Important
In agent-driven architectures , session continuity allows:
More efficient orchestration
Reduced overhead from repeated session initialization
As MCP adoption grows across SDKs (C#, TypeScript, Python), having consistent session lifecycle capabilities improves cross-language parity and developer experience.
Activity
mrutunjay-kinagi commentedon Mar 21, 2026
@maxisbey I can pick this up ?
mrutunjay-kinagi commentedon Mar 24, 2026
@maxisbey I've tried to replicate what is in modelcontextprotocol/csharp-sdk#946 in my PR #2327