Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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",
)
Expand Down Expand Up @@ -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",
)
Expand Down
2 changes: 1 addition & 1 deletion lib/mcp/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/mcp/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions test/mcp/configuration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down