Skip to content

Commit 845cbc4

Browse files
committed
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`.
1 parent d31c3da commit 845cbc4

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class ApplicationController < ActionController::Base
173173
def index
174174
server = MCP::Server.new(
175175
name: "my_server",
176-
title: "Example Server Display Name", # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
176+
title: "Example Server Display Name",
177177
version: "1.0.0",
178178
instructions: "Use the tools of this server as a last resort",
179179
tools: [SomeTool, AnotherTool],
@@ -391,7 +391,7 @@ This gem provides a `MCP::Tool` class that can be used to create tools in three
391391

392392
```ruby
393393
class MyTool < MCP::Tool
394-
title "My Tool" # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
394+
title "My Tool"
395395
description "This tool performs specific functionality..."
396396
input_schema(
397397
properties: {
@@ -428,7 +428,7 @@ tool = MyTool
428428
```ruby
429429
tool = MCP::Tool.define(
430430
name: "my_tool",
431-
title: "My Tool", # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
431+
title: "My Tool",
432432
description: "This tool performs specific functionality...",
433433
annotations: {
434434
read_only_hint: true,
@@ -633,7 +633,7 @@ The `MCP::Prompt` class provides three ways to create prompts:
633633
```ruby
634634
class MyPrompt < MCP::Prompt
635635
prompt_name "my_prompt" # Optional - defaults to underscored class name
636-
title "My Prompt" # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
636+
title "My Prompt"
637637
description "This prompt performs specific functionality..."
638638
arguments [
639639
MCP::Prompt::Argument.new(
@@ -672,7 +672,7 @@ prompt = MyPrompt
672672
```ruby
673673
prompt = MCP::Prompt.define(
674674
name: "my_prompt",
675-
title: "My Prompt", # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
675+
title: "My Prompt",
676676
description: "This prompt performs specific functionality...",
677677
arguments: [
678678
MCP::Prompt::Argument.new(
@@ -797,7 +797,7 @@ The `MCP::Resource` class provides a way to register resources with the server.
797797
resource = MCP::Resource.new(
798798
uri: "https://example.com/my_resource",
799799
name: "my-resource",
800-
title: "My Resource", # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
800+
title: "My Resource",
801801
description: "Lorem ipsum dolor sit amet",
802802
mime_type: "text/html",
803803
)
@@ -830,7 +830,7 @@ The `MCP::ResourceTemplate` class provides a way to register resource templates
830830
resource_template = MCP::ResourceTemplate.new(
831831
uri_template: "https://example.com/my_resource_template",
832832
name: "my-resource-template",
833-
title: "My Resource Template", # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
833+
title: "My Resource Template",
834834
description: "Lorem ipsum dolor sit amet",
835835
mime_type: "text/html",
836836
)

lib/mcp/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Configuration
55
# DRAFT-2025-v3 is the latest draft protocol version:
66
# https://github.com/modelcontextprotocol/modelcontextprotocol/blob/14ec41c/schema/draft/schema.ts#L15
77
DRAFT_PROTOCOL_VERSION = "DRAFT-2025-v3"
8-
SUPPORTED_STABLE_PROTOCOL_VERSIONS = ["2025-06-18", "2025-03-26", "2024-11-05"]
8+
SUPPORTED_STABLE_PROTOCOL_VERSIONS = ["2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"]
99

1010
attr_writer :exception_reporter, :instrumentation_callback
1111

lib/mcp/server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def prompts_get_handler(&block)
174174
private
175175

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

test/mcp/configuration_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ConfigurationTest < ActiveSupport::TestCase
5252
Configuration.new(protocol_version: Configuration::DRAFT_PROTOCOL_VERSION)
5353
end
5454

55-
assert_equal("protocol_version must be 2025-06-18, 2025-03-26, or 2024-11-05", exception.message)
55+
assert_equal("protocol_version must be 2025-11-25, 2025-06-18, 2025-03-26, or 2024-11-05", exception.message)
5656
end
5757

5858
test "raises ArgumentError when protocol_version is not a supported protocol version" do
@@ -61,7 +61,7 @@ class ConfigurationTest < ActiveSupport::TestCase
6161
custom_version = "2025-03-27"
6262
config.protocol_version = custom_version
6363
end
64-
assert_equal("protocol_version must be 2025-06-18, 2025-03-26, or 2024-11-05", exception.message)
64+
assert_equal("protocol_version must be 2025-11-25, 2025-06-18, 2025-03-26, or 2024-11-05", exception.message)
6565
end
6666

6767
test "raises ArgumentError when protocol_version is not a boolean value" do

0 commit comments

Comments
 (0)