Allow stable protocol specification version "2025-11-25"

The MCP specification dated 2025-11-25 has been released:

- https://modelcontextprotocol.io/specification/2025-11-25
- https://blog.modelcontextprotocol.io/posts/2025-11-25-first-mcp-anniversary

This PR allows `'2025-11-25'` to be specified for the `:protocol_version` keyword argument
in `MCP::Configuration.new`.
This commit is contained in:
Koichi ITO 2025-11-26 12:27:15 +09:00
commit 67e03d7b3d
2 changed files with 14 additions and 12 deletions

View file

@ -2,8 +2,10 @@
module MCP
class Configuration
LATEST_STABLE_PROTOCOL_VERSION = "2025-06-18"
SUPPORTED_STABLE_PROTOCOL_VERSIONS = [LATEST_STABLE_PROTOCOL_VERSION, "2025-03-26", "2024-11-05"]
LATEST_STABLE_PROTOCOL_VERSION = "2025-11-25"
SUPPORTED_STABLE_PROTOCOL_VERSIONS = [
LATEST_STABLE_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05",
]
attr_writer :exception_reporter, :instrumentation_callback

View file

@ -174,7 +174,7 @@ module MCP
private
def validate!
# NOTE: The draft protocol version is the next version after 2025-03-26.
# NOTE: The draft protocol version is the next version after 2025-11-25.
if @configuration.protocol_version <= "2025-03-26"
if server_info.key?(:title)
message = "Error occurred in server_info. `title` is not supported in protocol version 2025-03-26 or earlier"