-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
enhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedv2Ideas, 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
Context
Following discussion in #1177, @Kludex raised concerns about the current API approach for HTTP client handling.
Problem
The current pattern of accepting an HTTP client directly may not be the cleanest long-term approach. While many LLM providers do this, there are concerns about API sustainability.
Proposed Direction
Create an MCPClient/Client class that manages the lifecycle of the HTTP client internally, rather than accepting it as a parameter. This is similar to how Starlette's TestClient works.
Key points from @Kludex:
- The SDK should manage HTTP client lifecycle internally
- Could use composition (not necessarily inheritance)
- Reference implementation: Starlette's
TestClientpattern - Allow passing configuration parameters rather than the client itself
Reference: #1177
maxisbey
Metadata
Metadata
Assignees
Labels
enhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedv2Ideas, 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