ruby-sdk/lib/mcp
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Koichi ITO bf729baef2 Add "Draft" protocol version to supported protocol versions
For example, the `title` introduced in #109 is not supported in the latest stable protocol version "2025-06-18":
https://modelcontextprotocol.io/specification/2025-06-18

It is supported in the Draft of the next version:
https://modelcontextprotocol.io/specification/draft

In other words, the fact that the Ruby SDK treats "2025-06-18" as the default protocol version while `title` is
only supported in the Draft results in an inconsistency.

Because of this, a new version `"Draft"` has been added to the list of supported versions.
Its value follows the schema below and is defined as `DRAFT-2025-v3`:
14ec41c/schema/draft/schema.ts (L15)

It was also considered to continue using the latest stable version "2025-06-18" as the Ruby SDK default instead of the Draft.
However, in that case, users would need to explicitly specify `MCP::Server.new(protocol_version: 'DRAFT-2025-v3')`,
which adds extra burden. In this PR, Draft is made the default in order to provide the following benefits:

- Users are likely to prefer using the Draft version over the latest stable version
- No need to specify the `protocol_version` option when initializing `MCP::Server`
- Users generally do not need to know the internal development value `DRAFT-2025-v3`

The primary case for specifying `protocol_version` explicitly is when strict adherence to a particular version is required.
However, it seems more practical to prioritize use cases where backward-compatible features, including those from the Draft,
are desirable. This is the rationale behind making the Draft version the default.

In addition, making the Draft version the default protocol version preserves backward compatibility for `MCP::Server`.

NOTE: `DRAFT-2025-v3` is a development code, so its value cannot be set externally.
It is applied either when `protocol_version` is omitted or when `nil` is set explicitly,
such as with `MCP::Configuration.new(protocol_version: nil)`.
This prevents users from creating implementations that depend on development codes like `DRAFT-2025-v3`.
2025-11-11 15:44:36 +09:00
..
client Add Tool output_schema support with comprehensive validation 2025-09-11 11:12:27 -04:00
prompt add title field to prompt argument 2025-10-06 09:35:42 -04:00
resource Remove useless magic comment 2025-09-15 12:33:09 +09:00
server Introduce stateless mode to allow for HA 2025-11-04 15:26:12 -08:00
tool Update metaschema URI format in input_schema.rb and output_schema.rb for 2025-10-03 17:29:50 -03:00
transports Add a migration path for Server::Transports::StdioTransport 2025-06-10 16:27:22 +09:00
client.rb Add prompts/list and prompts/get support to client 2025-10-15 13:16:41 +09:00
configuration.rb Add "Draft" protocol version to supported protocol versions 2025-11-11 15:44:36 +09:00
content.rb Remove useless magic comment 2025-09-15 12:33:09 +09:00
instrumentation.rb stop using shared dir 2025-05-30 14:33:22 -04:00
methods.rb Add missing checks 2025-06-15 17:35:18 +09:00
prompt.rb add _meta field to Prompt 2025-10-10 09:05:55 -04:00
resource.rb Remove useless magic comment 2025-09-15 12:33:09 +09:00
resource_template.rb Remove useless magic comment 2025-09-15 12:33:09 +09:00
server.rb Add "Draft" protocol version to supported protocol versions 2025-11-11 15:44:36 +09:00
string_utils.rb Remove useless magic comment 2025-09-15 12:33:09 +09:00
tool.rb Add support for _meta field on tool schema (#124) 2025-10-01 17:21:27 -04:00
transport.rb Addressing feedback 2025-06-11 13:44:54 -07:00
version.rb Release 0.4.0 2025-10-15 01:25:05 -04:00