Skip to content

How (or if) to handle MCP schema version changes and the draft schema #39

Open
@eiriktsarpalis

Description

@eiriktsarpalis

Originally posted by @PederHP in PederHP/mcpdotnet#58.

Currently the protocol implementation is based on the "2024-11-05" MCP schema (https://github.com/modelcontextprotocol/specification/tree/main/schema/2024-11-05).

The library should document this clearly, and I believe it should also support using the draft MCP schema (https://github.com/modelcontextprotocol/specification/tree/main/schema/draft).

I think there are many good reasons not to put draft schema support into the core library package. But it might be easier to add as a secondary package (not sure what the correct lingo is for this) like "mcpdotnet.draft" or "mcpdotnet.draftschema" etc. The likely extraction of specialized handlers into extension methods for IMcpClient and IMcpServer might facilitate making this more user friendly and convoluted to implement.

However, this introduces some questions in regards to the extensions that exist on top of the basic protocol implementation.

Any thoughts on how to handle this? Or whether to handle it at all? The official Python SDK does not have a way to use the branch spec from what I can see. The TypeScript SDK seems to support "2024-10-07" in addition to the "2024-11-05" schema. So perhaps this discussion is premature.

I do think that considering how to handle different schema versions is a relevant topic already. Also in terms of backwards compatibility and support, if breaking changes are introduced in versioned schemas, etc.


Relevant quote from the specification docs:

In the initialize request, the client MUST send a protocol version it supports. This SHOULD be the latest version supported by the client.

If the server supports the requested protocol version, it MUST respond with the same version. Otherwise, the server MUST respond with another protocol version it supports. This SHOULD be the latest version supported by the server.

If the client does not support the version in the server’s response, it SHOULD disconnect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions