diff --git a/README.md b/README.md index 1afd572..b6b3435 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ class ApplicationController < ActionController::Base def index server = MCP::Server.new( name: "my_server", - title: "Example Server Display Name", # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification. + title: "Example Server Display Name", version: "1.0.0", instructions: "Use the tools of this server as a last resort", tools: [SomeTool, AnotherTool], @@ -391,7 +391,7 @@ This gem provides a `MCP::Tool` class that can be used to create tools in three ```ruby class MyTool < MCP::Tool - title "My Tool" # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification. + title "My Tool" description "This tool performs specific functionality..." input_schema( properties: { @@ -428,7 +428,7 @@ tool = MyTool ```ruby tool = MCP::Tool.define( name: "my_tool", - title: "My Tool", # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification. + title: "My Tool", description: "This tool performs specific functionality...", annotations: { read_only_hint: true, @@ -633,7 +633,7 @@ The `MCP::Prompt` class provides three ways to create prompts: ```ruby class MyPrompt < MCP::Prompt prompt_name "my_prompt" # Optional - defaults to underscored class name - title "My Prompt" # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification. + title "My Prompt" description "This prompt performs specific functionality..." arguments [ MCP::Prompt::Argument.new( @@ -672,7 +672,7 @@ prompt = MyPrompt ```ruby prompt = MCP::Prompt.define( name: "my_prompt", - title: "My Prompt", # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification. + title: "My Prompt", description: "This prompt performs specific functionality...", arguments: [ MCP::Prompt::Argument.new( @@ -797,7 +797,7 @@ The `MCP::Resource` class provides a way to register resources with the server. resource = MCP::Resource.new( uri: "https://example.com/my_resource", name: "my-resource", - title: "My Resource", # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification. + title: "My Resource", description: "Lorem ipsum dolor sit amet", mime_type: "text/html", ) @@ -830,7 +830,7 @@ The `MCP::ResourceTemplate` class provides a way to register resource templates resource_template = MCP::ResourceTemplate.new( uri_template: "https://example.com/my_resource_template", name: "my-resource-template", - title: "My Resource Template", # WARNING: This is a `Draft` and is not supported in the `Version 2025-06-18 (latest)` specification. + title: "My Resource Template", description: "Lorem ipsum dolor sit amet", mime_type: "text/html", ) diff --git a/lib/mcp/configuration.rb b/lib/mcp/configuration.rb index 1a22a24..147fd3b 100644 --- a/lib/mcp/configuration.rb +++ b/lib/mcp/configuration.rb @@ -5,7 +5,7 @@ class Configuration # DRAFT-2025-v3 is the latest draft protocol version: # https://github.com/modelcontextprotocol/modelcontextprotocol/blob/14ec41c/schema/draft/schema.ts#L15 DRAFT_PROTOCOL_VERSION = "DRAFT-2025-v3" - SUPPORTED_STABLE_PROTOCOL_VERSIONS = ["2025-06-18", "2025-03-26", "2024-11-05"] + SUPPORTED_STABLE_PROTOCOL_VERSIONS = ["2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"] attr_writer :exception_reporter, :instrumentation_callback diff --git a/lib/mcp/server.rb b/lib/mcp/server.rb index 33fa8c1..95d1fc7 100644 --- a/lib/mcp/server.rb +++ b/lib/mcp/server.rb @@ -174,7 +174,7 @@ def prompts_get_handler(&block) 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" diff --git a/test/mcp/configuration_test.rb b/test/mcp/configuration_test.rb index a4193a2..07e3f77 100644 --- a/test/mcp/configuration_test.rb +++ b/test/mcp/configuration_test.rb @@ -52,7 +52,7 @@ class ConfigurationTest < ActiveSupport::TestCase Configuration.new(protocol_version: Configuration::DRAFT_PROTOCOL_VERSION) end - assert_equal("protocol_version must be 2025-06-18, 2025-03-26, or 2024-11-05", exception.message) + assert_equal("protocol_version must be 2025-11-25, 2025-06-18, 2025-03-26, or 2024-11-05", exception.message) end test "raises ArgumentError when protocol_version is not a supported protocol version" do @@ -61,7 +61,7 @@ class ConfigurationTest < ActiveSupport::TestCase custom_version = "2025-03-27" config.protocol_version = custom_version end - assert_equal("protocol_version must be 2025-06-18, 2025-03-26, or 2024-11-05", exception.message) + assert_equal("protocol_version must be 2025-11-25, 2025-06-18, 2025-03-26, or 2024-11-05", exception.message) end test "raises ArgumentError when protocol_version is not a boolean value" do