-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
v2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes
Description
Description
Summary
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.
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
v2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes