-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Define and document the public Python SDK API surface #1701
Copy link
Copy link
Open
Labels
P1Significant bug affecting many users, highly requested featureSignificant bug affecting many users, highly requested featurebreaking changeWill break existing deployments when updated without changesWill break existing deployments when updated without changesenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedready for workEnough information for someone to start working onEnough information for someone to start working onv2Ideas, 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
Metadata
Metadata
Assignees
Labels
P1Significant bug affecting many users, highly requested featureSignificant bug affecting many users, highly requested featurebreaking changeWill break existing deployments when updated without changesWill break existing deployments when updated without changesenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedready for workEnough information for someone to start working onEnough information for someone to start working onv2Ideas, 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
Summary
The Python SDK exposes a variety of classes and functions across packages and submodules. Some are clearly meant to be public, others are internal but not marked as such. Tests and user code sometimes rely on internals (e.g. private attributes).
This makes it hard for users to know what is safe to depend on and hard for maintainers to evolve internals without risking breakage.
Problems
mcp.*and subpackages are part of the supported public API._mcp_server), which blurs the line between public and internal.Proposal
Define an explicit public API
__all__and/or amcp.public(or similar) module to list what is considered stable public API.Mark internals clearly
_internalsubpackage where possible.Gradual tightening
Why this matters
Acceptance criteria
_internalpackages) where appropriate.References
No response