The complete model of data objects for MCP might be useful in implementing an MCP server or client, but I think it comes with some drawbacks when using it as an API:
- the model contains lots of objects that users should never use
- for example, in any framework where features can be added using annotations, there's no need for the user to use the
JSONRPCResponse class
- this makes the API harder to use
- the model is tied directly to a specific version of MCP and new versions of the protocol might require the model to change in an incompatible way
Could we consider providing just the data objects that are needed to support the annotations and API?
Although we might still run into a situation where the spec evolves in an incompatible way, having our objects not directly reflect the protocol schema would allow implementations to either adapt the object into an appropriate message, or to raise an error.
The complete model of data objects for MCP might be useful in implementing an MCP server or client, but I think it comes with some drawbacks when using it as an API:
JSONRPCResponseclassCould we consider providing just the data objects that are needed to support the annotations and API?
Although we might still run into a situation where the spec evolves in an incompatible way, having our objects not directly reflect the protocol schema would allow implementations to either adapt the object into an appropriate message, or to raise an error.