Default to the latest stable protocol version

When starting an MCP server in Claude Code with `protocol_version` set to `DRAFT-2025-v3`,
it fails with the following error:

```console
2025-12-04T02:58:01.548Z [DEBUG] MCP server "example": Connection failed after 2093ms: Server's protocol version is not supported: DRAFT-2025-v3
2025-12-04T02:58:01.548Z [ERROR] MCP server "example" Connection failed: Server's protocol version is not supported: DRAFT-2025-v3
```

This PR changes the default behavior so that if `protocol_version` is not specified,
it uses the latest stable protocol version instead of the draft version.

This PR also updates the README to note that the latest stable protocol version includes
new features from the draft version.
This commit is contained in:
Koichi ITO 2025-12-04 03:15:02 +09:00
commit c786a14f61

View file

@ -81,7 +81,7 @@ module MCP
body = JSON.parse(response[2][0])
assert_equal "2.0", body["jsonrpc"]
assert_equal "123", body["id"]
assert_equal Configuration::DRAFT_PROTOCOL_VERSION, body["result"]["protocolVersion"]
assert_equal Configuration::LATEST_STABLE_PROTOCOL_VERSION, body["result"]["protocolVersion"]
end
test "handles GET request with valid session ID" do