We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c14f65 commit 48ac917Copy full SHA for 48ac917
1 file changed
lib/mcp/server.rb
@@ -314,9 +314,9 @@ def server_info
314
end
315
316
def init(params)
317
- client_version = params&.dig(:protocolVersion) || params&.dig("protocolVersion")
318
- negotiated_version = if client_version && Configuration::SUPPORTED_STABLE_PROTOCOL_VERSIONS.include?(client_version)
319
- client_version
+ protocol_version = params[:protocolVersion] if params
+ negotiated_version = if protocol_version && Configuration::SUPPORTED_STABLE_PROTOCOL_VERSIONS.include?(protocol_version)
+ protocol_version
320
else
321
configuration.protocol_version
322
0 commit comments