Skip to content

Commit 7b3ff94

Browse files
authored
Merge pull request #184 from koic/support_2025_11_25_specification
Allow stable protocol specification version "2025-11-25"
2 parents baeb75c + 67e03d7 commit 7b3ff94

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
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],
@@ -392,7 +392,7 @@ This gem provides a `MCP::Tool` class that can be used to create tools in three
392392

393393
```ruby
394394
class MyTool < MCP::Tool
395-
title "My Tool" # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
395+
title "My Tool"
396396
description "This tool performs specific functionality..."
397397
input_schema(
398398
properties: {
@@ -429,7 +429,7 @@ tool = MyTool
429429
```ruby
430430
tool = MCP::Tool.define(
431431
name: "my_tool",
432-
title: "My Tool", # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
432+
title: "My Tool",
433433
description: "This tool performs specific functionality...",
434434
annotations: {
435435
read_only_hint: true,
@@ -660,7 +660,7 @@ The `MCP::Prompt` class provides three ways to create prompts:
660660
```ruby
661661
class MyPrompt < MCP::Prompt
662662
prompt_name "my_prompt" # Optional - defaults to underscored class name
663-
title "My Prompt" # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
663+
title "My Prompt"
664664
description "This prompt performs specific functionality..."
665665
arguments [
666666
MCP::Prompt::Argument.new(
@@ -699,7 +699,7 @@ prompt = MyPrompt
699699
```ruby
700700
prompt = MCP::Prompt.define(
701701
name: "my_prompt",
702-
title: "My Prompt", # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
702+
title: "My Prompt",
703703
description: "This prompt performs specific functionality...",
704704
arguments: [
705705
MCP::Prompt::Argument.new(
@@ -824,7 +824,7 @@ The `MCP::Resource` class provides a way to register resources with the server.
824824
resource = MCP::Resource.new(
825825
uri: "https://example.com/my_resource",
826826
name: "my-resource",
827-
title: "My Resource", # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
827+
title: "My Resource",
828828
description: "Lorem ipsum dolor sit amet",
829829
mime_type: "text/html",
830830
)
@@ -857,7 +857,7 @@ The `MCP::ResourceTemplate` class provides a way to register resource templates
857857
resource_template = MCP::ResourceTemplate.new(
858858
uri_template: "https://example.com/my_resource_template",
859859
name: "my-resource-template",
860-
title: "My Resource Template", # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification.
860+
title: "My Resource Template",
861861
description: "Lorem ipsum dolor sit amet",
862862
mime_type: "text/html",
863863
)

lib/mcp/configuration.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
module MCP
44
class Configuration
5-
LATEST_STABLE_PROTOCOL_VERSION = "2025-06-18"
6-
SUPPORTED_STABLE_PROTOCOL_VERSIONS = [LATEST_STABLE_PROTOCOL_VERSION, "2025-03-26", "2024-11-05"]
5+
LATEST_STABLE_PROTOCOL_VERSION = "2025-11-25"
6+
SUPPORTED_STABLE_PROTOCOL_VERSIONS = [
7+
LATEST_STABLE_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05",
8+
]
79

810
attr_writer :exception_reporter, :instrumentation_callback
911

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
@@ -53,7 +53,7 @@ class ConfigurationTest < ActiveSupport::TestCase
5353
Configuration.new(protocol_version: "DRAFT-2025-v3")
5454
end
5555

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

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

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

0 commit comments

Comments
 (0)