Merge pull request #83 from koic/make_default_protocol_version_latest_spec_version
Set default protocol version to the latest specification
This commit is contained in:
commit
6bace861b2
4 changed files with 6 additions and 6 deletions
|
|
@ -148,7 +148,7 @@ server.notify_tools_list_changed()
|
|||
#### Rails Controller
|
||||
|
||||
When added to a Rails controller on a route that handles POST requests, your server will be compliant with non-streaming
|
||||
[Streamable HTTP](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) transport
|
||||
[Streamable HTTP](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http) transport
|
||||
requests.
|
||||
|
||||
You can use the `Server#handle_json` method to handle requests.
|
||||
|
|
@ -340,7 +340,7 @@ MCP::Server.protocol_version = nil
|
|||
|
||||
If an invalid `protocol_version` value is set, an `ArgumentError` is raised.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
### Exception Reporting
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
module MCP
|
||||
class Configuration
|
||||
DEFAULT_PROTOCOL_VERSION = "2024-11-05"
|
||||
SUPPORTED_PROTOCOL_VERSIONS = ["2025-06-18", "2025-03-26", DEFAULT_PROTOCOL_VERSION]
|
||||
DEFAULT_PROTOCOL_VERSION = "2025-06-18"
|
||||
SUPPORTED_PROTOCOL_VERSIONS = [DEFAULT_PROTOCOL_VERSION, "2025-03-26", "2024-11-05"]
|
||||
|
||||
attr_writer :exception_reporter, :instrumentation_callback, :protocol_version, :validate_tool_call_arguments
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ module MCP
|
|||
body = JSON.parse(response[2][0])
|
||||
assert_equal "2.0", body["jsonrpc"]
|
||||
assert_equal "123", body["id"]
|
||||
assert_equal "2024-11-05", body["result"]["protocolVersion"]
|
||||
assert_equal "2025-06-18", body["result"]["protocolVersion"]
|
||||
end
|
||||
|
||||
test "handles GET request with valid session ID" do
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ module MCP
|
|||
jsonrpc: "2.0",
|
||||
id: 1,
|
||||
result: {
|
||||
protocolVersion: "2024-11-05",
|
||||
protocolVersion: "2025-06-18",
|
||||
capabilities: {
|
||||
prompts: { listChanged: true },
|
||||
resources: { listChanged: true },
|
||||
|
|
|
|||
Loading…
Reference in a new issue