Skip to content

Commit fe1de46

Browse files
jeffhandleyCopiloteiriktsarpalismikekistler
authored
Introduce versioning, breaking changes, and support document (#986)
* Introduce versioning, breaking changes, and support document * Use "backward-compatible" and "forward-compatible" Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestions from reviews Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com> Co-authored-by: Mike Kistler <mikekistler@microsoft.com> * Fix nested ordered list --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com> Co-authored-by: Mike Kistler <mikekistler@microsoft.com>
1 parent 2105f68 commit fe1de46

File tree

3 files changed

+71
-2
lines changed

3 files changed

+71
-2
lines changed

docs/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ For more information about MCP:
1818

1919
For how-to guides, tutorials, and additional guidance, refer to the [official MCP documentation](https://modelcontextprotocol.io/).
2020

21+
## Official SDK packages
22+
23+
The official C# SDK packages for stable and pre-release versions are published to the [NuGet Gallery](https://www.nuget.org) under the [ModelContextProtocolOfficial](https://www.nuget.org/profiles/ModelContextProtocolOfficial) profile.
24+
25+
Continuous integration builds are published to the modelcontextprotocol organization's [GitHub NuGet package registry](https://github.com/orgs/modelcontextprotocol/packages?ecosystem=nuget).
26+
2127
## License
2228

2329
This project is licensed under the [MIT License](https://github.com/modelcontextprotocol/csharp-sdk/blob/main/LICENSE).

docs/toc.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ items:
33
href: concepts/index.md
44
- name: API Reference
55
href: api/ModelContextProtocol.yml
6-
- name: Github
7-
href: https://github.com/ModelContextProtocol/csharp-sdk
6+
- name: Versioning
7+
href: versioning.md
8+
- name: GitHub
9+
href: https://github.com/ModelContextProtocol/csharp-sdk

docs/versioning.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: C# SDK Versioning
3+
author: jeffhandley
4+
description: ModelContextProtocol C# SDK approach to versioning, breaking changes, and support
5+
uid: versioning
6+
---
7+
The ModelContextProtocol specification continues to evolve rapidly, and it's important for the C# SDK to remain current with specification additions and updates. To enable this, all NuGet packages that compose the SDK will follow [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html) with MAJOR.MINOR.PATCH version numbers, and optional pre-release versions.
8+
9+
Given a version number MAJOR.MINOR.PATCH, the package versions will increment the:
10+
11+
* MAJOR version when incompatible API changes are included
12+
* MINOR version when functionality is added in a backward-compatible manner
13+
* PATCH version when backward-compatible bug fixes are included
14+
15+
*A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements.*
16+
17+
## Supported versions
18+
19+
Beginning with the 1.0.0 release, the following support policy will be applied for the official C# ModelContextProtocol SDK packages:
20+
21+
1. New functionality and additive APIs will be introduced in MINOR releases within the current MAJOR version only
22+
* New functionality will not be added to an earlier MAJOR version
23+
2. Bugs will be fixed within either:
24+
1. A new PATCH release against the latest MAJOR.MINOR version
25+
2. A new MINOR release against the latest MAJOR version
26+
3. Critical, blocking issues will be fixed against:
27+
1. The latest MINOR version within _the current_ MAJOR version
28+
2. The latest MINOR version within _one previous_ MAJOR version, until the latest MAJOR version has been published for 3 months
29+
30+
## Experimental APIs
31+
32+
MAJOR or MINOR version updates might introduce or alter APIs annotated as [`[Experimental]`](https://learn.microsoft.com/dotnet/api/system.diagnostics.codeanalysis.experimentalattribute). This attribute indicates that an API is experimental and it may change at any time--including within PATCH or MINOR version updates.
33+
34+
Experimental APIs require suppression of diagnostic codes specific to the MCP SDK APIs, using an `MCPEXP` prefix.
35+
36+
## Breaking changes
37+
38+
Prior to the release of a stable 1.0.0 set of NuGet packages, the SDK remains in preview and breaking changes can be introduced without prior notice. All versions beginning with the stable 1.0.0 release will follow semantic versioning, and breaking changes will require increments to the MAJOR version.
39+
40+
If feasible, the SDK will support all versions of the MCP spec. However, if breaking changes to the spec make this infeasible, preference will be given to the most recent version of the MCP spec, and this would be considered a breaking change necessitating a new MAJOR version.
41+
42+
All releases are posted to https://github.com/modelcontextprotocol/csharp-sdk/releases with release notes. Issues and pull requests labeled with `breaking-change` are highlighted in the corresponding release notes.
43+
44+
### Specification schema changes
45+
46+
If the MCP specification changes the schema for JSON payloads, the C# SDK may use the [`McpSession.NegotiatedProtocolVersion`](https://modelcontextprotocol.github.io/csharp-sdk/api/ModelContextProtocol.McpSession.html#ModelContextProtocol_McpSession_NegotiatedProtocolVersion) to dynamically change the payload schema, potentially using internal data transfer objects (DTOs) to achieve the needed deserialization behavior. These techniques will be applied where feasible to maintain backward- and forward-compatibility between MCP specification versions.
47+
48+
Refer to the following prototypes for illustrations of how this could be achieved:
49+
50+
* [Support multiple contents in sampling results](https://github.com/eiriktsarpalis/csharp-sdk/pull/2)
51+
* [Support multiple contents in sampling results (using DTOs)](https://github.com/eiriktsarpalis/csharp-sdk/pull/3)
52+
53+
### Obsolete APIs
54+
55+
If APIs within the SDK become obsolete due to changes in the MCP spec or other evolution of the SDK's APIs, the [`[Obsolete]`](https://learn.microsoft.com/dotnet/api/system.obsoleteattribute) attribute will be applied to the affected APIs.
56+
57+
1. Within a MINOR version update, APIs may be marked as `[Obsolete]` to produce _build warnings_ while the API remains functional. The build warnings will provide guidance specific to the affected APIs.
58+
2. Within a MAJOR version update, APIs may be marked as `[Obsolete]` to produce _build errors_ indicating the API is no longer functional and always throws exceptions. The build errors will provide guidance specific to the affected APIs.
59+
3. Within a MAJOR version update, obsolete APIs may be removed. API removals are expected to be rare and avoided wherever possible, and `[Obsolete]` attributes will be applied ahead of the API removal.
60+
61+
Beginning with the 1.0.0 release, all obsoletions will use diagnostic codes specific to the MCP SDK APIs, using an `MCPOBS` prefix.

0 commit comments

Comments
 (0)