|
| 1 | +# Versioning Policy |
| 2 | + |
| 3 | +The MCP Python SDK (`mcp`) follows [Semantic Versioning 2.0.0](https://semver.org/). |
| 4 | + |
| 5 | +## Version Format |
| 6 | + |
| 7 | +`MAJOR.MINOR.PATCH` |
| 8 | + |
| 9 | +- **MAJOR**: Incremented for breaking changes (see below). |
| 10 | +- **MINOR**: Incremented for new features that are backward-compatible. |
| 11 | +- **PATCH**: Incremented for backward-compatible bug fixes. |
| 12 | + |
| 13 | +## What Constitutes a Breaking Change |
| 14 | + |
| 15 | +The following changes are considered breaking and require a major version bump: |
| 16 | + |
| 17 | +- Removing or renaming a public API export (class, function, type, or constant). |
| 18 | +- Changing the signature of a public function or method in a way that breaks existing callers (removing parameters, changing required/optional status, changing types). |
| 19 | +- Removing or renaming a public type or dataclass/TypedDict field. |
| 20 | +- Changing the behavior of an existing API in a way that breaks documented contracts. |
| 21 | +- Dropping support for a Python version that is still receiving security updates. |
| 22 | +- Removing support for a transport type. |
| 23 | +- Changes to the MCP protocol version that require client/server code changes. |
| 24 | + |
| 25 | +The following are **not** considered breaking: |
| 26 | + |
| 27 | +- Adding new optional parameters to existing functions. |
| 28 | +- Adding new exports, types, or classes. |
| 29 | +- Adding new optional fields to existing types. |
| 30 | +- Bug fixes that correct behavior to match documented intent. |
| 31 | +- Internal refactoring that does not affect the public API. |
| 32 | +- Adding support for new MCP spec features. |
| 33 | +- Changes to dev dependencies or build tooling. |
| 34 | + |
| 35 | +## How Breaking Changes Are Communicated |
| 36 | + |
| 37 | +1. **Changelog**: All breaking changes are documented in the GitHub release notes with migration instructions. |
| 38 | +2. **Deprecation**: When feasible, APIs are deprecated for at least one minor release before removal using `warnings.warn()` with `DeprecationWarning`, which surfaces warnings at runtime and through static analysis tooling. |
| 39 | +3. **Migration guide**: Major version releases include a migration guide describing what changed and how to update. |
| 40 | +4. **PR labels**: Pull requests containing breaking changes are labeled with `breaking change`. |
0 commit comments