Skip to content

Commit 6bace86

Browse files
authored
Merge pull request #83 from koic/make_default_protocol_version_latest_spec_version
Set default protocol version to the latest specification
2 parents e4d5f19 + 2b36bf6 commit 6bace86

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ server.notify_tools_list_changed()
148148
#### Rails Controller
149149

150150
When added to a Rails controller on a route that handles POST requests, your server will be compliant with non-streaming
151-
[Streamable HTTP](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) transport
151+
[Streamable HTTP](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http) transport
152152
requests.
153153

154154
You can use the `Server#handle_json` method to handle requests.
@@ -340,7 +340,7 @@ MCP::Server.protocol_version = nil
340340

341341
If an invalid `protocol_version` value is set, an `ArgumentError` is raised.
342342

343-
Be sure to check the [MCP spec](https://modelcontextprotocol.io/specification/2025-03-26) for the protocol version to understand the supported features for the version being set.
343+
Be sure to check the [MCP spec](https://modelcontextprotocol.io/specification) for the protocol version to understand the supported features for the version being set.
344344

345345
### Exception Reporting
346346

lib/mcp/configuration.rb

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

33
module MCP
44
class Configuration
5-
DEFAULT_PROTOCOL_VERSION = "2024-11-05"
6-
SUPPORTED_PROTOCOL_VERSIONS = ["2025-06-18", "2025-03-26", DEFAULT_PROTOCOL_VERSION]
5+
DEFAULT_PROTOCOL_VERSION = "2025-06-18"
6+
SUPPORTED_PROTOCOL_VERSIONS = [DEFAULT_PROTOCOL_VERSION, "2025-03-26", "2024-11-05"]
77

88
attr_writer :exception_reporter, :instrumentation_callback, :protocol_version, :validate_tool_call_arguments
99

test/mcp/server/transports/streamable_http_transport_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class StreamableHTTPTransportTest < ActiveSupport::TestCase
8484
body = JSON.parse(response[2][0])
8585
assert_equal "2.0", body["jsonrpc"]
8686
assert_equal "123", body["id"]
87-
assert_equal "2024-11-05", body["result"]["protocolVersion"]
87+
assert_equal "2025-06-18", body["result"]["protocolVersion"]
8888
end
8989

9090
test "handles GET request with valid session ID" do

test/mcp/server_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class ServerTest < ActiveSupport::TestCase
114114
jsonrpc: "2.0",
115115
id: 1,
116116
result: {
117-
protocolVersion: "2024-11-05",
117+
protocolVersion: "2025-06-18",
118118
capabilities: {
119119
prompts: { listChanged: true },
120120
resources: { listChanged: true },

0 commit comments

Comments
 (0)